|
@@ -34,7 +34,7 @@
|
|
|
</el-button>
|
|
|
</HcTooltip>
|
|
|
<HcTooltip keys="other-first-item-repeal" v-if="tabTypeKey === 'query'">
|
|
|
- <el-button hc-btn :disabled="tableSelectionKeys.length <= 0">
|
|
|
+ <el-button hc-btn :disabled="tableSelectionKeys.length <= 0" @click="batchAbolishClick">
|
|
|
<HcIcon name="delete-bin-3"/>
|
|
|
<span>批量废除</span>
|
|
|
</el-button>
|
|
@@ -184,6 +184,7 @@ import firstApi from '~api/other/first-item';
|
|
|
import tasksApi from '~api/tasks/data';
|
|
|
import {getStoreData, setStoreData} from '~src/utils/storage'
|
|
|
import {getArrValue, isString, getObjValue, getObjNullValue,deepClone} from "vue-utils-plus"
|
|
|
+import queryApi from "~api/data-fill/query";
|
|
|
|
|
|
//变量
|
|
|
const router = useRouter()
|
|
@@ -674,6 +675,41 @@ const batchPrint = async () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+//废除
|
|
|
+const batchAbolishClick = () => {
|
|
|
+ const rows = tableSelectionKeys.value;
|
|
|
+ //判断是否满足条件
|
|
|
+ const result = rows.every(({status})=> {
|
|
|
+ return status !== 0 && status !== 3
|
|
|
+ })
|
|
|
+ //判断状态
|
|
|
+ if (result) {
|
|
|
+ //拼接ID
|
|
|
+ const ids = rowsToId(rows)
|
|
|
+ window?.$messageBox?.alert('是否废除勾选的已上报文件?', '废除文件', {
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonText: '确定废除',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ callback: (action) => {
|
|
|
+ if (action === 'confirm') {
|
|
|
+ batchAbolishSave(ids)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ window.$message?.warning('未上报的文件不能废除')
|
|
|
+ }
|
|
|
+}
|
|
|
+//废除勾选的已上报文件
|
|
|
+const batchAbolishSave = async (ids) => {
|
|
|
+ const { error, code } = await queryApi.batchAbolish({ids: ids})
|
|
|
+ //处理数据
|
|
|
+ if (!error && code === 200) {
|
|
|
+ window.$message?.success('批量废除成功')
|
|
|
+ tableSelectionKeys.value = []
|
|
|
+ getTableData()
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
//拼接ID
|
|
|
const rowsToId = (rows) => {
|