Parcourir la source

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

lihongxiao il y a 2 ans
Parent
commit
fbb8cf90f2

+ 15 - 0
src/http/moudules/expense.js

@@ -6,6 +6,14 @@ import axios from '../axios'
  * 
  */
 
+//报表查看
+export const invAccountLook = (data) => {
+    return axios({
+        url: '/invAccount/look',
+        method: "post",
+        data
+    })
+}
 //导出账户信息
 export const updateAccountExcel = (data) => {
     return axios({
@@ -245,6 +253,13 @@ export const getAccountOperateDetail = (id) => {
         method: "get"
     })
 }
+//撤销账户记录详情
+export const accountOperateDelete = (id) => {
+    return axios({
+        url: '/accountOperate/delete?accountOperateId='+id,
+        method: "get"
+    })
+}
 
 
 

+ 14 - 1
src/http/moudules/task.js

@@ -785,4 +785,17 @@ export const SettlementDeletes = (data) => {
     data
   })
 }
-
+//获取应收模板
+export const sourceTemplate = () => {
+  return axios({
+    url: "/InsReceivable/getAccountsReceivable",
+    method: "get",
+  })
+}
+//获取结算模板
+export const settlementTemplate = () => {
+  return axios({
+    url: "/InsReceivable/getSettlement",
+    method: "get",
+  })
+}

+ 11 - 0
src/utils/moneyTransition.js

