ソースを参照

Merge branch 'dev' of http://39.101.143.165:8090/dong_k/tenant-Platform into dev

@dongkboy 3 ヶ月 前
コミット
8fd5975cfa

+ 1 - 0
src/api/modules/finance.ts

@@ -15,6 +15,7 @@ const financeApi = (axiosInstance: ApiInstance) => ({
     isLock: (data: string) => axiosInstance.get(`/feeAudit/isLock?orderNo=${data}`), // 判断领取按钮是否锁定
     verifyOrder: (data: any) => axiosInstance.post('/feeAudit/verifyOrder', data), // 审核通过/不通过
 
+    deleteIncomesByIds:(data: any) => axiosInstance.post('/receivable/deleteIncomesByIds',data), //私有协议-手续费应收-应收列表删除
     getCommissionReceivableList:(data: any) => axiosInstance.post('/receivable/getCommissionReceivableList',data), //私有协议-手续费应收-应收列表
     addReceivable: (data: any) => axiosInstance.post('/receivable/addReceivable', data), // 添加应收
     exportSuperviseExcel: (data: any) => axiosInstance.post('/receivable/exportSuperviseExcel', data, {responseType: 'blob'}), // 车险应收导出

+ 9 - 5
src/views/quoteConfig/dispatch/components/rule.vue

@@ -111,11 +111,15 @@
                   @click="handleRemoveRow(groupIndex, rowIndex)" v-if="group.actions.length > 1" />
               </div>
             </el-form-item>
-
-            <!-- 组内添加并且条件按钮 -->
-            <el-button type="text" @click="handleAddRow(groupIndex)" class="add-condition-btn">
-              + 并且条件
-            </el-button>
+            <div class="flex justify-between items-center">
+              <!-- 组内添加并且条件按钮 -->
+              <el-button type="text" @click="handleAddRow(groupIndex)" class="add-condition-btn">
+                + 并且条件
+              </el-button>
+              <el-button v-if="groupIndex!==0" type="text" @click="formData.conditionGroups=formData.conditionGroups.filter(v=>v.groupKey!==group.groupKey)" class="add-condition-btn">
+                删除
+              </el-button>
+            </div>
           </div>
         </div>
 

+ 34 - 9
src/views/receivable/handingFee/index.vue

@@ -139,6 +139,7 @@
               <template #dropdown>
                 <el-dropdown-menu>
                   <el-dropdown-item command="数据导入">数据导入</el-dropdown-item>
+                  <el-dropdown-item command="删除">删除</el-dropdown-item>
                 </el-dropdown-menu>
               </template>
             </el-dropdown>
@@ -175,6 +176,7 @@
           <el-table-column label="操作" width="120" fixed="right">
             <template #default="scope">
               <el-button link type="primary" @click="toEdit(scope.row)">编辑</el-button>
+              <el-button link type="primary" @click="toDelete([scope.row.id])">删除</el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -304,6 +306,9 @@
           <div class="col-108 m-r-8">
             <el-button class="radius-2px width-100" type="primary" @click="handleInvoice">应收开票</el-button>
           </div>
+          <div class="col-108 m-r-8">
+            <el-button class="radius-2px width-100" type="primary" @click="dropdownCommand('删除')">删除</el-button>
+          </div>
           <div class="col-108 m-r-8">
             <el-button class="radius-2px width-100" type="primary" @click="handleExport1">导出</el-button>
           </div>
@@ -335,9 +340,10 @@
           <el-table-column prop="syStartDate" label="商业险起保日期" width="150"></el-table-column>
           <el-table-column prop="createTime" label="创建时间" width="150"></el-table-column>
           <el-table-column prop="dockingPerson" label="对接人" width="100"></el-table-column>
-          <el-table-column label="操作" width="120" fixed="right">
+          <el-table-column label="操作" width="160" fixed="right">
             <template #default="scope">
               <el-button link type="primary" @click="toEdit(scope.row)">编辑</el-button>
+              <el-button link type="primary" @click="toDelete([scope.row.id])">删除</el-button>
               <el-dropdown class="width-100" trigger="click" placement="bottom" @command="dropdownCommand">
                 <el-button class="radius-2px width-100">
                   更多&nbsp;&nbsp;<el-icon>
@@ -508,7 +514,7 @@
 </template>
 
 <script setup lang="ts">
-import { ElMessage } from "element-plus";
+import { ElMessage, ElMessageBox } from "element-plus";
 import { useRouter } from 'vue-router'
 
 import api from '@/api'
@@ -535,13 +541,25 @@ const handleTabsClick = (e) => {
 let isTrue = ref(false)
 let receivableForm = ref({})
 
-let option = ref([])
-const tableProps = ref({
-  value: "id",
-  label: "name",
-  children: "children",
-  checkStrictly: true,
-});
+const toDelete = (ids) => {
+  ElMessageBox.confirm(
+    '确定要删除吗',
+    '删除应收订单',
+    {
+      confirmButtonText: '确定',
+      type: 'error',
+      center: true,
+      confirmButtonClass: 'el-button--danger',
+    }
+  ).then(() => {
+    api.financeApi.deleteIncomesByIds(ids).then((res: any) => {
+      if (res.code == 200) {
+        ElMessage.success('删除成功')
+        reset()
+      }
+    })
+  })
+}
 
 let ReceiveDataRef1 = ref()
 let ReceiveDataRef2 = ref()
@@ -651,6 +669,13 @@ const dropdownCommand = (e) => {
   if (e === '数据导入') {
     batchShow.value = true
   }
+  if (e === '删除') {
+    if (selectedList.value.length === 0) {
+      ElMessage.warning('请选择删除的数据')
+      return
+    }
+    toDelete(selectedList.value)
+  }
 }
 
 let total1 = ref(0)