Sfoglia il codice sorgente

结算导入添加新增数据接口

@dongkboy 2 anni fa
parent
commit
b2a253ba7b

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

@@ -738,6 +738,14 @@ export const SettlementExport = (data) => {
     data
   })
 }
+//结算导出
+export const SettlementAdd = (data) => {
+  return axios({
+    url: "/InsReceivable/addSettlement",
+    method: "post",
+    data
+  })
+}
 //结算表批量修改
 export const SettlementUpdates = (data) => {
   return axios({

+ 166 - 4
src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/SettlementSource.vue

@@ -1,6 +1,7 @@
 <template>
   <div>
     <div class="p-2">
+      <!-- <generic-form :fields="retrievalFileds" label-width="120px"></generic-form> -->
       <el-form :inline="true" :model="pageRequest" size="small" label-width="120px">
         <el-row>
           <el-col :span="6">
@@ -72,13 +73,14 @@
         </el-row>
       </el-form>
       <div class="flex j-end" style="margin-right: 100px">
+        <el-button type="success" size="small" @click="dialogFormAddVisible = true">新增</el-button>
         <kt-button label="下载模板" type="danger" perms="reconciliation:recPay:importSettlement:template"
           @click="templateDownload" />
         <kt-button label="查询" type="primary" perms="reconciliation:recPay:importSettlement:query" @click="Search"
           style="margin-right: 10px" />
         <el-upload class="upload-demo" :auto-upload="false" :on-change="writeOffUpload" action="###"
           :show-file-list="false">
-          <kt-button label="数据导入" type="primary" perms="reconciliation:recPay:importSettlement:importAdd" @click="Search"
+          <kt-button label="数据导入" type="primary" perms="reconciliation:recPay:importSettlement:importAdd"
             style="margin-right: 10px" />
         </el-upload>
       </div>
@@ -88,12 +90,101 @@
         permsSettled="reconciliation:recPay:importSettlement:batchUpdate"
         permsDelete="reconciliation:recPay:importSettlement:batchDelete"
         permsExcel="reconciliation:recPay:importSettlement:excel" :showBatchDelete="true" :showBatchSettled="true"
-        :showBatchPrint="true" :data="pageResult" :columns="columns" @findPage="findPage" keyName="id" settledName="批量修改" deleteName="批量删除"
-        @handleSettled="handleTableSettled" @handlePrint="handlePrint" @handleDelete="handleDelete" button1Name="修改"
-        button1Background="#E6A23C" @handleButton1="sourceUpdate" button1Icon=""
+        :showBatchPrint="true" :data="pageResult" :columns="columns" @findPage="findPage" keyName="id" settledName="批量修改"
+        deleteName="批量删除" @handleSettled="handleTableSettled" @handlePrint="handlePrint" @handleDelete="handleDelete"
+        button1Name="修改" button1Background="#E6A23C" @handleButton1="sourceUpdate" button1Icon=""
         permsButton1="reconciliation:recPay:importSettlement:update">
       </kt-common-table>
     </el-main>
+
+    <el-dialog title="新增" :visible.sync="dialogFormAddVisible" v-dialogDrag :close-on-click-modal="false" width="60%" @close="AddVisibleClose">
+      <el-form :model="addform" :inline="true" label-width="130px" size="small">
+        <el-form-item label="运营小组:">
+          <el-input v-model="addform.operationsTeam" autocomplete="off" class="widths"></el-input>
+        </el-form-item>
+        <el-form-item label="渠道分级:">
+          <el-input v-model="addform.channelClassification" autocomplete="off" class="widths"></el-input>
+        </el-form-item>
+        <el-form-item label="渠道:">
+          <el-input v-model="addform.channel" autocomplete="off" class="widths"></el-input>
+        </el-form-item>
+        <el-form-item label="工号:">
+          <el-input v-model="addform.employeeId" autocomplete="off" class="widths"></el-input>
+        </el-form-item>
+        <el-form-item label="签单日期:">
+          <el-date-picker v-model="addform.signDate" type="date" value-format="yyyy-MM-dd"
+            style="width: 220px" clearable placeholder="选择签单日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="车牌号:">
+          <el-input v-model="addform.licenseno" autocomplete="off" class="widths"></el-input>
+        </el-form-item>
+        <el-form-item label="被保险人:">
+          <el-input v-model="addform.insuredName" autocomplete="off" class="widths"></el-input>
+        </el-form-item>
+        <el-form-item label="保险公司:">
+          <el-select v-model="addform.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="addform.insuranceType" autocomplete="off" class="widths"></el-input>
+        </el-form-item>
+        <el-form-item label="业务归属:">
+          <el-input v-model="addform.businessOwner" autocomplete="off" class="widths"></el-input>
+        </el-form-item>
+        <el-form-item label="交强保单号:">
+          <el-input v-model="addform.jqPolicyId" autocomplete="off" class="widths"></el-input>
+        </el-form-item>
+        <el-form-item label="商业保单号:">
+          <el-input v-model="addform.syPolicyId" autocomplete="off" class="widths"></el-input>
+        </el-form-item>
+        <el-form-item label="非车保单号:">
+          <el-input v-model="addform.nonCarPolicyId" autocomplete="off" class="widths"></el-input>
+        </el-form-item>
+        <el-form-item label="交强保费:">
+          <el-input v-model="addform.jqPremiumTax" autocomplete="off" class="widths"></el-input>
+        </el-form-item>
+        <el-form-item label="车船税:">
+          <el-input v-model="addform.vehicleTax" autocomplete="off" class="widths"></el-input>
+        </el-form-item>
+        <el-form-item label="商业保费:">
+          <el-input v-model="addform.syPremiumTax" autocomplete="off" class="widths"></el-input>
+        </el-form-item>
+        <el-form-item label="非车保费:">
+          <el-input v-model="addform.nonCarPremiumTax" autocomplete="off" class="widths"></el-input>
+        </el-form-item>
+        <el-form-item label="交强出口比例:">
+          <el-input v-model="addform.compulsoryExportRatio" autocomplete="off" class="widths"></el-input>
+        </el-form-item>
+        <el-form-item label="商业出口比例:">
+          <el-input v-model="addform.commercialExportRatio" autocomplete="off" class="widths"></el-input>
+        </el-form-item>
+        <el-form-item label="非车出口比例:">
+          <el-input v-model="addform.nonVehicleExportRatio" autocomplete="off" class="widths"></el-input>
+        </el-form-item>
+        <el-form-item label="补贴比例:">
+          <el-input v-model="addform.subsidyRatio" autocomplete="off" class="widths"></el-input>
+        </el-form-item>
+        <el-form-item label="补贴金额:">
+          <el-input v-model="addform.subsidyAmount" autocomplete="off" class="widths"></el-input>
+        </el-form-item>
+        <el-form-item label="结算金额:">
+          <el-input v-model="addform.settlementAmount" autocomplete="off" class="widths"></el-input>
+        </el-form-item>
+        <el-form-item label="代理结算时间">
+          <el-date-picker v-model="addform.agencySettlementTime" type="date" value-format="yyyy-MM-dd"
+            style="width: 220px" clearable placeholder="选择代理结算日期">
+          </el-date-picker>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button size="small" @click="dialogFormAddVisible = false">取 消</el-button>
+        <el-button size="small" type="primary" @click="addSubmit">确 定</el-button>
+      </div>
+    </el-dialog>
+
     <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-item label="渠道:">
@@ -135,6 +226,7 @@
         <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-item label="业务归属:">
@@ -159,12 +251,14 @@
 </template>
 <script>
 import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
+import GenericForm from '@/components/Form/GenericForm.vue';//表单组件
 import KtButton from "@/views/Core/KtButton";
 import CommonUtil from "@/utils/comutil.js";
 export default {
   components: {
     KtCommonTable,
     KtButton,
+    GenericForm
   },
   data() {
     return {
@@ -188,8 +282,10 @@ export default {
       },
       // 右侧列表查询数据Start
       dialogFormVisible: false,
+      dialogFormAddVisible: false,
       dialogUpdateVisible: false,
       pageResult: [],
+
       updateform: {
         channel: "",
         licenseno: "",
@@ -210,6 +306,38 @@ export default {
         nonVehicleExportRatio: "",
       },
       batchSizeList: [],
+      retrievalFileds: [
+        {
+
+        }
+      ],
+      addform: {
+        operationsTeam: "",
+        channelClassification: "",
+        channel: "",
+        employeeId: "",
+        signDate: "",
+        licenseno: "",
+        insuredName: "",
+        insuranceCompany: "",
+        insuranceId: "",
+        insuranceType: "",
+        businessOwner: "",
+        jqPolicyId: "",
+        syPolicyId: "",
+        nonCarPolicyId: "",
+        jqPremiumTax: "",
+        vehicleTax: "",
+        syPremiumTax: "",
+        nonCarPremiumTax: "",
+        compulsoryExportRatio: "",
+        commercialExportRatio: "",
+        nonVehicleExportRatio: "",
+        subsidyRatio: "",
+        subsidyAmount: "",
+        settlementAmount: "",
+        agencySettlementTime: "",
+      },
       columns: [
         //数据列
         { prop: "id", label: " 编号", minWidth: 160 },
@@ -250,6 +378,10 @@ export default {
   },
   mounted() { },
   methods: {
+    //新增
+    newly() {
+
+    },
     //模板下载
     templateDownload() {
       this.$api.task.settlementTemplate().then((res) => {
@@ -287,6 +419,12 @@ export default {
         this.companyList = res.data;
       });
     },
+    conmpanydropdownEvent(val) {
+      const selectedLabel = this.companyList.find(
+        (option) => option.id === val
+      ).name;
+      this.addform.insuranceCompany = selectedLabel;
+    },
     //附件上传
     writeOffUpload(file) {
       var file = file.raw;
@@ -393,6 +531,25 @@ export default {
     Search() {
       this.findPage();
     },
+    //新增
+    addSubmit(){
+      this.$api.task.SettlementAdd(this.addform).then((res) => {
+        if (res.code == "200") {
+          this.$message({
+            type: "success",
+            message: res.msg,
+          });
+          this.dialogFormAddVisible = false;
+          this.findPage();
+        } else {
+          this.$message({
+            type: "error",
+            message: res.msg,
+          });
+        }
+      });
+    },
+    //修改
     updateSubmit() {
       this.$api.task.settlementUpdate(this.updateform).then((res) => {
         if (res.code == "200") {
@@ -490,6 +647,11 @@ export default {
         })
         .then(data != null ? data.callback : "");
     },
+    AddVisibleClose(){
+      for (const key in this.addform) {
+          this.addform[key] = "";
+      }
+    },
   },
 };
 </script>

+ 35 - 12
src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/Source.vue

@@ -93,8 +93,8 @@
           @click="createOrUpdateVisible = true" />
         <kt-button label="查询" type="primary" perms="reconciliation:recPay:importAccountsReceivable:query"
           @click="Search" />
-        <el-upload class="upload-demo" :auto-upload="false" :on-change="writeOffUpload" action="###" style="margin-left: 10px;"
-          :show-file-list="false">
+        <el-upload class="upload-demo" :auto-upload="false" :on-change="writeOffUpload" action="###"
+          style="margin-left: 10px;" :show-file-list="false">
           <kt-button label="数据导入" type="primary" perms="reconciliation:recPay:importAccountsReceivable:importAdd"
             @click="Search" />
         </el-upload>
@@ -103,12 +103,12 @@
     <el-main ref="elMain" style="padding: 0px">
       <kt-common-table :SerialShow="false" :operationWidth="180" :showOperation="true" :showSummary="true"
         :showSummaryFieldList="['premium', 'nonCopying', 'receivable', 'jqPremiumTax', 'jqPremium', 'syPremiumTax', 'syPremium', 'nonCarPremiumTax', 'nonCarPremium', 'maxReceivable', 'subsidyAmount', 'totalReceivableAmount']"
-        permsSettled="reconciliation:recPay:importAccountsReceivable:batchUpdate" permsDelete="reconciliation:recPay:importAccountsReceivable:batchDelete"
-        permsExcel="reconciliation:recPay:importAccountsReceivable:excel"
-        :showBatchDelete="true" :showBatchSettled="true" :showBatchPrint="true"
-        :data="pageResult" :columns="columns" @findPage="findPage" keyName="id" settledName="批量修改" deleteName="批量删除"
-        @handleSettled="handleTableSettled" @handlePrint="handlePrint" @handleDelete="handleDelete" button1Name="修改"
-        button1Background="#E6A23C" @handleButton1="sourceUpdate" button1Icon=""
+        permsSettled="reconciliation:recPay:importAccountsReceivable:batchUpdate"
+        permsDelete="reconciliation:recPay:importAccountsReceivable:batchDelete"
+        permsExcel="reconciliation:recPay:importAccountsReceivable:excel" :showBatchDelete="true" :showBatchSettled="true"
+        :showBatchPrint="true" :data="pageResult" :columns="columns" @findPage="findPage" keyName="id" settledName="批量修改"
+        deleteName="批量删除" @handleSettled="handleTableSettled" @handlePrint="handlePrint" @handleDelete="handleDelete"
+        button1Name="修改" button1Background="#E6A23C" @handleButton1="sourceUpdate" button1Icon=""
         permsButton1="reconciliation:recPay:importAccountsReceivable:update" button2Name="删除" button2Background="#F56C6C"
         permsButton2="reconciliation:recPay:importAccountsReceivable:delete" @handleButton2="sourceDelete" button2Icon="">
       </kt-common-table>
@@ -164,7 +164,8 @@
         <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-dialog title="新增数据" :visible.sync="createOrUpdateVisible" v-dialogDrag :close-on-click-modal="false" width="90%"
+      @close="AddVisibleClose">
       <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"
@@ -239,7 +240,7 @@
             class="widths"></el-input>
         </el-form-item>
         <el-form-item label="交强非跟单比例">
-          <el-input v-model="createOrUpdateForm.jqNonCopyingRatio" autocomplete="off" placeholder="录入交强非跟单比例"
+          <el-input v-model="createOrUpdateForm.jqNonCopyingRatio" disabled autocomplete="off" placeholder="录入交强非跟单比例"
             class="widths"></el-input>
         </el-form-item>
         <el-form-item label="商业应收比例">
@@ -251,7 +252,7 @@
             class="widths"></el-input>
         </el-form-item>
         <el-form-item label="商业非跟单比例">
-          <el-input v-model="createOrUpdateForm.syNonCopyingRatio" autocomplete="off" placeholder="录入商业非跟单比例"
+          <el-input v-model="createOrUpdateForm.syNonCopyingRatio" disabled autocomplete="off" placeholder="录入商业非跟单比例"
             class="widths"></el-input>
         </el-form-item>
         <el-form-item label="非车应收比例">
@@ -263,7 +264,7 @@
             class="widths"></el-input>
         </el-form-item>
         <el-form-item label="非车非跟单比例">
-          <el-input v-model="createOrUpdateForm.nonCarNonCopyingRatio" autocomplete="off" placeholder="录入非车非跟单比例"
+          <el-input v-model="createOrUpdateForm.nonCarNonCopyingRatio" disabled autocomplete="off" placeholder="录入非车非跟单比例"
             class="widths"></el-input>
         </el-form-item>
         <el-form-item label="最大交强应付比例">
@@ -294,6 +295,12 @@
             <el-option label="已结算" value="1"></el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="应收类型">
+          <el-select v-model="createOrUpdateForm.invSourceType" placeholder="请选择应收类型" class="widths">
+            <el-option label="平台" value="platform"></el-option>
+            <el-option label="私有" value="privately"></el-option>
+          </el-select>
+        </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button size="small" @click="createOrUpdateVisible = false">取 消</el-button>
@@ -306,6 +313,7 @@
 import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
 import KtButton from "@/views/Core/KtButton";//按钮权限组件
 import CommonUtil from "@/utils/comutil.js";
+import { Footer } from "element-ui";
 export default {
   components: {
     KtCommonTable,
@@ -340,6 +348,7 @@ export default {
       // 右侧列表查询数据Start
       pageResult: [],
       createOrUpdateForm: {
+        invSourceType: "",//应收类型
         insuranceId: "", //保司编码
         insuranceName: "", //保司名称
         insuranceDept: "", //保司机构
@@ -394,6 +403,7 @@ export default {
         { prop: "insuranceName", label: "保司名称", minWidth: 180 },
         { prop: "insuranceDept", label: "保司机构", minWidth: 100 },
         { prop: "insuranceDeptId", label: "保司机构代码", minWidth: 100 },
+        { prop: "invSourceType", label: "应收类型", minWidth: 120, formatter: this.invSourceTypeFormatter },
         { prop: "risk", label: "险种", minWidth: 100 },
         { prop: "jqPolicyId", label: "交强保单号", minWidth: 180 },
         { prop: "jqPremiumTax", label: "交强险保费", minWidth: 140 },
@@ -623,6 +633,14 @@ export default {
         }
       });
     },
+    invSourceTypeFormatter(row, column) {
+      let invSourceType = row.invSourceType;
+      if (invSourceType == 'platform') {
+        return '平台'
+      } else if (invSourceType == 'privately') {
+        return '私有'
+      }
+    },
     Search() {
       this.findPage();
     },
@@ -727,6 +745,11 @@ export default {
         })
         .then(data != null ? data.callback : "");
     },
+    AddVisibleClose() {
+      for (const key in this.createOrUpdateForm) {
+        this.createOrUpdateForm[key] = "";
+      }
+    },
   },
 };
 </script>

+ 0 - 1
src/views/Login.vue

@@ -256,7 +256,6 @@ export default {
       let randnum = new Date().getTime();
       let uuid = md5(randnum)
       let url = process.env.BASE_URL + '/scanQrCode?uuid=' + uuid;
-      console.log(url)
       this.$nextTick(() => {
         this.creatQrCode(url)
         this.$api.login.getQRCode(uuid).then((res) => {