|
@@ -108,6 +108,9 @@
|
|
|
<Icon icon="ep:plus" class="mr-5px"/>
|
|
<Icon icon="ep:plus" class="mr-5px"/>
|
|
|
长者用药
|
|
长者用药
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+ <el-button type="warning" plain v-hasPermi="['daily-fee:extend:deletes']" :disabled="!ids.length" @click="handleDeletes">
|
|
|
|
|
+ 批量删除
|
|
|
|
|
+ </el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</TabBarBtn>
|
|
</TabBarBtn>
|
|
|
|
|
|
|
@@ -317,6 +320,8 @@ const selectData = ref([])
|
|
|
const handleSelectionChange = (val) => {
|
|
const handleSelectionChange = (val) => {
|
|
|
ids.value = val.map((item) => item.id)
|
|
ids.value = val.map((item) => item.id)
|
|
|
selectData.value = val
|
|
selectData.value = val
|
|
|
|
|
+
|
|
|
|
|
+ console.log("AAA",ids.value,selectData.value)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const handleDelete = async (id: number) => {
|
|
const handleDelete = async (id: number) => {
|
|
@@ -346,6 +351,33 @@ const handleDelete = async (id: number) => {
|
|
|
} catch {}
|
|
} catch {}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const handleDeletes = async () => {
|
|
|
|
|
+ if(!ids.value.length){
|
|
|
|
|
+ message.error('请选择一条数据')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ try {
|
|
|
|
|
+ // 删除的二次确认
|
|
|
|
|
+ await ElMessageBox({
|
|
|
|
|
+ title: '温馨提示',
|
|
|
|
|
+ message: h('p', null, [
|
|
|
|
|
+ h('span', null, '删除选中数据可能会影响'),
|
|
|
|
|
+ h('span', { style: 'color: red' }, '“账单缴费”'),
|
|
|
|
|
+ h('span', null, ',是否删除选中数据? ')
|
|
|
|
|
+ ]),
|
|
|
|
|
+ confirmButtonText: t('common.ok'),
|
|
|
|
|
+ cancelButtonText: t('common.cancel'),
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ showCancelButton: true
|
|
|
|
|
+ })
|
|
|
|
|
+ // 发起删除
|
|
|
|
|
+ await delDailyExpenses(ids.value)
|
|
|
|
|
+ message.success(t('common.delSuccess'))
|
|
|
|
|
+ // 刷新列表
|
|
|
|
|
+ await getList()
|
|
|
|
|
+ } catch {}
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// 导入
|
|
// 导入
|
|
|
const importRef = ref()
|
|
const importRef = ref()
|
|
|
const handleImport = () => {
|
|
const handleImport = () => {
|