@@ -1,3 +1,14 @@
+/**
+ * 数字转为正整数
+ * @param {*} num 
+ * @returns 
+ */
+export function convertPositive(num){
+  if(num<0){
+    num=num*-1;
+  }
+  return num;
+}
 /**
  * 数字钱转大写(最多可转小数点后两位小数)
  * @param {*} amount

+ 133 - 141
src/views/FinancialManagement/ExpenseManagement/ExpenseApplyFor.vue

@@ -75,13 +75,16 @@
       :columns="columns"
       editButtonName="编辑"
       button1Name="删除"
+      button2Name="查看"
+      button2Background="#409eff"
       :showBatchDelete="false"
       :showBatchPrint="true"
       :showOperation="true"
       @findPage="findPage"
       :isshowpagination="true"
-      @handleEdit="expendEdit"
+      @handleEdit="expendEdit($event, 1)"
       @handleButton1="expendDelete"
+      @handleButton2="expendEdit($event, 2)"
       @selectionChange="selectionChange"
     ></kt-common-table>
     <!-- 申请资金弹框 -->
@@ -101,6 +104,7 @@
           label-width="130px"
           size="small"
           class="tableForm"
+          :disabled="formDisable"
         >
           <el-row>
             <el-col :span="12">
@@ -327,9 +331,13 @@
       </div>
       <div slot="footer" class="dialog-footer">
         <el-button @click="resetForm" size="small">取 消</el-button>
-        <el-button type="primary" @click="submitForm" size="small">{{
-          buttonValue
-        }}</el-button>
+        <el-button
+          v-if="!formDisable"
+          type="primary"
+          @click="submitForm"
+          size="small"
+          >{{ buttonValue }}</el-button
+        >
       </div>
     </el-dialog>
     <!-- <el-dialog
@@ -360,7 +368,7 @@
 import ExpenseComponent from "./ExpenseComponent.vue"; //新增账户信息弹框
 // import ExpenseManagement from "./ExpenseManagement.vue"; //新增账户信息
 import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
-import { toChies } from "../../../utils/moneyTransition";
+import { toChies, convertPositive } from "../../../utils/moneyTransition";
 export default {
   name: "ExpenseApplyFor",
   components: { KtCommonTable, ExpenseComponent },
@@ -374,10 +382,11 @@ export default {
       }
     };
     return {
+      formDisable: false, //资金申请form表单是否可选状态
       expentList: [], //批量导出数据
       expenseaaa: true,
       expendTitle: "新增资金使用申请单", //弹框标题
-      operationWidth: 200, //操作单元格宽度
+      operationWidth: 250, //操作单元格宽度
       queryFrom: {}, //查询form表单
       pageRequest: {
         // 列表查询条件
@@ -590,45 +599,24 @@ export default {
         bigApplyAmount: "", //大写金额
         payMethod: [], //支付方式
       },
-      profitObj: {
-        outProfitValue: "", //支出资金归属
-        outProfitName: "", //支出利润
-        entProfitValue: "", //收入资金归属
-        entProfitName: "", //收入利润
-      },
     };
   },
   watch: {
     expenseDialog(n) {
       if (!n) {
-        this.tableForm = {
-          company: "", //单位
-          applicant: "", //申请人
-          applySector: "", //申请部门
-          applyTime: "", //申请日期
-          collectionMessage: "", //收款单位信息
-          fundFlow: "", //资金流程
-          fundUse: "", //资金用途
-          remark: "", //备注
-          applyAmount: "", //申请金额
-          bigApplyAmount: "", //大写金额
-          payMethod: [], //支付方式
-        };
-        this.profitObj = {
-          outProfitValue: "", //支出资金归属
-          outProfitName: "", //支出利润
-          entProfitValue: "", //收入资金归属
-          entProfitName: "", //收入利润
-        };
-        this.tableForm.payMethod = [
-          this.payment_methodsData.find((item) => item.value == 2).label,
-        ];
+        this.formDisable = false;
+        this.$refs.tableForm.resetFields();
+        // this.tableForm.payMethod = [
+        //   this.payment_methodsData.find((item) => item.value == 2).label,
+        // ];
+        //清除支出收入方资金归属值
         this.affiliationData.forEach((item) => {
           item.profit = 0;
         });
         this.affiliationData2.forEach((item) => {
           item.profit = 0;
         });
+        //清除支出收入方资金归属值
         this.expendDataId = "";
       }
     },
@@ -662,7 +650,7 @@ export default {
         }
       });
     },
-    //导出
+    //导出公共方法
     expendDataup(e, idList) {
       idList = idList || this.expentList;
       this.$api.expense.excel(idList).then((response) => {
@@ -685,15 +673,19 @@ export default {
           this.$message.error(response.msg);
         }
       });
-      // }
     },
     //点击编辑按钮
-    expendEdit(index) {
+    expendEdit(index, type) {
       let row = index.row;
-      if (row.transferFlag == 0) {
-        this.$message.error("已转账数据不能操作");
-        return;
+      if (type == 1) {
+        if (row.transferFlag == 0) {
+          this.$message.error("已转账数据不能操作");
+          return;
+        }
+      } else {
+        this.formDisable = true;
       }
+
       this.expendDataId = row.excelAccountOperateId;
       this.$api.expense
         .getAccountExcelById(row.excelAccountOperateId)
@@ -711,14 +703,14 @@ export default {
             for (let key in res.data.outProfit) {
               this.affiliationData2.forEach((item) => {
                 if (item.profitEng == key) {
-                  item.profit = res.data.outProfit[key];
+                  item.profit = convertPositive(res.data.outProfit[key] * -1);
                 }
               });
             }
             for (let key in res.data.entProfit) {
               this.affiliationData.forEach((item) => {
                 if (item.profitEng == key) {
-                  item.profit = res.data.entProfit[key];
+                  item.profit = convertPositive(res.data.entProfit[key]);
                 }
               });
             }
@@ -806,109 +798,109 @@ export default {
         .then(data != null ? data.callback : "");
     },
     //选择证书有效日期区间
-    setDateInterval(e) {
-      if (e != null && e != "") {
-        this.formData.startCertExpirationDate = e[0];
-        this.formData.endCertExpirationDate = e[1];
-      } else {
-        this.formData.startCertExpirationDate = "";
-        this.formData.endCertExpirationDate = "";
-      }
-    },
+    // setDateInterval(e) {
+    //   if (e != null && e != "") {
+    //     this.formData.startCertExpirationDate = e[0];
+    //     this.formData.endCertExpirationDate = e[1];
+    //   } else {
+    //     this.formData.startCertExpirationDate = "";
+    //     this.formData.endCertExpirationDate = "";
+    //   }
+    // },
     //新增用户信息提交
-    submitUserForm() {
-      let params = JSON.parse(JSON.stringify(this.formData));
-      delete params.certExpirationDate;
-      //新增
-      this.$api.expense.insertAccount(params).then((res) => {
-        if (res.code == 200) {
-          this.$message({
-            message: "添加成功",
-            type: "success",
-          });
-        } else {
-          this.$message({
-            message: `添加失败, ${res.msg}`,
-            type: "error",
-          });
-        }
-        this.getAllUser();
-        this.closeForm();
-      });
-    },
+    // submitUserForm() {
+    //   let params = JSON.parse(JSON.stringify(this.formData));
+    //   delete params.certExpirationDate;
+    //   //新增
+    //   this.$api.expense.insertAccount(params).then((res) => {
+    //     if (res.code == 200) {
+    //       this.$message({
+    //         message: "添加成功",
+    //         type: "success",
+    //       });
+    //     } else {
+    //       this.$message({
+    //         message: `添加失败, ${res.msg}`,
+    //         type: "error",
+    //       });
+    //     }
+    //     this.getAllUser();
+    //     this.closeForm();
+    //   });
+    // },
     //弹框重新赋值
-    outChange(e) {
-      if (e == 1) {
-        this.formData = {
-          outerFlag: e, //账户类别
-          accountName: this.formData.accountName, //户名
-          accountQuality: this.formData.accountQuality, //账户性质
-          bankCardNum: this.formData.bankCardNum, //银行卡号
-          bank: this.formData.bank, //开户行
-        };
-      } else {
-        this.formData = {
-          outerFlag: e, //账户类别
-          accountName: this.formData.accountName, //户名
-          accountQuality: this.formData.accountQuality, //账户性质
-          bankCardNum: this.formData.bankCardNum, //银行卡号
-          bank: this.formData.bank, //开户行
-          bankName: "", //开户行名称
-          bankNum: "", //开户行号
-          certExpirationDate: "", //证书有效期
-          clearingProfit: "", //结算卡
-          dayStrokeNum: "", //单日转账笔数限制
-          exteriorProfit: "", //外部过账金额
-          fiscalProfit: "", //财税公司利润
-          insuranceProfit: "", //保险公司回款
-          otherProfit: "", //其他利润
-          parkProfit: "", //园区利润
-          priDayLines: "", //对私单日限额
-          priSingleLines: "", //对私单笔限额
-          priYearExcess: "", //对私年剩余额度
-          priYearLines: "", //对私年额度
-          pubDayLines: "", //对公单日限额
-          pubSingleLines: "", //对公单笔限额
-          pubYearExcess: "", //对公年剩余额度
-          pubYearLines: "", //对公年额度
-          tianqinProfit: "", //天勤利润
-        };
-      }
-    },
+    // outChange(e) {
+    //   if (e == 1) {
+    //     this.formData = {
+    //       outerFlag: e, //账户类别
+    //       accountName: this.formData.accountName, //户名
+    //       accountQuality: this.formData.accountQuality, //账户性质
+    //       bankCardNum: this.formData.bankCardNum, //银行卡号
+    //       bank: this.formData.bank, //开户行
+    //     };
+    //   } else {
+    //     this.formData = {
+    //       outerFlag: e, //账户类别
+    //       accountName: this.formData.accountName, //户名
+    //       accountQuality: this.formData.accountQuality, //账户性质
+    //       bankCardNum: this.formData.bankCardNum, //银行卡号
+    //       bank: this.formData.bank, //开户行
+    //       bankName: "", //开户行名称
+    //       bankNum: "", //开户行号
+    //       certExpirationDate: "", //证书有效期
+    //       clearingProfit: "", //结算卡
+    //       dayStrokeNum: "", //单日转账笔数限制
+    //       exteriorProfit: "", //外部过账金额
+    //       fiscalProfit: "", //财税公司利润
+    //       insuranceProfit: "", //保险公司回款
+    //       otherProfit: "", //其他利润
+    //       parkProfit: "", //园区利润
+    //       priDayLines: "", //对私单日限额
+    //       priSingleLines: "", //对私单笔限额
+    //       priYearExcess: "", //对私年剩余额度
+    //       priYearLines: "", //对私年额度
+    //       pubDayLines: "", //对公单日限额
+    //       pubSingleLines: "", //对公单笔限额
+    //       pubYearExcess: "", //对公年剩余额度
+    //       pubYearLines: "", //对公年额度
+    //       tianqinProfit: "", //天勤利润
+    //     };
+    //   }
+    // },
     //弹框取消重置
-    closeForm() {
-      this.dialogFormVisible = false;
-      this.formData = {
-        outerFlag: "0", //账户类别
-        accountName: "", //户名
-        accountQuality: "", //账户性质
-        bankCardNum: "", //银行卡号
-        bank: "", //开户行
-        bankName: "", //开户行名称
-        bankNum: "", //开户行号
-        certExpirationDate: "", //证书有效期
-        clearingProfit: "", //结算卡
-        dayStrokeNum: "", //单日转账笔数限制
-        exteriorProfit: "", //外部过账金额
-        fiscalProfit: "", //财税公司利润
-        insuranceProfit: "", //保险公司回款
-        otherProfit: "", //其他利润
-        parkProfit: "", //园区利润
-        priDayLines: "", //对私单日限额
-        priSingleLines: "", //对私单笔限额
-        priYearExcess: "", //对私年剩余额度
-        priYearLines: "", //对私年额度
-        pubDayLines: "", //对公单日限额
-        pubSingleLines: "", //对公单笔限额
-        pubYearExcess: "", //对公年剩余额度
-        pubYearLines: "", //对公年额度
-        tianqinProfit: "", //天勤利润
-      };
-    },
+    // closeForm() {
+    //   this.dialogFormVisible = false;
+    //   this.formData = {
+    //     outerFlag: "0", //账户类别
+    //     accountName: "", //户名
+    //     accountQuality: "", //账户性质
+    //     bankCardNum: "", //银行卡号
+    //     bank: "", //开户行
+    //     bankName: "", //开户行名称
+    //     bankNum: "", //开户行号
+    //     certExpirationDate: "", //证书有效期
+    //     clearingProfit: "", //结算卡
+    //     dayStrokeNum: "", //单日转账笔数限制
+    //     exteriorProfit: "", //外部过账金额
+    //     fiscalProfit: "", //财税公司利润
+    //     insuranceProfit: "", //保险公司回款
+    //     otherProfit: "", //其他利润
+    //     parkProfit: "", //园区利润
+    //     priDayLines: "", //对私单日限额
+    //     priSingleLines: "", //对私单笔限额
+    //     priYearExcess: "", //对私年剩余额度
+    //     priYearLines: "", //对私年额度
+    //     pubDayLines: "", //对公单日限额
+    //     pubSingleLines: "", //对公单笔限额
+    //     pubYearExcess: "", //对公年剩余额度
+    //     pubYearLines: "", //对公年额度
+    //     tianqinProfit: "", //天勤利润
+    //   };
+    // },
     //新增账户信息
-    addUserFn() {
-      this.dialogFormVisible = true;
-    },
+    // addUserFn() {
+    //   this.dialogFormVisible = true;
+    // },
     //获取所有账户信息
     getAllUser() {
       this.$api.expense.getAccountByAccountName().then((res) => {

+ 5 - 29
src/views/FinancialManagement/ExpenseManagement/ExpenseComponent.vue

@@ -384,34 +384,7 @@ export default {
     },
     formData: {
       type: Object,
-      default: {
-        outerFlag: "0", //账户类别
-        accountName: "", //户名
-        businessQuality: "0", //营业性质
-        establishTime: "", //成立日期
-        invoicingAmount: 0, //开票额度
-        juridicalPerson: "", //法人
-        owned: "", //所属地
-        accountQuality: "", //账户性质
-        bankCardNum: "", //银行卡号
-        bank: "", //开户行
-        bankName: "", //开户行名称
-        bankNum: "", //开户行号
-        certExpirationDate: "", //证书有效期
-        dayStrokeNum: "", //单日转账笔数限制
-        priDayLines: "", //对私单日限额
-        priSingleLines: "", //对私单笔限额
-        priYearExcess: "", //对私年剩余额度
-        priYearLines: "", //对私年额度
-        pubDayLines: "", //对公单日限额
-        pubSingleLines: "", //对公单笔限额
-        pubYearExcess: "", //对公年剩余额度
-        pubYearLines: "", //对公年额度
-        dayStrokeNumExcess: "", //单日转账笔数剩余
-        priDayLinesExcess: "", //对私单日限额剩余
-        pubDayLinesExcess: "", //对公单日限额剩余
-        spend: "", //	支出金额
-      },
+      default: {},
     },
   },
   data() {
@@ -469,6 +442,9 @@ export default {
   },
   mounted() {},
   methods: {
+    cleanForm(){
+      this.$refs.formData.resetFields()
+    },
     //账户类别change事件
     outChange(e) {
       this.$nextTick(() => {
@@ -508,7 +484,7 @@ export default {
 };
 </script>
 <style scoped>
-/deep/ .el-dialog__body {
+.dialog >>> .el-dialog__body {
   overflow-y: scroll;
   max-height: 500px;
 }

+ 47 - 86
src/views/FinancialManagement/ExpenseManagement/ExpenseManagement.vue

@@ -433,7 +433,8 @@ export default {
       collectionData: [], //收入  转账方下拉菜单数组
       fundFlowData: [], //资金用途字典数据
       payment_methodsData: [], //收入  支付方式字典数据
-      inComeFormData: {//收入form表单
+      inComeFormData: {
+        //收入form表单
         collectionMessage: "", //收款名字
         fundFlow: "", //资金流向
         applyAmount: "", //金额
@@ -442,7 +443,8 @@ export default {
         payMethod: [], //转账方
         fundUse: "", //资金用途
       },
-      inComeFormRules: {//收入规则
+      inComeFormRules: {
+        //收入规则
         company: [
           { required: true, message: "转账方不能为空", trigger: "change" },
         ],
@@ -460,7 +462,8 @@ export default {
       operationWidth: 200, //操作列宽度
       account_qualityData: [], //账户性质数据字典
       nature_businessData: [], //营业性质数据字典
-      queryFrom: {//查询条件
+      queryFrom: {
+        //查询条件
         bankCardNum: "", //银行卡号查询
         accountName: "", //户名查询
       },
@@ -469,7 +472,8 @@ export default {
       button2Name: "收入",
       expendButton1Name: "确认已转账",
       formDataId: "", //数据Id
-      pageRequest: {// 列表查询条件
+      pageRequest: {
+        // 列表查询条件
         pageNo: 1,
         pageSize: 20,
       },
@@ -548,7 +552,8 @@ export default {
           sortable: false,
         },
       ],
-      childColums: [//卡表格数据列
+      childColums: [
+        //卡表格数据列
         {
           prop: "accountQualityName",
           label: "账户性质",
@@ -561,11 +566,11 @@ export default {
           minWidth: 170,
           sortable: false,
         },
-        { 
-         prop: "bank",
-         label: "开户行", 
-         minWidth: 300, 
-         sortable: false 
+        {
+          prop: "bank",
+          label: "开户行",
+          minWidth: 300,
+          sortable: false,
         },
         {
           prop: "bankName",
@@ -573,11 +578,11 @@ export default {
           minWidth: 300,
           sortable: false,
         },
-        { 
+        {
           prop: "bankNum",
           label: "开户行号",
           minWidth: 150,
-          sortable: false
+          sortable: false,
         },
         {
           prop: "balance",
@@ -715,7 +720,8 @@ export default {
       /**
        * 支出模块
        */
