@dongkboy 2 лет назад
Родитель
Сommit
4932976f8f

+ 9 - 1
src/http/moudules/insCompany.js

@@ -572,7 +572,7 @@ export const deleteDrivingInsurance = (data) => {
     data
   })
 }
-//非车规则删除
+//批量修改
 export const endDateBatch = (data) => {
   return axios({
     url: '/plt/new/agreement/costs/endDateBatch',
@@ -580,3 +580,11 @@ export const endDateBatch = (data) => {
     data
   })
 }
+//批量删除
+export const deleteBatch = (data) => {
+  return axios({
+    url: '/plt/new/agreement/costs/deleteBatch',
+    method: "post",
+    data
+  })
+}

+ 22 - 5
src/views/AgreementManage/CarInsurance/AgreementEntry.vue

@@ -432,11 +432,12 @@
         </el-form-item>
       </el-form>
       <kt-common-table :tableHeights="600" :SerialShow="false" :operationWidth="250" :showOperation="true"
-        :showBatchDelete="true" :showBatchSettled="false" :showBatchPrint="false" :data="productPageResult"
-        :columns="productColumns" @findPage="productCostFindPage" button2Name="编辑"
+        :showBatchDelete="true" :showBatchSettled="false" :showBatchPrint="false" :customToolseletted="true"
+        :data="productPageResult" :columns="productColumns" @findPage="productCostFindPage" button2Name="编辑"
         permsButton2="agreement:input:productCost" @handleButton2="productUpdate" deleteName="批量修改"
-        @handleDelete="batchUpdate" button3Name="删除" permsButton3="agreement:input:productCost"
-        @handleButton3="productDelete" button5Name="轨迹" @handleButton5="trajectory" button3Icon="">
+        @handleDelete="batchUpdate" @customTool="batchDelete" customToolName="批量删除" button3Name="删除"
+        permsButton3="agreement:input:productCost" @handleButton3="productDelete" button5Name="轨迹"
+        @handleButton5="trajectory" button3Icon="">
       </kt-common-table>
     </el-dialog>
     <!-- 订单轨迹 -->
@@ -2885,6 +2886,22 @@ export default {
       this.batchUpdateForm.ids = data;
       this.batchdialogVisible = true;
     },
+    batchDelete(data) {
+      this.$api.insCompany.deleteBatch( data).then((res) => {
+        if (res.code == '200') {
+          this.productCostFindPage();
+          this.$message({
+            type: 'success',
+            message: res.msg,
+          });
+        } else {
+          this.$message({
+            type: 'error',
+            message: res.msg,
+          });
+        }
+      });
+    },
     batchCostsubmit() {
       this.$api.insCompany.endDateBatch(this.batchUpdateForm).then((res) => {
         if (res.code == '200') {
@@ -3090,7 +3107,7 @@ export default {
       }
     },
     disabledDate1(time) {
-       let datetime = this.productcopyItemPageRequest.costStartDate;
+      let datetime = this.productcopyItemPageRequest.costStartDate;
       const disabledTime = new Date(datetime).getTime() - 8.64e7;
       return time.getTime() < disabledTime;
     },