|
@@ -59,10 +59,12 @@
|
|
|
>
|
|
|
</el-button>
|
|
|
<el-button type="primary" @click="onToEnd" :disabled="!scope.isSelected" :loading="state.loading" v-auth="'todo:order:toEnd:multiple'"
|
|
|
- ><SvgIcon name="ele-List" class="mr5" />批量归档<span v-if="proTableRef?.selectedList?.length">({{proTableRef?.selectedList?.length}})</span>
|
|
|
+ ><SvgIcon name="ele-List" class="mr5" />批量归档<span v-if="proTableRef?.selectedList?.length"
|
|
|
+ >({{ proTableRef?.selectedList?.length }})</span
|
|
|
+ >
|
|
|
</el-button>
|
|
|
<el-button type="primary" @click="onAssignOrders" :loading="state.loading" v-auth="'todo:order:assignOrders'"
|
|
|
- ><SvgIcon name="ele-List" class="mr5" />分配工单
|
|
|
+ ><SvgIcon name="ele-List" class="mr5" />分配工单
|
|
|
</el-button>
|
|
|
</template>
|
|
|
<template #expiredStatusText="{ row }">
|
|
@@ -103,7 +105,7 @@
|
|
|
><SvgIcon name="iconfont icon-daochu" class="mr5" />交办单导出
|
|
|
</el-button>
|
|
|
<el-button type="primary" @click="onAssignOrders" :loading="state.loading" v-auth="'todo:order:assignOrders'"
|
|
|
- ><SvgIcon name="ele-List" class="mr5" />分配工单
|
|
|
+ ><SvgIcon name="ele-List" class="mr5" />分配工单
|
|
|
</el-button>
|
|
|
</template>
|
|
|
<template #expiredStatusText="{ row }">
|
|
@@ -180,9 +182,9 @@
|
|
|
</template>
|
|
|
<script setup lang="tsx" name="todoOrder">
|
|
|
import { defineAsyncComponent, onMounted, reactive, ref, onActivated, onBeforeUnmount } from 'vue';
|
|
|
-import { ElMessage, ElMessageBox, FormInstance } from 'element-plus';
|
|
|
+import { ElMessage, ElMessageBox, ElNotification, FormInstance } from 'element-plus';
|
|
|
import { formatDate } from '@/utils/formatTime';
|
|
|
-import { orderAverage, orderListTodo } from '@/api/todo/order';
|
|
|
+import { orderAverage, orderBatchArchive, orderListTodo } from '@/api/todo/order';
|
|
|
import { exportJbOrder } from '@/api/business/order';
|
|
|
import { downloadZip } from '@/utils/tools';
|
|
|
import { defaultTimeStartEnd, shortcuts } from '@/utils/constants';
|
|
@@ -212,8 +214,8 @@ const state = reactive<any>({
|
|
|
EndTime: null,
|
|
|
IsUrgent: null,
|
|
|
AreaCode: null,
|
|
|
- SortField:null,
|
|
|
- SortRule:null,
|
|
|
+ SortField: null,
|
|
|
+ SortRule: null,
|
|
|
},
|
|
|
tableData: [], //表单
|
|
|
loading: false, // 加载
|
|
@@ -349,9 +351,9 @@ const requestParams = ref<EmptyObjectType>({});
|
|
|
|
|
|
const queryList = async () => {
|
|
|
state.loading = true;
|
|
|
- if (['ZiGong'].includes(themeConfig.value.appScope) && auth('todo:seats:fastSearch') && state.queryParams.IsHandled === 'false'){
|
|
|
+ if (['ZiGong'].includes(themeConfig.value.appScope) && auth('todo:seats:fastSearch') && state.queryParams.IsHandled === 'false') {
|
|
|
state.queryParams.QueryType = state.queryParams.QueryType ?? 1;
|
|
|
- }else state.queryParams.QueryType = null;
|
|
|
+ } else state.queryParams.QueryType = null;
|
|
|
try {
|
|
|
columns.value = state.queryParams.IsHandled === 'true' ? columnsDone.value : columnsTodo.value;
|
|
|
requestParams.value = Other.deepClone(state.queryParams);
|
|
@@ -437,10 +439,35 @@ const onAssignOrders = () => {
|
|
|
};
|
|
|
// 批量归档
|
|
|
const toEndOrderRef = ref<RefType>();
|
|
|
-const onToEnd = ()=>{
|
|
|
+const onToEnd = () => {
|
|
|
const ids = proTableRef.value.selectedList.map((item: any) => item.id);
|
|
|
- toEndOrderRef.value.openDialog(ids);
|
|
|
-}
|
|
|
+ ElMessageBox.confirm(`您确定要批量归档选中的工单,是否继续?`, '提示', {
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ draggable: true,
|
|
|
+ cancelButtonClass: 'default-button',
|
|
|
+ autofocus: false,
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ state.loading = true;
|
|
|
+ orderBatchArchive({ orderIds: ids })
|
|
|
+ .then((res: any) => {
|
|
|
+ state.loading = false;
|
|
|
+ handleQuery();
|
|
|
+ ElNotification({
|
|
|
+ title: '提示',
|
|
|
+ message: `${res.result}`,
|
|
|
+ type: 'info',
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ state.loading = false;
|
|
|
+ state.dialogVisible = false;
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+};
|
|
|
onMounted(() => {
|
|
|
getBaseData();
|
|
|
queryList();
|