-      expendColumns: [//支出表格数据列
+      expendColumns: [
+        //支出表格数据列
         {
           prop: "company",
           label: "转账方",
@@ -747,7 +753,8 @@ export default {
           sortable: false,
         },
       ],
-      expendPageResult: {//支出表格参数
+      expendPageResult: {
+        //支出表格参数
         pageNo: 1,
         pageSize: 10,
       },
@@ -769,16 +776,8 @@ export default {
     incomeDialogVisible(n) {
       if (n == false) {
         this.enterCardId = "";
-        this.$refs.inComeFormData.clearValidate();
-        this.inComeFormData = {
-          //收入form数据
-          collectionMessage: "", //收款名字
-          fundFlow: "", //资金流向
-          applyAmount: "", //金额
-          bigApplyAmount: "", //大写金额
-          company: "", //转账方
-          payMethod: [], //支付方式
-        };
+        this.$refs.inComeFormData.resetFields();
+        this.inComeFormData.applyAmount = 0;
       }
     },
   },
@@ -797,6 +796,17 @@ export default {
         }
       });
     },
+    //导出公共方法
+    expendFun(data) {
+      let url = process.env.BASE_URL + "/upload/" + data; // 3.创建一个临时的url指向blob对象
+      // 4.创建url之后可以模拟对此文件对象的一系列操作,例如:预览、下载
+      let a = document.createElement("a");
+      a.href = url;
+      a.download = "导出订单.xlsx";
+      a.click();
+      // 5.释放这个临时的对象url
+      window.URL.revokeObjectURL(url);
+    },
     //账户信息导出
     userInfoExpentData() {
       this.$api.expense.updateAccountExcel(this.queryFrom).then((res) => {
@@ -805,14 +815,7 @@ export default {
             this.$message.error("暂无导出数据,请重试!");
             return;
           }
-          let url = process.env.BASE_URL + "/upload/" + res.data; // 3.创建一个临时的url指向blob对象
-          // 4.创建url之后可以模拟对此文件对象的一系列操作,例如:预览、下载
-          let a = document.createElement("a");
-          a.href = url;
-          a.download = "导出订单.xlsx";
-          a.click();
-          // 5.释放这个临时的对象url
-          window.URL.revokeObjectURL(url);
+          this.expendFun(res.data)
         } else {
           this.$message.error(res.msg);
         }
@@ -826,14 +829,7 @@ export default {
             this.$message.error("暂无导出数据,请重试!");
             return;
           }
-          let url = process.env.BASE_URL + "/upload/" + res.data; // 3.创建一个临时的url指向blob对象
-          // 4.创建url之后可以模拟对此文件对象的一系列操作,例如:预览、下载
-          let a = document.createElement("a");
-          a.href = url;
-          a.download = "导出订单.xlsx";
-          a.click();
-          // 5.释放这个临时的对象url
-          window.URL.revokeObjectURL(url);
+          this.expendFun(res.data)
         } else {
           this.$message.error(res.msg);
         }
@@ -927,10 +923,10 @@ export default {
     //选择收款单位change事件
     companyChange(val) {
       const item = this.collectionData.find((item) => item.nameValue === val);
-      if(item.outerFlag==0&&item.bankCardNum!=this.enterCardId){
-        this.$message.error('转账方必须为外部账户或与收款方账户一致')
-        this.inComeFormData.company=""
-        return
+      if (item.outerFlag == 0 && item.bankCardNum != this.enterCardId) {
+        this.$message.error("转账方必须为外部账户或与收款方账户一致");
+        this.inComeFormData.company = "";
+        return;
       }
       this.companyItem = item;
     },
@@ -940,10 +936,12 @@ export default {
       obj.enterCardId = this.enterCardId; //收入银行卡号
       obj.outCardId = this.companyItem.bankCardNum; //支出银行卡号
       obj.fundFlow = obj.company + "→" + obj.collectionMessage; //资金流向
-      obj.payMethod = obj.payMethod.join(",");//支付方式
+      obj.payMethod = obj.payMethod.join(","); //支付方式
       obj.revenueOutlay = "0";
-      obj.fundUse = this.inComeFormData.fundUse[this.inComeFormData.fundUse.length - 2]; //资金用途
-      obj.fundFen = this.inComeFormData.fundUse[this.inComeFormData.fundUse.length - 1]; //资金用途分项
+      obj.fundUse =
+        this.inComeFormData.fundUse[this.inComeFormData.fundUse.length - 2]; //资金用途
+      obj.fundFen =
+        this.inComeFormData.fundUse[this.inComeFormData.fundUse.length - 1]; //资金用途分项
       //转化资金归属
       obj.entProfit = {};
       obj.outProfit = {};
@@ -1015,7 +1013,7 @@ export default {
           this.expendPageResult = {
             content: res.data.records,
             pageNum: res.data.current,
-            pageSize: res.data.size, 
+            pageSize: res.data.size,
             totalPages: res.data.pages,
             totalSize: res.data.total,
           };
@@ -1175,44 +1173,7 @@ export default {
     resetForm() {
       this.dialogFormVisible = false;
       this.formDataId = "";
-      //账户信息form值清空
-      if (this.type == 1) { 
-        this.accountFormData = {
-          outerFlag: "0", //账户类别
-          accountName: "", //户名
-          businessQuality: "", //营业性质
-          establishTime: "", //成立日期
-          invoicingAmount: 0, //开票额度
-          juridicalPerson: "", //法人
-          owned: "", //所属地
-          tentativeEstimates: "", //暂估值
-        };
-      } else {
-        this.accountCardFormData = {
-          accountQuality: "", //账户性质
-          bankCardNum: "", //银行卡号
-          bank: "", //开户行
-          bankName: "", //开户行名称
-          bankNum: "", //开户行号
-          balance: 0, //余额
-          certExpirationDate: "", //证书有效期
-          dayStrokeNum: 0, //单日转账笔数限制
-          dayStrokeNumExcess: 0, //单日转账笔数剩余
-          fiscalProfit: 0, //	财务公司利润
-          insuranceProfit: 0, //保险公司回款
-          priDayLines: 0, //对私单日限额
-          priDayLinesExcess: 0, //对私单日限额剩余
-          priSingleLines: 0, //对私单笔限额
-          priYearExcess: 0, //对私年剩余额度
-          priYearLines: 0, //对私年额度
-          pubDayLines: 0, //对公单日限额
-          pubDayLinesExcess: 0, //对公单日限额剩余
-          pubSingleLines: 0, //对公单笔限额
-          pubYearExcess: 0, //对公年剩余额度
-          pubYearLines: 0, //对公年额度
-          spend: 0, //支出金额
-        };
-      }
+      this.$refs.expenseComponent.cleanForm();
     },
     //卡信息修改事件
     childEdit(row) {

+ 2 - 6
src/views/FinancialManagement/ExpenseManagement/ExpenseMessage.vue

@@ -208,7 +208,6 @@ export default {
       this.dialogFormVisible = false;
       this.$refs.formData.resetFields();
     },
-    handleTableDelete(index) {},
     //新增取消重置
     resetForm(formData) {
       this.dialogFormVisible = false;
@@ -242,12 +241,12 @@ export default {
             this.$api.expense.updateAccountExpenses(params).then((res) => {
               if (res.code == 200) {
                 this.$message({
-                  message: "添加成功",
+                  message: "编辑成功",
                   type: "success",
                 });
               } else {
                 this.$message({
-                  message: `添加失败, ${res.msg}`,
+                  message: `编辑失败, ${res.msg}`,
                   type: "error",
                 });
               }
@@ -352,9 +351,6 @@ export default {
   align-items: center;
   font-size: 25px;
   margin-top: 10px;
-  /* position: absolute;
-    bottom:0;
-    left: 0; */
 }
 .addremove-box > i {
   cursor: pointer;

+ 2 - 0
src/views/FinancialManagement/ExpenseManagement/PaymentManagement.vue

@@ -675,12 +675,14 @@ export default {
           rate: 0, //税率
           payMethod: [], //支付方式
         };
+        //支出收入资金归属值清空
         this.affiliationData.forEach((item) => {
           item.profit = 0;
         });
         this.affiliationData2.forEach((item) => {
           item.profit = 0;
         });
+        //支出收入资金归属值清空
         this.formDataId = "";
         this.$nextTick(() => {
           this.$refs.formData.clearValidate();

+ 0 - 1
src/views/FinancialManagement/ExpenseManagement/Profit.vue

@@ -116,7 +116,6 @@
     <script>
 import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
 import KtButton from "@/views/Core/KtButton"; // 按钮权限组件
-import CommonUtil from "@/utils/comutil.js";
 
 export default {
   name: "ExpenseMessage",

+ 225 - 0
src/views/FinancialManagement/ExpenseManagement/ReportViewing.vue

@@ -0,0 +1,225 @@
+<template>
+  <!--布局容器-->
+  <div class="container" style="width: 99%; margin-top: 0px">
+    <!-- 顶部查询 -->
+    <el-row class="top">
+      <el-form
+        v-model="pageRequest"
+        size="small"
+        label-width="95px"
+        class="form"
+      >
+        <el-form-item label="账户类别" label-width="95px" prop="outerFlag">
+          <el-select
+            v-model="pageRequest.outerFlag"
+            placeholder="请选择账户类别"
+            clearable
+          >
+            <el-option label="内部账户" value="0"></el-option>
+            <el-option label="外部账户" value="1"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="户名" label-width="95px" prop="invCompanyName">
+          <el-input
+            v-model="pageRequest.accountName"
+            placeholder="请输入户名"
+            class="widths"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" size="small" @click="queryStaffInfo"
+            >查询</el-button
+          >
+        </el-form-item>
+      </el-form>
+    </el-row>
+    <!-- 表格 -->
+    <kt-common-table
+      v-loading="loading"
+      element-loading-text="玩命加载中~"
+      element-loading-spinner="el-icon-loading"
+      :operationWidth="operationWidth"
+      class="ktTable"
+      permsEdit="sys:agent:view"
+      ref="dataTable"
+      :data="pageResult"
+      :columns="columns"
+      :showBatchDelete="false"
+      :showOperation="false"
+      @findPage="findPage"
+      :isshowpagination="false"
+    ></kt-common-table>
+  </div>
+</template>
+      <script>
+import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
+import KtButton from "@/views/Core/KtButton"; // 按钮权限组件
+
+export default {
+  name: "InvoiceInformation",
+  components: { KtCommonTable, KtButton },
+  created() {
+    this.business();
+  },
+  mounted() {},
+  data() {
+    return {
+      showStatus: true,
+      loading: true,
+      operationWidth: 100, //操作列宽度
+      pageResult: {}, //表格参数
+      pageRequest: {
+        // 列表查询条件
+        pageNo: 1,
+        pageSize: 10,
+        company: "",
+        fundUse: "",
+        revenueOutlay: "",
+      },
+      columns: [
+        // 数据列
+      ],
+      dictionariesData: [], //账户性质数据字典
+    };
+  },
+  methods: {
+    /**
+     * 页面查询
+     */
+    queryStaffInfo() {
+      if(this.showStatus==false){
+        return
+      }
+      this.showStatus = false;
+      this.findPage();
+    },
+    /**
+     * 获取页面数据
+     */
+    findPage(data) {
+      // 
+      this.loading = true
+      if (data && data.pageRequest) {
+        this.pageRequest.pageNo = data.pageRequest.pageNum;
+        this.pageRequest.pageSize = data.pageRequest.pageSize;
+      }
+      
+      this.$api.expense
+        .invAccountLook(this.pageRequest)
+        .then((res) => {
+          if (res.code == 200) {
+            this.columns = [];
+            res.data.head.forEach((item) => {
+              this.columns.push({
+                prop: item.eng,
+                label: item[item.eng],
+                minWidth: "100",
+                sortable: false,
+              });
+            });
+            this.pageResult.content = res.data.maps;
+          } else {
+            this.$message.error(res.msg);
+          }
+          this.showStatus = true;
+          this.loading = false
+        })
+        .then(data != null ? data.callback : "");
+    },
+    /**
+     * 数据字典
+     */
+    business() {
+      let typeName = "account_quality";
+      this.$api.dict.findByLableName(typeName).then((res) => {
+        this.dictionariesData = res.data;
+      });
+    },
+  },
+};
+</script>
+      
+      <style scoped>
+.operation {
+  margin-left: 14px !important;
+  margin-top: 15px !important ;
+}
+.form {
+  display: flex;
+  margin-top: 14px;
+  align-items: center;
+  margin-left: -12px;
+  margin-bottom: 20px;
+}
+.el-pagination {
+  font-weight: normal;
+}
+.el-card__body {
+  padding: 12px !important;
+}
+.footer .footerdiv {
+  display: flex;
+  align-items: center;
+}
+.container .el-form-item {
+  margin-bottom: -14px !important;
+}
+.form .el-form-item__label {
+  font-size: 15px !important;
+  font-weight: 600 !important;
+}
+
+.ktTable {
+  margin-top: 20px;
+}
+.el-row {
+  margin-top: 18px;
+}
+.top {
+  margin-top: 0px;
+}
+
+.el-date-editor--daterange.el-input__inner {
+  width: 300px;
+}
+/deep/ .el-select--small {
+  width: 100%;
+}
+.frame {
+  width: 100%;
+  background-color: #fff;
+  padding: 20px;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  margin-bottom: 15px;
+  border-radius: 6px;
+  border: 1px solid #ebeef5;
+  -webkit-transition: all 0.2s ease-in-out;
+  transition: all 0.2s ease-in-out;
+  -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+}
+/deep/ .el-dialog__body {
+  overflow-y: scroll;
+  max-height: 500px;
+}
+.addremove-box {
+  width: 100%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  font-size: 25px;
+  margin-top: 10px;
+  /* position: absolute;
+        bottom:0;
+        left: 0; */
+}
+.addremove-box > i {
+  cursor: pointer;
+}
+.frame >>> .el-date-editor {
+  width: 100%;
+}
+</style>
+      

+ 31 - 17
src/views/FinancialManagement/ExpenseManagement/TransferRecord.vue

@@ -36,7 +36,7 @@
           ></el-input>
         </el-form-item>
         <el-form-item>
-          <el-button type="primary" size="small" @click="queryStaffInfo"
+          <el-button type="primary" size="small" @click="findPage"
             >查询</el-button
           >
         </el-form-item>
@@ -58,8 +58,11 @@
       ref="dataTable"
       :data="pageResult"
       :columns="columns"
+      button3Name="撤销"
+      button3Background="#f56c6c"
+      @handleButton3="handleTableDelete"
       :showBatchDelete="false"
-      :showOperation="false"
+      :showOperation="true"
       @findPage="findPage"
       :isshowpagination="true"
     ></kt-common-table>
@@ -78,22 +81,16 @@ export default {
   mounted() {},
   data() {
     return {
-      operationWidth: 200, //操作列宽度
-      queryFrom: {
-        //查询条件
-        revenueOutlay: "",
-      },
+      operationWidth: 100, //操作列宽度
       pageResult: {}, //表格参数
-      pageRequest: {
-        // 列表查询条件
+      pageRequest: {  // 列表查询条件
         pageNo: 1,
         pageSize: 10,
         company: "",
         fundUse: "",
         revenueOutlay: "",
       },
-      columns: [
-        // 数据列
+      columns: [  // 数据列
         {
           prop: "revenueOutlayName",
           label: "转账类型",
@@ -131,6 +128,29 @@ export default {
     };
   },
   methods: {
+    /**
+     * 撤销转账记录
+     */
+     handleTableDelete(index) {
+      let row = index.row;
+      console.log(row);
+      this.$confirm("确认撤销该  “"+row.revenueOutlayName+"”  记录吗?", "提示", {
+        type: "warning",
+      })
+        .then(() => {
+          this.$api.expense
+            .accountOperateDelete(row.accountOperateId)
+            .then((res) => {
+              if (res.code == 200) {
+                this.$message.success("撤销成功");
+                this.findPage();
+              } else {
+                this.$message.error(res.msg);
+              }
+            });
+        })
+        .catch(() => {});
+    },
     /**
      * 导出
      */
@@ -197,12 +217,6 @@ export default {
         this.dictionariesData = res.data;
       });
     },
-    /**
-     * 查询
-     */
-    queryStaffInfo() {
-      this.findPage();
-    },
   },
 };
 </script>

+ 67 - 227
src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/SettlementSource.vue

@@ -1,330 +1,153 @@
 <template>
   <div>
     <div class="p-2">
-      <el-form
-        :inline="true"
-        :model="pageRequest"
-        size="small"
-        label-width="120px"
-      >
+      <el-form :inline="true" :model="pageRequest" size="small" label-width="120px">
         <el-row>
           <el-col :span="6">
             <el-form-item label="车牌号:">
-              <el-input
-                v-model="pageRequest.licenseno"
-                placeholder="请输入车牌号"
-                class="widths"
-                clearable
-              ></el-input>
+              <el-input v-model="pageRequest.licenseno" placeholder="请输入车牌号" class="widths" clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="6">
             <el-form-item label="险种">
-              <el-input
-                v-model="pageRequest.insuranceType"
-                placeholder="请输入车牌号"
-                class="widths"
-                clearable
-              ></el-input>
+              <el-input v-model="pageRequest.insuranceType" placeholder="请输入车牌号" class="widths" clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="6">
             <el-form-item label="保险公司">
-              <el-select
-                v-model="pageRequest.insuranceId"
-                filterable
-                class="widths"
-                clearable
-              >
-                <el-option
-                  v-for="val in companyList"
-                  :key="val.id"
-                  :label="val.name"
-                  :value="val.id"
-                ></el-option>
+              <el-select v-model="pageRequest.insuranceId" filterable class="widths" clearable>
+                <el-option v-for="val in companyList" :key="val.id" :label="val.name" :value="val.id"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
 
           <el-col :span="6">
             <el-form-item label="交强保单号:">
-              <el-input
-                v-model="pageRequest.jqPolicyId"
-                placeholder="请输入交强保单号"
-                class="widths"
-                clearable
-              ></el-input>
+              <el-input v-model="pageRequest.jqPolicyId" placeholder="请输入交强保单号" class="widths" clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="6">
             <el-form-item label="商业保单号:">
-              <el-input
-                v-model="pageRequest.syPolicyId"
-                placeholder="请输入商业保单号"
-                class="widths"
-                clearable
-              ></el-input>
+              <el-input v-model="pageRequest.syPolicyId" placeholder="请输入商业保单号" class="widths" clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="6">
             <el-form-item label="非车保单号:">
-              <el-input
-                v-model="pageRequest.nonCarPolicyId"
-                placeholder="请输入非车保单号"
-                class="widths"
-                clearable
-              ></el-input>
+              <el-input v-model="pageRequest.nonCarPolicyId" placeholder="请输入非车保单号" class="widths" clearable></el-input>
             </el-form-item>
           </el-col>
 
           <el-col :span="6">
             <el-form-item label="渠道:">
-              <el-input
-                v-model="pageRequest.channel"
-                placeholder="请输入渠道"
-                class="widths"
-                clearable
-              ></el-input>
+              <el-input v-model="pageRequest.channel" placeholder="请输入渠道" class="widths" clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="6">
             <el-form-item label="渠道等级:">
-              <el-input
-                v-model="pageRequest.channelClassification"
-                placeholder="请输入渠道等级"
-                class="widths"
-                clearable
-              ></el-input>
+              <el-input v-model="pageRequest.channelClassification" placeholder="请输入渠道等级" class="widths"
+                clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="6">
             <el-form-item label="被保险人:">
-              <el-input
-                v-model="pageRequest.insuredName"
-                placeholder="请输入被保险人"
-                class="widths"
-                clearable
-              ></el-input>
+              <el-input v-model="pageRequest.insuredName" placeholder="请输入被保险人" class="widths" clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="6">
             <el-form-item label="结算时间:">
-              <el-date-picker
-                v-model="agencySettlementTime"
-                type="daterange"
-                @change="agencySettlementTimeChange"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                class="widths"
-                value-format="yyyy-MM-dd"
-                style="width: 220px"
-                clearable
-              >
+              <el-date-picker v-model="agencySettlementTime" type="daterange" @change="agencySettlementTimeChange"
+                start-placeholder="开始日期" end-placeholder="结束日期" class="widths" value-format="yyyy-MM-dd"
+                style="width: 220px" clearable>
               </el-date-picker>
             </el-form-item>
           </el-col>
 
           <el-col :span="6">
             <el-form-item label="签单日期">
-              <el-date-picker
-                v-model="signDateTime"
-                type="daterange"
-                @change="signDateChange"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                class="widths"
-                value-format="yyyy-MM-dd"
-                style="width: 220px"
-                clearable
-              >
+              <el-date-picker v-model="signDateTime" type="daterange" @change="signDateChange" start-placeholder="开始日期"
+                end-placeholder="结束日期" class="widths" value-format="yyyy-MM-dd" style="width: 220px" clearable>
               </el-date-picker>
             </el-form-item>
           </el-col>
         </el-row>
       </el-form>
       <div class="flex j-end" style="margin-right: 100px">
-        <el-button
-          type="primary"
-          size="small"
-          @click="Search"
-          style="margin-right: 20px"
-          >查询</el-button
-        >
-        <el-upload
-          class="upload-demo"
-          :auto-upload="false"
-          :on-change="writeOffUpload"
-          action="###"
-          :show-file-list="false"
-        >
+        <el-button type="danger" size="small" @click="templateDownload" style="margin-right: 20px">下载模板</el-button>
+        <el-button type="primary" size="small" @click="Search" style="margin-right: 20px">查询</el-button>
+        <el-upload class="upload-demo" :auto-upload="false" :on-change="writeOffUpload" action="###"
+          :show-file-list="false">
           <el-button size="small" type="primary">数据导入</el-button>
         </el-upload>
       </div>
     </div>
     <el-main ref="elMain" style="padding: 0px">
-      <kt-common-table
-        :SerialShow="false"
-        :operationWidth="150"
-        :showOperation="true"
-        permsDelete="sys:user:delete"
-        :showBatchDelete="true"
-        :showBatchSettled="true"
-        :showBatchPrint="true"
-        permsButton1="sys:user:edit"
-        permsButton2="sys:user:edit"
-        permsButton3="sys:user:edit"
-        :data="pageResult"
-        :columns="columns"
-        @findPage="findPage"
-        keyName="id"
-        settledName="批量修改"
-        @handleSettled="handleTableSettled"
-        @handlePrint="handlePrint"
-        @handleDelete="handleDelete"
-        button1Name="修改"
-        button1Background="#E6A23C"
-        @handleButton1="sourceUpdate"
-        button1Icon=""
-      >
+      <kt-common-table :SerialShow="false" :operationWidth="150" :showOperation="true" permsDelete="sys:user:delete"
+        :showBatchDelete="true" :showBatchSettled="true" :showBatchPrint="true" permsButton1="sys:user:edit"
+        permsButton2="sys:user:edit" permsButton3="sys:user:edit" :data="pageResult" :columns="columns"
+        @findPage="findPage" keyName="id" settledName="批量修改" @handleSettled="handleTableSettled"
+        @handlePrint="handlePrint" @handleDelete="handleDelete" button1Name="修改" button1Background="#E6A23C"
+        @handleButton1="sourceUpdate" button1Icon="">
       </kt-common-table>
     </el-main>
     <el-dialog title="信息修改" :visible.sync="dialogFormVisible" v-dialogDrag :close-on-click-modal="false" width="60%">
-      <el-form
-        :model="updateform"
-        :inline="true"
-        label-width="130px"
-        size="small"
-      >
+      <el-form :model="updateform" :inline="true" label-width="130px" size="small">
         <el-form-item label="渠道:">
-          <el-input
-            v-model="updateform.channel"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="updateform.channel" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="车牌号:">
-          <el-input
-            v-model="updateform.licenseno"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="updateform.licenseno" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="被保险人:">
-          <el-input
-            v-model="updateform.insuredName"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="updateform.insuredName" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="险种:">
-          <el-input
-            v-model="updateform.insuranceType"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="updateform.insuranceType" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="业务归属:">
-          <el-input
-            v-model="updateform.businessOwner"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="updateform.businessOwner" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="交强保费:">
-          <el-input
-            v-model="updateform.jqPremiumTax"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="updateform.jqPremiumTax" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="商业保费:">
-          <el-input
-            v-model="updateform.syPremiumTax"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="updateform.syPremiumTax" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="非车保费:">
-          <el-input
-            v-model="updateform.nonCarPremiumTax"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="updateform.nonCarPremiumTax" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="交强应收比例:">
-          <el-input
-            v-model="updateform.compulsoryExportRatio"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="updateform.compulsoryExportRatio" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="商业应收比例:">
-          <el-input
-            v-model="updateform.commercialExportRatio"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="updateform.commercialExportRatio" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="非车应收比例:">
-          <el-input
-            v-model="updateform.nonVehicleExportRatio"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="updateform.nonVehicleExportRatio" autocomplete="off" class="widths"></el-input>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button size="small" @click="dialogFormVisible = false"
-          >取 消</el-button
-        >
-        <el-button size="small" type="primary" @click="updateSubmit"
-          >确 定</el-button
-        >
+        <el-button size="small" @click="dialogFormVisible = false">取 消</el-button>
+        <el-button size="small" type="primary" @click="updateSubmit">确 定</el-button>
       </div>
     </el-dialog>
     <el-dialog title="批量修改" :visible.sync="dialogUpdateVisible" v-dialogDrag :close-on-click-modal="false" width="60%">
-      <el-form
-        :model="batchSizeForm"
-        :inline="true"
-        label-width="130px"
-        size="small"
-      >
+      <el-form :model="batchSizeForm" :inline="true" label-width="130px" size="small">
         <el-form-item label="业务归属:">
-          <el-input
-            v-model="batchSizeForm.businessOwner"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="batchSizeForm.businessOwner" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="交强出口比例:">
-          <el-input
-            v-model="batchSizeForm.compulsoryExportRatio"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="batchSizeForm.compulsoryExportRatio" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="商业出口比例:">
-          <el-input
-            v-model="batchSizeForm.commercialExportRatio"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="batchSizeForm.commercialExportRatio" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="非车出口比例:">
-          <el-input
-            v-model="batchSizeForm.nonVehicleExportRatio"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="batchSizeForm.nonVehicleExportRatio" autocomplete="off" class="widths"></el-input>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button size="small" @click="dialogUpdateVisible = false"
-          >取 消</el-button
-        >
-        <el-button size="small" type="primary" @click="BulkUpdate"
-          >确 定</el-button
-        >
+        <el-button size="small" @click="dialogUpdateVisible = false">取 消</el-button>
+        <el-button size="small" type="primary" @click="BulkUpdate">确 定</el-button>
       </div>
     </el-dialog>
   </div>
@@ -420,8 +243,25 @@ export default {
   created() {
     this.companyInt();
   },
-  mounted() {},
+  mounted() { },
   methods: {
+    //模板下载
+    templateDownload() {
+      this.$api.task.settlementTemplate().then((res) => {
+        if (res.code == '200') {
+          let url = process.env.BASE_URL + res.data;
+          let a = document.createElement("a");
+          a.href = url;
+          a.click();
+          window.URL.revokeObjectURL(url);
+        } else {
+          this.$message({
+            type: 'error',
+            message: res.msg,
+          });
+        }
+      });
+    },
     signDateChange(e) {
       if (e == null) {
         this.pageRequest.signDate = "";
@@ -475,7 +315,7 @@ export default {
         if (res.data) {
           this.$alert(res.msg, "匹配提示", {
             confirmButtonText: "关闭",
-            callback: (action) => {},
+            callback: (action) => { },
           });
         } else {
         }

+ 129 - 438
src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/Source.vue

@@ -1,108 +1,53 @@
 <template>
   <div>
     <div class="p-2">
-      <el-form
-        :inline="true"
-        :model="pageRequest"
-        size="small"
-        label-width="120px"
-      >
+      <el-form :inline="true" :model="pageRequest" size="small" label-width="120px">
         <el-row>
           <el-col :span="6">
             <el-form-item label="车牌号">
-              <el-input
-                v-model="pageRequest.licenseno"
-                placeholder="请输入车牌号"
-                class="widths"
-                clearable
-              ></el-input>
+              <el-input v-model="pageRequest.licenseno" placeholder="请输入车牌号" class="widths" clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="6">
             <el-form-item label="险种">
-              <el-input
-                v-model="pageRequest.risk"
-                placeholder="请输入险种"
-                class="widths"
-                clearable
-              ></el-input>
+              <el-input v-model="pageRequest.risk" placeholder="请输入险种" class="widths" clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="6">
             <el-form-item label="保险公司">
-              <el-select
-                v-model="pageRequest.insuranceId"
-                filterable
-                class="widths"
-                clearable
-              >
-                <el-option
-                  v-for="val in companyList"
-                  :key="val.id"
-                  :label="val.name"
-                  :value="val.id"
-                ></el-option>
+              <el-select v-model="pageRequest.insuranceId" filterable class="widths" clearable>
+                <el-option v-for="val in companyList" :key="val.id" :label="val.name" :value="val.id"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="6">
             <el-form-item label="保司机构">
-              <el-input
-                v-model="pageRequest.insuranceDept"
-                placeholder="请输入保司机构"
-                class="widths"
-                clearable
-              ></el-input>
+              <el-input v-model="pageRequest.insuranceDept" placeholder="请输入保司机构" class="widths" clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="6">
             <el-form-item label="被保险人">
-              <el-input
-                v-model="pageRequest.insuredName"
-                placeholder="请输入被保险人"
-                class="widths"
-                clearable
-              ></el-input>
+              <el-input v-model="pageRequest.insuredName" placeholder="请输入被保险人" class="widths" clearable></el-input>
             </el-form-item>
           </el-col>
 
           <el-col :span="6">
             <el-form-item label="结算日期">
-              <el-date-picker
-                v-model="clearingTime"
-                type="daterange"
-                @change="clearingTimeChange"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                value-format="yyyy-MM-dd"
-                clearable
-                style="width: 250px"
-              >
+              <el-date-picker v-model="clearingTime" type="daterange" @change="clearingTimeChange"
+                start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" clearable style="width: 250px">
               </el-date-picker>
             </el-form-item>
           </el-col>
           <el-col :span="6">
             <el-form-item label="出单日期">
-              <el-date-picker
-                v-model="signingTime"
-                type="daterange"
-                @change="signingTimeChange"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                value-format="yyyy-MM-dd"
-                style="width: 250px"
-                clearable
-              >
+              <el-date-picker v-model="signingTime" type="daterange" @change="signingTimeChange" start-placeholder="开始日期"
+                end-placeholder="结束日期" value-format="yyyy-MM-dd" style="width: 250px" clearable>
               </el-date-picker>
             </el-form-item>
           </el-col>
           <el-col :span="6">
             <el-form-item label="结算状态">
-              <el-select
-                v-model="pageRequest.clearingState"
-                placeholder="请选择状态"
-                class="widths"
-              >
+              <el-select v-model="pageRequest.clearingState" placeholder="请选择状态" class="widths">
                 <el-option label="未结算" value="0"></el-option>
                 <el-option label="已结算" value="1"></el-option>
                 <el-option label="孤儿单" value="2"></el-option>
@@ -111,11 +56,7 @@
           </el-col>
           <el-col :span="6">
             <el-form-item label="保司结算状态">
-              <el-select
-                v-model="pageRequest.insuranceClearingState"
-                placeholder="请选择状态"
-                class="widths"
-              >
+              <el-select v-model="pageRequest.insuranceClearingState" placeholder="请选择状态" class="widths">
                 <el-option label="未结算" value="0"></el-option>
                 <el-option label="已结算" value="1"></el-option>
               </el-select>
@@ -123,495 +64,228 @@
           </el-col>
           <el-col :span="6">
             <el-form-item label="交强保单号">
-              <el-input
-                v-model="pageRequest.jqPolicyId"
-                placeholder="请输入交强保单号"
-                class="widths"
-                clearable
-              ></el-input>
+              <el-input v-model="pageRequest.jqPolicyId" placeholder="请输入交强保单号" class="widths" clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="6">
             <el-form-item label="商业保单号">
-              <el-input
-                v-model="pageRequest.syPolicyId"
-                placeholder="请输入商业保单号"
-                class="widths"
-                clearable
-              ></el-input>
+              <el-input v-model="pageRequest.syPolicyId" placeholder="请输入商业保单号" class="widths" clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="6">
             <el-form-item label="非车保单号">
-              <el-input
-                v-model="pageRequest.nonCarPolicyId"
-                placeholder="请输入非车保单号"
-                class="widths"
-                clearable
-              ></el-input>
+              <el-input v-model="pageRequest.nonCarPolicyId" placeholder="请输入非车保单号" class="widths" clearable></el-input>
             </el-form-item>
           </el-col>
         </el-row>
       </el-form>
       <div class="flex j-end" style="margin-right: 100px">
-        <el-button
-          type="success"
-          size="small"
-          @click="createOrUpdateVisible = true"
-          style="margin-right: 20px"
-          >新增数据</el-button
-        >
-        <el-button
-          type="primary"
-          size="small"
-          @click="Search"
-          style="margin-right: 20px"
-          >查询</el-button
-        >
-        <el-upload
-          class="upload-demo"
-          :auto-upload="false"
-          :on-change="writeOffUpload"
-          action="###"
-          :show-file-list="false"
-        >
+        <el-button type="danger" size="small" @click="templateDownload" style="margin-right: 20px">下载模板</el-button>
+        <el-button type="success" size="small" @click="createOrUpdateVisible = true"
+          style="margin-right: 20px">新增数据</el-button>
+        <el-button type="primary" size="small" @click="Search" style="margin-right: 20px">查询</el-button>
+        <el-upload class="upload-demo" :auto-upload="false" :on-change="writeOffUpload" action="###"
+          :show-file-list="false">
           <el-button size="small" type="primary">数据导入</el-button>
         </el-upload>
       </div>
     </div>
     <el-main ref="elMain" style="padding: 0px">
-      <kt-common-table
-        :SerialShow="false"
-        :operationWidth="180"
-        :showOperation="true"
-        :showSummary="true"
-        :showSummaryFieldList="['premium', 'nonCopying', 'receivable']"
-        permsDelete="sys:user:delete"
-        :showBatchDelete="true"
-        :showBatchSettled="true"
-        :showBatchPrint="true"
-        permsButton1="sys:user:edit"
-        permsButton2="sys:user:edit"
-        permsButton3="sys:user:edit"
-        :data="pageResult"
-        :columns="columns"
-        @findPage="findPage"
-        keyName="id"
-        settledName="批量修改"
-        @handleSettled="handleTableSettled"
-        @handlePrint="handlePrint"
-        @handleDelete="handleDelete"
-        button1Name="修改"
-        button1Background="#E6A23C"
-        @handleButton1="sourceUpdate"
-        button1Icon=""
-        button2Name="删除"
-        button2Background="#F56C6C"
-        @handleButton2="sourceDelete"
-        button2Icon=""
-      >
+      <kt-common-table :SerialShow="false" :operationWidth="180" :showOperation="true" :showSummary="true"
+        :showSummaryFieldList="['premium', 'nonCopying', 'receivable', 'jqPremiumTax', 'jqPremium', 'syPremiumTax', 'syPremium', 'nonCarPremiumTax', 'nonCarPremium', 'maxReceivable', 'subsidyAmount', 'totalReceivableAmount']"
+        permsDelete="sys:user:delete" :showBatchDelete="true" :showBatchSettled="true" :showBatchPrint="true"
+        permsButton1="sys:user:edit" permsButton2="sys:user:edit" permsButton3="sys:user:edit" :data="pageResult"
+        :columns="columns" @findPage="findPage" keyName="id" settledName="批量修改" @handleSettled="handleTableSettled"
+        @handlePrint="handlePrint" @handleDelete="handleDelete" button1Name="修改" button1Background="#E6A23C"
+        @handleButton1="sourceUpdate" button1Icon="" button2Name="删除" button2Background="#F56C6C"
+        @handleButton2="sourceDelete" button2Icon="">
       </kt-common-table>
     </el-main>
-    <el-dialog
-      title="信息修改"
-      :visible.sync="dialogFormVisible"
-      v-dialogDrag
-      :close-on-click-modal="false"
-      width="80%"
-    >
-      <el-form
-        :model="updateform"
-        :inline="true"
-        label-width="130px"
-        size="small"
-      >
+    <el-dialog title="信息修改" :visible.sync="dialogFormVisible" v-dialogDrag :close-on-click-modal="false" width="80%">
+      <el-form :model="updateform" :inline="true" label-width="130px" size="small">
         <el-form-item label="险种:">
-          <el-input
-            v-model="updateform.risk"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="updateform.risk" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="交强保费:">
-          <el-input
-            v-model="updateform.jqPremiumTax"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="updateform.jqPremiumTax" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="商业保费:">
-          <el-input
-            v-model="updateform.syPremiumTax"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="updateform.syPremiumTax" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="非车保费:">
-          <el-input
-            v-model="updateform.nonCarPremiumTax"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="updateform.nonCarPremiumTax" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="被保险人:">
-          <el-input
-            v-model="updateform.insuredName"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="updateform.insuredName" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="车牌号:">
-          <el-input
-            v-model="updateform.licenseno"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="updateform.licenseno" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="交强应收比例:">
-          <el-input
-            v-model="updateform.jqReceivableRatio"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="updateform.jqReceivableRatio" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="商业应收比例:">
-          <el-input
-            v-model="updateform.syReceivableRatio"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="updateform.syReceivableRatio" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="非车应收比例:">
-          <el-input
-            v-model="updateform.nonCarReceivableRatio"
-            autocomplete="off"
-            class="widths"
-          ></el-input>
+          <el-input v-model="updateform.nonCarReceivableRatio" autocomplete="off" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="保司结算状态:">
-          <el-select
-            v-model="updateform.insuranceClearingState"
-            placeholder="请选择状态"
-            class="widths"
-          >
-            <el-option
-              :disabled="insuranceClearingStatedisableStatus"
-              label="未结算"
-              value="0"
-            ></el-option>
+          <el-select v-model="updateform.insuranceClearingState" placeholder="请选择状态" class="widths">
+            <el-option :disabled="insuranceClearingStatedisableStatus" label="未结算" value="0"></el-option>
             <el-option label="已结算" value="1"></el-option>
           </el-select>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button size="small" @click="dialogFormVisible = false"
-          >取 消</el-button
-        >
-        <el-button size="small" type="primary" @click="updateSubmit"
-          >确 定</el-button
-        >
+        <el-button size="small" @click="dialogFormVisible = false">取 消</el-button>
+        <el-button size="small" type="primary" @click="updateSubmit">确 定</el-button>
       </div>
     </el-dialog>
     <el-dialog title="批量修改" :visible.sync="dialogUpdateVisible" width="20%">
-      <el-select
-        v-model="insuranceClearingState"
-        placeholder="请选择"
-        class="widths"
-        size="small"
-      >
+      <el-select v-model="insuranceClearingState" placeholder="请选择" class="widths" size="small">
         <el-option disabled label="未结算" value="0"></el-option>
         <el-option label="已结算" value="1"></el-option>
       </el-select>
       <div slot="footer" class="dialog-footer">
-        <el-button size="small" @click="dialogUpdateVisible = false"
-          >取 消</el-button
-        >
-        <el-button size="small" type="primary" @click="BulkUpdate"
-          >确 定</el-button
-        >
+        <el-button size="small" @click="dialogUpdateVisible = false">取 消</el-button>
+        <el-button size="small" type="primary" @click="BulkUpdate">确 定</el-button>
       </div>
     </el-dialog>
-    <el-dialog
-      title="新增数据"
-      :visible.sync="createOrUpdateVisible"
-      v-dialogDrag
-      :close-on-click-modal="false"
-      width="90%"
-    >
-      <el-form
-        :model="createOrUpdateForm"
-        :inline="true"
-        label-width="130px"
-        size="small"
-      >
+    <el-dialog title="新增数据" :visible.sync="createOrUpdateVisible" v-dialogDrag :close-on-click-modal="false" width="90%">
+      <el-form :model="createOrUpdateForm" :inline="true" label-width="130px" size="small">
         <el-form-item label="保险公司">
-          <el-select
-            v-model="createOrUpdateForm.insuranceId"
-            filterable
-            placeholder="请选择保险公司"
-            class="widths"
-            @change="conmpanydropdownEvent"
-            clearable
-          >
-            <el-option
-              v-for="val in companyList"
-              :key="val.id"
-              :label="val.name"
-              :value="val.id"
-            ></el-option>
+          <el-select v-model="createOrUpdateForm.insuranceId" filterable placeholder="请选择保险公司" class="widths"
+            @change="conmpanydropdownEvent" clearable>
+            <el-option v-for="val in companyList" :key="val.id" :label="val.name" :value="val.id"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="保司机构">
-          <el-input
-            v-model="createOrUpdateForm.insuranceDept"
-            autocomplete="off"
-            placeholder="录入保司机构"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.insuranceDept" autocomplete="off" placeholder="录入保司机构"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="保司机构代码">
-          <el-input
-            v-model="createOrUpdateForm.insuranceDeptId"
-            autocomplete="off"
-            placeholder="录入保司机构代码"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.insuranceDeptId" autocomplete="off" placeholder="录入保司机构代码"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="险种">
-          <el-input
-            v-model="createOrUpdateForm.risk"
-            autocomplete="off"
-            placeholder="录入险种"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.risk" autocomplete="off" placeholder="录入险种" class="widths"></el-input>
         </el-form-item>
         <el-form-item label="交强保单号">
-          <el-input
-            v-model="createOrUpdateForm.jqPolicyId"
-            autocomplete="off"
-            placeholder="录入交强保单号"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.jqPolicyId" autocomplete="off" placeholder="录入交强保单号"
+            class="widths"></el-input>
         </el-form-item>
 
         <el-form-item label="交强险保费">
-          <el-input
-            v-model="createOrUpdateForm.jqPremiumTax"
-            autocomplete="off"
-            placeholder="录入交强险保费"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.jqPremiumTax" autocomplete="off" placeholder="录入交强险保费"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="商业保单号">
-          <el-input
-            v-model="createOrUpdateForm.syPolicyId"
-            autocomplete="off"
-            placeholder="录入商业保单号"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.syPolicyId" autocomplete="off" placeholder="录入商业保单号"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="商业险保费">
-          <el-input
-            v-model="createOrUpdateForm.syPremiumTax"
-            autocomplete="off"
-            placeholder="录入商业险保费"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.syPremiumTax" autocomplete="off" placeholder="录入商业险保费"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="非车保单号">
-          <el-input
-            v-model="createOrUpdateForm.nonCarPolicyId"
-            autocomplete="off"
-            placeholder="录入非车保单号"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.nonCarPolicyId" autocomplete="off" placeholder="录入非车保单号"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="非车保费">
-          <el-input
-            v-model="createOrUpdateForm.nonCarPremiumTax"
-            autocomplete="off"
-            placeholder="录入非车保费"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.nonCarPremiumTax" autocomplete="off" placeholder="录入非车保费"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="被保险人">
-          <el-input
-            v-model="createOrUpdateForm.insuredName"
-            autocomplete="off"
-            placeholder="录入被保险人"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.insuredName" autocomplete="off" placeholder="录入被保险人"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="车牌号">
-          <el-input
-            v-model="createOrUpdateForm.licenseno"
-            autocomplete="off"
-            placeholder="录入车牌号"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.licenseno" autocomplete="off" placeholder="录入车牌号"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="出单日期">
-          <el-date-picker
-            v-model="createOrUpdateForm.signingTime"
-            type="date"
-            value-format="yyyy-MM-dd"
-            style="width: 250px"
-            clearable
-            placeholder="选择出单日期"
-          >
+          <el-date-picker v-model="createOrUpdateForm.signingTime" type="date" value-format="yyyy-MM-dd"
+            style="width: 250px" clearable placeholder="选择出单日期">
           </el-date-picker>
         </el-form-item>
         <el-form-item label="结算日期">
-          <el-date-picker
-            v-model="createOrUpdateForm.clearingTime"
-            type="date"
-            value-format="yyyy-MM-dd"
-            clearable
-            placeholder="选择结算日期"
-            style="width: 250px"
-          >
+          <el-date-picker v-model="createOrUpdateForm.clearingTime" type="date" value-format="yyyy-MM-dd" clearable
+            placeholder="选择结算日期" style="width: 250px">
           </el-date-picker>
         </el-form-item>
         <el-form-item label="车船税">
-          <el-input
-            v-model="createOrUpdateForm.taxamount"
-            autocomplete="off"
-            placeholder="录入车船税"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.taxamount" autocomplete="off" placeholder="录入车船税"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="交强应收比例">
-          <el-input
-            v-model="createOrUpdateForm.jqReceivableRatio"
-            autocomplete="off"
-            placeholder="录入交强应收比例"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.jqReceivableRatio" autocomplete="off" placeholder="录入交强应收比例"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="交强手续费比例">
-          <el-input
-            v-model="createOrUpdateForm.jqPremiumRatio"
-            autocomplete="off"
-            placeholder="录入交强手续费比例"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.jqPremiumRatio" autocomplete="off" placeholder="录入交强手续费比例"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="交强非跟单比例">
-          <el-input
-            v-model="createOrUpdateForm.jqNonCopyingRatio"
-            autocomplete="off"
-            placeholder="录入交强非跟单比例"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.jqNonCopyingRatio" autocomplete="off" placeholder="录入交强非跟单比例"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="商业应收比例">
-          <el-input
-            v-model="createOrUpdateForm.syReceivableRatio"
-            autocomplete="off"
-            placeholder="录入商业应收比例"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.syReceivableRatio" autocomplete="off" placeholder="录入商业应收比例"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="商业手续费比例">
-          <el-input
-            v-model="createOrUpdateForm.syPremiumRatio"
-            autocomplete="off"
-            placeholder="录入商业手续费比例"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.syPremiumRatio" autocomplete="off" placeholder="录入商业手续费比例"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="商业非跟单比例">
-          <el-input
-            v-model="createOrUpdateForm.syNonCopyingRatio"
-            autocomplete="off"
-            placeholder="录入商业非跟单比例"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.syNonCopyingRatio" autocomplete="off" placeholder="录入商业非跟单比例"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="非车应收比例">
-          <el-input
-            v-model="createOrUpdateForm.nonCarReceivableRatio"
-            autocomplete="off"
-            placeholder="录入非车应收比例"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.nonCarReceivableRatio" autocomplete="off" placeholder="录入非车应收比例"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="非车手续费比例">
-          <el-input
-            v-model="createOrUpdateForm.nonCarPremiumRatio"
-            autocomplete="off"
-            placeholder="录入非车手续费比例"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.nonCarPremiumRatio" autocomplete="off" placeholder="录入非车手续费比例"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="非车非跟单比例">
-          <el-input
-            v-model="createOrUpdateForm.nonCarNonCopyingRatio"
-            autocomplete="off"
-            placeholder="录入非车非跟单比例"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.nonCarNonCopyingRatio" autocomplete="off" placeholder="录入非车非跟单比例"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="最大交强应付比例">
-          <el-input
-            v-model="createOrUpdateForm.maxJqReceivableRatio"
-            autocomplete="off"
-            placeholder="录入最大交强应付比例"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.maxJqReceivableRatio" autocomplete="off" placeholder="录入最大交强应付比例"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="最大商业应付比例">
-          <el-input
-            v-model="createOrUpdateForm.maxSyReceivableRatio"
-            autocomplete="off"
-            placeholder="录入最大商业应付比例"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.maxSyReceivableRatio" autocomplete="off" placeholder="录入最大商业应付比例"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="最大非车应付比例">
-          <el-input
-            v-model="createOrUpdateForm.maxNonCarReceivableRatio"
-            autocomplete="off"
-            placeholder="录入最大非车应付比例"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.maxNonCarReceivableRatio" autocomplete="off" placeholder="录入最大非车应付比例"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="补贴比例">
-          <el-input
-            v-model="createOrUpdateForm.subsidyRatio"
-            autocomplete="off"
-            placeholder="录入补贴比例"
-            class="widths"
-          ></el-input>
+          <el-input v-model="createOrUpdateForm.subsidyRatio" autocomplete="off" placeholder="录入补贴比例"
+            class="widths"></el-input>
         </el-form-item>
         <el-form-item label="结算状态">
-          <el-select
-            v-model="createOrUpdateForm.clearingState"
-            placeholder="请选择状态"
-            class="widths"
-          >
+          <el-select v-model="createOrUpdateForm.clearingState" placeholder="请选择状态" class="widths">
             <el-option label="未结算" value="0"></el-option>
             <el-option label="已结算" value="1"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="保司结算状态">
-          <el-select
-            v-model="createOrUpdateForm.insuranceClearingState"
-            placeholder="请选择状态"
-            class="widths"
-          >
+          <el-select v-model="createOrUpdateForm.insuranceClearingState" placeholder="请选择状态" class="widths">
             <el-option label="未结算" value="0"></el-option>
             <el-option label="已结算" value="1"></el-option>
           </el-select>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button size="small" @click="createOrUpdateVisible = false"
-          >取 消</el-button
-        >
-        <el-button size="small" type="primary" @click="insertData"
-          >提交</el-button
-        >
+        <el-button size="small" @click="createOrUpdateVisible = false">取 消</el-button>
+        <el-button size="small" type="primary" @click="insertData">提交</el-button>
       </div>
     </el-dialog>
   </div>
@@ -775,8 +449,25 @@ export default {
   created() {
     this.companyInt();
   },
-  mounted() {},
+  mounted() { },
   methods: {
+    //模板下载
+    templateDownload() {
+      this.$api.task.sourceTemplate().then((res) => {
+        if (res.code == '200') {
+          let url = process.env.BASE_URL + res.data;
+          let a = document.createElement("a");
+          a.href = url;
+          a.click();
+          window.URL.revokeObjectURL(url);
+        } else {
+          this.$message({
+            type: 'error',
+            message: res.msg,
+          });
+        }
+      });
+    },
     //新增数据
     insertData() {
       this.$api.task
@@ -941,7 +632,7 @@ export default {
             }
           });
         })
-        .catch(() => {});
+        .catch(() => { });
     },
     updateSubmit() {
       this.$api.task.SourceUpdate(this.updateform).then((res) => {