Explorar o código

1、应收导入增加单条删除、和新增功能
2、结算导入增加数据匹配提示

@dongkboy %!s(int64=2) %!d(string=hai) anos
pai
achega
df940fedca

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

@@ -754,3 +754,27 @@ export const excelReceivableAndSettlementExport = (data) => {
     data
   })
 }
+//应收表新增
+export const sourceaddReceivable = (data) => {
+  return axios({
+    url: "/InsReceivable/addReceivable",
+    method: "post",
+    data
+  })
+}
+//应收表单条数据删除
+export const sourcedeleteReceivable = (data) => {
+  return axios({
+    url: "/InsReceivable/deleteReceivable",
+    method: "post",
+    data
+  })
+}
+//结算数据导入后是否匹配
+export const isVisibledataMatching = () => {
+  return axios({
+    url: "/InsReceivable/dataMatching",
+    method: "get",
+  })
+}
+

+ 29 - 18
src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/SettlementSource.vue

@@ -340,7 +340,7 @@ export default {
   data() {
     return {
       signDateTime: [],
-      agencySettlementTime:[],
+      agencySettlementTime: [],
       pageRequest: {
         //查询的默认条件
         pageNum: 1,
@@ -352,14 +352,14 @@ export default {
         jqPolicyId: "",
         syPolicyId: "",
         nonCarPolicyId: "",
-        channel:"",
-        channelClassification:"",
-        insuredName:"",
-        agencySettlementTime:"",
+        channel: "",
+        channelClassification: "",
+        insuredName: "",
+        agencySettlementTime: "",
       },
       // 右侧列表查询数据Start
       dialogFormVisible: false,
-      dialogUpdateVisible:false,
+      dialogUpdateVisible: false,
       pageResult: [],
       updateform: {
         channel: "",
@@ -374,13 +374,13 @@ export default {
         commercialExportRatio: "",
         nonVehicleExportRatio: "",
       },
-      batchSizeForm:{
-        businessOwner:"",
-        compulsoryExportRatio:"",
-        commercialExportRatio:"",
-        nonVehicleExportRatio:"",
+      batchSizeForm: {
+        businessOwner: "",
+        compulsoryExportRatio: "",
+        commercialExportRatio: "",
+        nonVehicleExportRatio: "",
       },
-      batchSizeList:[],
+      batchSizeList: [],
       columns: [
         //数据列
         { prop: "id", label: " 编号", minWidth: 160 },
@@ -424,18 +424,16 @@ export default {
     signDateChange(e) {
       if (e == null) {
         this.pageRequest.signDate = "";
-      }else{
+      } else {
         this.pageRequest.signDate = e.toString();
       }
     },
-    agencySettlementTimeChange(e){
+    agencySettlementTimeChange(e) {
       if (e == null) {
         this.pageRequest.agencySettlementTime = "";
-
-      }else{
+      } else {
         this.pageRequest.agencySettlementTime = e.toString();
       }
-
     },
     //保险公司查询
     companyInt() {
@@ -459,6 +457,7 @@ export default {
                 message: res.msg,
               });
               this.findPage();
+              this.isVisibleexecuteMethod();
             } else {
               this.$message({
                 type: "error",
@@ -469,12 +468,24 @@ export default {
         }
       });
     },
+    //是否匹配
+    isVisibleexecuteMethod() {
+      this.$api.task.isVisibledataMatching().then((res) => {
+        if (res.data) {
+          this.$alert(res.msg, "匹配提示", {
+            confirmButtonText: "关闭",
+            callback: (action) => {},
+          });
+        } else {
+        }
+      });
+    },
     handleTableSettled(ids) {
       this.batchSizeList = ids;
       Object.keys(this.batchSizeForm).forEach((key) => {
         this.batchSizeForm[key] = "";
       });
-      this.dialogUpdateVisible=true;
+      this.dialogUpdateVisible = true;
     },
     BulkUpdate() {
       let params = {

+ 380 - 3
src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/Source.vue

@@ -141,6 +141,13 @@
         </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"
@@ -162,7 +169,7 @@
     <el-main ref="elMain" style="padding: 0px">
       <kt-common-table
         :SerialShow="false"
-        :operationWidth="150"
+        :operationWidth="180"
         :showOperation="true"
         permsDelete="sys:user:delete"
         :showBatchDelete="true"
@@ -183,10 +190,14 @@
         button1Background="#E6A23C"
         @handleButton1="sourceUpdate"
         button1Icon=""
+        button2Name="删除"
+        button2Background="#F56C6C"
+        @handleButton2="sourceDelete"
+        button2Icon=""
       >
       </kt-common-table>
     </el-main>
-    <el-dialog title="信息修改" :visible.sync="dialogFormVisible" width="60%">
+    <el-dialog title="信息修改" :visible.sync="dialogFormVisible" width="80%">
       <el-form
         :model="updateform"
         :inline="true"
@@ -295,6 +306,287 @@
         >
       </div>
     </el-dialog>
+    <el-dialog
+      title="信息修改"
+      :visible.sync="createOrUpdateVisible"
+      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>
+        </el-form-item>
+        <el-form-item label="保司机构">
+          <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-form-item>
+        <el-form-item label="险种">
+          <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-form-item>
+
+        <el-form-item label="交强险保费">
+          <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-form-item>
+        <el-form-item label="商业险保费">
+          <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-form-item>
+        <el-form-item label="非车保费">
+          <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-form-item>
+        <el-form-item label="车牌号">
+          <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>
+        </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>
+        </el-form-item>
+        <el-form-item label="车船税">
+          <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-form-item>
+        <el-form-item label="交强手续费比例">
+          <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-form-item>
+        <el-form-item label="商业应收比例">
+          <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-form-item>
+        <el-form-item label="商业非跟单比例">
+          <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-form-item>
+        <el-form-item label="非车手续费比例">
+          <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-form-item>
+        <el-form-item label="最大交强应付比例">
+          <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-form-item>
+        <el-form-item label="最大非车应付比例">
+          <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-form-item>
+        <el-form-item label="结算状态">
+          <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-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
+        >
+      </div>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -325,10 +617,44 @@ export default {
         insuranceClearingState: "",
         insuranceDept: "", //保司机构
       },
+      createOrUpdateVisible: false,
       dialogUpdateVisible: false,
       dialogFormVisible: false,
       // 右侧列表查询数据Start
       pageResult: [],
+      createOrUpdateForm: {
+        insuranceId: "", //保司编码
+        insuranceName: "", //保司名称
+        insuranceDept: "", //保司机构
+        insuranceDeptId: "", //保司机构代码
+        risk: "", //险种
+        jqPolicyId: "", //交强保单号
+        jqPremiumTax: "", //交强险保费
+        syPolicyId: "", //商业保单号
+        syPremiumTax: "", //商业险保费
+        nonCarPolicyId: "", //非车保单号
+        nonCarPremiumTax: "", //非车保费
+        insuredName: "", //被保险人
+        licenseno: "", //车牌号
+        signingTime: "", //出单日期
+        clearingTime: "", //结算日期
+        taxamount: "", //车船税
+        jqReceivableRatio: "", //交强应收比例
+        jqPremiumRatio: "", //交强手续费比例
+        jqNonCopyingRatio: "", //交强非跟单比例
+        syReceivableRatio: "", //商业应收比例
+        syPremiumRatio: "", //商业手续费比例
+        syNonCopyingRatio: "", //商业非跟单比例
+        nonCarReceivableRatio: "", //非车应收比例
+        nonCarPremiumRatio: "", //非车手续费比例
+        nonCarNonCopyingRatio: "", //非车非跟单比例
+        maxJqReceivableRatio: "", //最大交强应付比例
+        maxSyReceivableRatio: "", //最大商业应付比例
+        maxNonCarReceivableRatio: "", //最大非车应付比例
+        subsidyRatio: "", //补贴比例
+        clearingState: "", //结算状态
+        insuranceClearingState: "", //保司结算状态
+      },
       updateform: {
         risk: "",
         jqPremiumTax: "",
@@ -423,6 +749,33 @@ export default {
   },
   mounted() {},
   methods: {
+    //新增数据
+    insertData() {
+      this.$api.task
+        .sourceaddReceivable(this.createOrUpdateForm)
+        .then((res) => {
+          if (res.code == "200") {
+            this.$message({
+              type: "success",
+              message: res.msg,
+            });
+            this.createOrUpdateVisible = false;
+            this.findPage();
+          } else {
+            this.$message({
+              type: "error",
+              message: res.msg,
+            });
+          }
+        });
+    },
+    conmpanydropdownEvent(val) {
+      const selectedLabel = this.companyList.find(
+        (option) => option.id === val
+      ).name;
+      this.createOrUpdateForm.insuranceName = selectedLabel;
+    },
+    //接口传值处理
     clearingTimeChange(e) {
       if (e == null) {
         this.pageRequest.clearingTime = "";
@@ -458,7 +811,7 @@ export default {
                 type: "success",
                 message: res.msg,
               });
-              this.findPage();
+              this.this.findPage();
             } else {
               this.$message({
                 type: "error",
@@ -532,6 +885,30 @@ export default {
       this.dialogFormVisible = true;
       this.updateform = row;
     },
+    sourceDelete({ row, column }) {
+      this.$confirm("是否确认删除?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.$api.task.sourcedeleteReceivable([row.id]).then((res) => {
+            if (res.code == "200") {
+              this.$message({
+                type: "success",
+                message: res.msg,
+              });
+              this.findPage();
+            } else {
+              this.$message({
+                type: "error",
+                message: res.msg,
+              });
+            }
+          });
+        })
+        .catch(() => {});
+    },
     updateSubmit() {
       this.$api.task.SourceUpdate(this.updateform).then((res) => {
         if (res.code == "200") {