Bläddra i källkod

应收来源表添加批量删除和批量修改

@dongkboy 2 år sedan
förälder
incheckning
296be9aa79

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

@@ -714,6 +714,22 @@ export const sourceExport = (data) => {
     data
   })
 }
+//应收表批量删除
+export const sourcedeletes = (data) => {
+  return axios({
+    url: "/InsReceivable/deleteReceivable",
+    method: "post",
+    data
+  })
+}
+//应收表批量修改
+export const sourceUpdates = (data) => {
+  return axios({
+    url: "/InsReceivable/receivableUpdateBatch",
+    method: "post",
+    data
+  })
+}
 //结算导出
 export const SettlementExport = (data) => {
   return axios({

+ 5 - 9
src/views/Core/KtCommonTable.vue

@@ -10,7 +10,7 @@
         color: '#606266',
       }" style="width: 100%" :row-class-name="tableRowClassName">
       <el-table-column type="selection" width="40" fixed
-        v-if="showBatchDelete || showBatchSettled "></el-table-column>
+        v-if="showBatchDelete || showBatchSettled || showBatchPrint"></el-table-column>
       <el-table-column v-if="SerialShow" label="序号" type="index" width="50" align="center"></el-table-column>
       <template v-for="column in columns">
         <el-table-column header-align="center" align="center" :prop="column.prop" :label="column.label"
@@ -402,13 +402,9 @@ export default {
     },
     // 批量删除
     handleBatchDelete: function () {
-      let _keyName = "id";
-      if (!!this.keyName) {
-        _keyName = this.keyName;
-      }
-      //let ids = this.selections.map(item => item.id).toString()
-      let ids = this.selections.map((item) => item[_keyName]).toString();
-      this.delete(ids);
+      let idlist=[];
+      this.selections.map((item) => idlist.push(item.id));
+      this.$emit("handleDelete", idlist);
     },
     // 删除操作
     delete: function (ids) {
@@ -458,7 +454,7 @@ export default {
         _keyName = this.keyName;
       }
       let idlist=[];
-      this.selections.map((item) => idlist.push(item.policyno));
+      this.selections.map((item) => idlist.push(item[_keyName]));
       this.$emit("handleSettled", idlist);
     },
     //批量打印

+ 4 - 13
src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/ReceivablePayableCollection.vue

@@ -134,15 +134,6 @@
           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">
@@ -208,10 +199,10 @@ export default {
         { prop: "channel", label: "渠道", minWidth: 100 },
         { prop: "licenseNo", label: "车牌号", minWidth: 160 },
         { prop: "insuredName", label: "被保险人", minWidth: 160 },
-        { prop: "insuranceId", label: "保险id", minWidth: 160 },
-        { prop: "insuranceCompany", label: "保险公司", minWidth: 160 },
-        { prop: "insuranceDeptId", label: "部门id", minWidth: 160 },
-        { prop: "insuranceDept", label: "保险部门", minWidth: 160 },
+        { prop: "insuranceId", label: "保司编码", minWidth: 160 },
+        { prop: "insuranceCompany", label: "保司名称", minWidth: 160 },
+        { prop: "insuranceDeptId", label: "保司机构代码", minWidth: 160 },
+        { prop: "insuranceDept", label: "保司机构", minWidth: 160 },
         { prop: "insuranceType", label: "险种", minWidth: 160 },
         { prop: "businessOwner", label: "业务所有者", minWidth: 160 },
         { prop: "jqPolicyId", label: "交强保单号", minWidth: 160 },

+ 14 - 1
src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/SettlementSource.vue

@@ -331,7 +331,20 @@ export default {
       this.$api.letter.uploadFile(params).then((res) => {
         if (res.code == "200") {
           let url = process.env.BASE_URL + res.data.url;
-          this.$api.task.settlementExcel(url).then((res) => {});
+          this.$api.task.settlementExcel(url).then((res) => {
+            if (res.code == "200") {
+              this.$message({
+                type: "success",
+                message: res.msg,
+              });
+              this.findPage();
+            } else {
+              this.$message({
+                type: "error",
+                message: res.msg,
+              });
+            }
+          });
         }
       });
     },

+ 87 - 8
src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/Source.vue

@@ -155,8 +155,8 @@
         :operationWidth="150"
         :showOperation="true"
         permsDelete="sys:user:delete"
-        :showBatchDelete="false"
-        :showBatchSettled="false"
+        :showBatchDelete="true"
+        :showBatchSettled="true"
         :showBatchPrint="true"
         permsButton1="sys:user:edit"
         permsButton2="sys:user:edit"
@@ -164,10 +164,11 @@
         :data="pageResult"
         :columns="columns"
         @findPage="findPage"
-        keyName="policyno"
-        settledName="批量生成"
+        keyName="id"
+        settledName="批量修改"
         @handleSettled="handleTableSettled"
         @handlePrint="handlePrint"
+        @handleDelete="handleDelete"
         button1Name="修改"
         button1Background="#E6A23C"
         @handleButton1="sourceUpdate"
@@ -265,6 +266,25 @@
         >
       </div>
     </el-dialog>
+    <el-dialog title="批量修改" :visible.sync="dialogUpdateVisible" width="20%">
+      <el-select
+        v-model="insuranceClearingState"
+        placeholder="请选择"
+        class="widths"
+        size="small"
+      >
+        <el-option 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
+        >
+      </div>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -276,6 +296,7 @@ export default {
   },
   data() {
     return {
+      insuranceClearingState: "",
       clearingTime: [],
       signingTime: [],
       pageRequest: {
@@ -293,6 +314,7 @@ export default {
         nonCarPolicyId: "", //非车保单号
         insuranceClearingState: "",
       },
+      dialogUpdateVisible: false,
       dialogFormVisible: false,
       // 右侧列表查询数据Start
       pageResult: [],
@@ -308,6 +330,9 @@ export default {
         nonCarReceivableRatio: "",
         insuranceClearingState: "",
       },
+      row: {},
+      companyList: [],
+      UpdateList: [],
       columns: [
         //数据列
         { prop: "id", label: " 编号", minWidth: 160 },
@@ -366,6 +391,9 @@ export default {
           minWidth: 160,
         },
         { prop: "maxReceivable", label: "最大应付金额", minWidth: 160 },
+        { prop: "subsidyRatio", label: "补贴比例", minWidth: 160 },
+        { prop: "subsidyAmount", label: "补贴金额", minWidth: 160 },
+        { prop: "totalReceivableAmount", label: "总应收金额", minWidth: 160 },
         {
           prop: "clearingState",
           label: "结算状态",
@@ -379,8 +407,6 @@ export default {
           formatter: this.insuranceClearingStateFormatter,
         },
       ],
-      row: {},
-      companyList: [],
     };
   },
   created() {
@@ -433,6 +459,7 @@ export default {
                 type: "success",
                 message: res.msg,
               });
+              this.findPage();
             } else {
               this.$message({
                 type: "error",
@@ -443,9 +470,61 @@ export default {
         }
       });
     },
+    handleDelete(ids) {
+      this.$confirm("此操作将永久删除, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.$api.task.sourcedeletes(ids).then((res) => {
+            if (res.code == "200") {
+              this.$message({
+                type: "success",
+                message: "删除成功!",
+              });
+              this.findPage();
+            } else {
+              this.$message({
+                type: "error",
+                message: res.msg,
+              });
+            }
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+    //批量修改
     handleTableSettled(ids) {
-      this.plyNoList = ids;
-      this.dialogVisible11 = true;
+      console.log(ids)
+      this.UpdateList = ids;
+      this.dialogUpdateVisible = true;
+    },
+    BulkUpdate() {
+      let params={
+        ids:this.UpdateList,
+        insuranceClearingState:this.insuranceClearingState,
+      }
+      this.$api.task.sourceUpdates(params).then((res) => {
+        if (res.code == "200") {
+          this.$message({
+            type: "success",
+            message: "修改成功!",
+          });
+          this.dialogUpdateVisible = false;
+          this.findPage();
+        } else {
+          this.$message({
+            type: "error",
+            message: res.msg,
+          });
+        }
+      });
     },
     Search() {
       this.findPage();