😎前端控件增加加载动画;bom、工艺路线列表默认显示行数改为2000行
This commit is contained in:
parent
179b17a4c8
commit
04e0050b97
@ -45,7 +45,8 @@
|
||||
<template #row_buttons="{ row }">
|
||||
<el-tooltip content="同步到ERP" placement="top">
|
||||
<el-button icon="ele-Promotion" size="small" text="" type="success" @click="syncToSAP(row)"
|
||||
v-auth="'productionMaterialsManagement/syncToSAP'" v-if="row.fld004607=='A'||row.fld004607=='M'"> 同步到SAP </el-button>
|
||||
v-auth="'productionMaterialsManagement/syncToSAP'"
|
||||
v-if="row.fld004607 == 'A' || row.fld004607 == 'M'"> 同步到SAP </el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</vxe-grid>
|
||||
@ -57,7 +58,7 @@
|
||||
|
||||
<script lang="ts" setup name="productionMaterialsManagement">
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
import { ElMessageBox, ElMessage, ElLoading } from "element-plus";
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
@ -134,9 +135,9 @@ const gridEvents: VxeGridListeners = {
|
||||
const options = useVxeTable(
|
||||
{
|
||||
id: 'productionMaterialsManagement',
|
||||
name: '产品管理',
|
||||
name: '生产物料',
|
||||
columns: [
|
||||
{ type: 'checkbox', title: '', width: 60},
|
||||
{ type: 'checkbox', title: '', width: 60 },
|
||||
{ type: 'seq', title: '序号', width: 60 },
|
||||
{ field: '_System_objNBS', title: '项目编号', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
{ field: '_System_ObjDescription', title: '项目名称', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
@ -171,6 +172,10 @@ onMounted(() => {
|
||||
// 同步到SAP
|
||||
const syncToSAP = async (row: any) => {
|
||||
options.loading = true;
|
||||
// 显示加载效果
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: '同步中,请勿操作',
|
||||
});
|
||||
ElMessageBox.confirm(`确定要同步物料吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@ -184,8 +189,13 @@ const syncToSAP = async (row: any) => {
|
||||
} else {
|
||||
ElMessage.error("同步失败");
|
||||
}
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
});
|
||||
options.loading = false;
|
||||
|
||||
};
|
||||
@ -194,7 +204,10 @@ const syncToSAP = async (row: any) => {
|
||||
const batchSyncToSAP = async () => {
|
||||
options.loading = true;
|
||||
var data = xGrid.value?.getCheckboxRecords();
|
||||
|
||||
// 显示加载效果
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: '批量同步中,请勿操作',
|
||||
});
|
||||
ElMessageBox.confirm(`确定要批量同步物料吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@ -213,13 +226,18 @@ const batchSyncToSAP = async () => {
|
||||
error++
|
||||
}
|
||||
}
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
ElMessageBox.alert("同步成功:" + succeed + ";" + "同步失败:" + error, '批量同步结果', {
|
||||
// 如果你想禁用它的自动对焦
|
||||
// autofocus: false,
|
||||
confirmButtonText: 'OK'
|
||||
})
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
});
|
||||
options.loading = false;
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
<script lang="ts" setup name="administrativeMaterialManagement">
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
import { ElMessageBox, ElMessage, ElLoading } from "element-plus";
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
@ -171,6 +171,10 @@ onMounted(() => {
|
||||
// 同步到SAP
|
||||
const syncToSAP = async (row: any) => {
|
||||
options.loading = true;
|
||||
// 显示加载效果
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: '同步中,请勿操作',
|
||||
});
|
||||
ElMessageBox.confirm(`确定要同步物料吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@ -184,8 +188,13 @@ const syncToSAP = async (row: any) => {
|
||||
} else {
|
||||
ElMessage.error("同步失败");
|
||||
}
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
});
|
||||
options.loading = false;
|
||||
|
||||
};
|
||||
@ -193,6 +202,10 @@ const syncToSAP = async (row: any) => {
|
||||
//物料批量同步到SAP
|
||||
const batchSyncToSAP = async () => {
|
||||
options.loading = true;
|
||||
// 显示加载效果
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: '批量同步中,请勿操作',
|
||||
});
|
||||
var data = xGrid.value?.getCheckboxRecords();
|
||||
|
||||
ElMessageBox.confirm(`确定要批量同步物料吗?`, '提示', {
|
||||
@ -218,8 +231,13 @@ const batchSyncToSAP = async () => {
|
||||
// autofocus: false,
|
||||
confirmButtonText: 'OK'
|
||||
})
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
});
|
||||
options.loading = false;
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@
|
||||
<!-- 这里可以放置 BOM 的具体内容 -->
|
||||
<el-card class="full-table" shadow="hover" style="margin-top: 5px;height: 100%;">
|
||||
<el-form :model="stateBom.queryParams" ref="queryForm" :show-message="false" :inlineMessage="true"
|
||||
label-width="auto" style="flex: 1 1 0%" @submit.prevent="handleQueryBom">
|
||||
label-width="auto" style="flex: 1 1 0%;display: none;" @submit.prevent="handleQueryBom">
|
||||
<el-input v-model="stateBom.queryParams.ParentGuid" placeholder="父GUID" @click="handleQueryBom" />
|
||||
</el-form>
|
||||
|
||||
@ -91,7 +91,7 @@
|
||||
<!-- 这里可以放置 BOM 的具体内容 -->
|
||||
<el-card class="full-table" shadow="hover" style="margin-top: 5px;height: 100%;">
|
||||
<el-form :model="stateProcessRoute.queryParams" ref="queryForm" :show-message="false" :inlineMessage="true"
|
||||
label-width="auto" style="flex: 1 1 0%" @submit.prevent="handleQueryProcessRoute">
|
||||
label-width="auto" style="flex: 1 1 0% ;display: none" @submit.prevent="handleQueryProcessRoute">
|
||||
<el-input v-model="stateProcessRoute.queryParams.ParentGuid" placeholder="父GUID" @click="handleQueryProcessRoute" />
|
||||
</el-form>
|
||||
|
||||
@ -111,7 +111,7 @@
|
||||
|
||||
<script lang="ts" setup name="productManagement">
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
import { ElMessageBox, ElMessage, ElLoading } from "element-plus";
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
@ -249,6 +249,10 @@ const gridEvents: VxeGridListeners = {
|
||||
// 同步到SAP
|
||||
const syncToSAP = async (row: any) => {
|
||||
options.loading = true;
|
||||
// 显示加载效果
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: '同步中,请勿操作',
|
||||
});
|
||||
ElMessageBox.confirm(`确定要同步物料吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@ -262,8 +266,13 @@ const syncToSAP = async (row: any) => {
|
||||
} else {
|
||||
ElMessage.error("同步失败");
|
||||
}
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
});
|
||||
options.loading = false;
|
||||
|
||||
};
|
||||
@ -296,7 +305,7 @@ const stateBom = reactive({
|
||||
ParentGuid: undefined
|
||||
},
|
||||
localPageParam: {
|
||||
pageSize: 50 as number,
|
||||
pageSize: 2000 as number,
|
||||
defaultSort: { field: 'createTime', order: 'asc', descStr: 'desc' },
|
||||
},
|
||||
visible: false,
|
||||
@ -349,6 +358,10 @@ const handleQueryBom = async (reset = false) => {
|
||||
//Bom同步到sap
|
||||
const syncToSAPBom = async () => {
|
||||
options.loading = true;
|
||||
// 显示加载效果
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: 'Bom同步中,请勿操作',
|
||||
});
|
||||
var data = bomxGrid.value?.getTableData().fullData;
|
||||
ElMessageBox.confirm(`确定要同步BOM吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
@ -363,13 +376,22 @@ const syncToSAPBom = async () => {
|
||||
} else {
|
||||
ElMessage.error("同步失败");
|
||||
}
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
});
|
||||
options.loading = false;
|
||||
}
|
||||
//物料批量同步到SAP
|
||||
const batchSyncToSAP = async () => {
|
||||
options.loading = true;
|
||||
// 显示加载效果
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: '批量同步中,请勿操作',
|
||||
});
|
||||
var data = xGrid.value?.getCheckboxRecords();
|
||||
|
||||
ElMessageBox.confirm(`确定要批量同步物料吗?`, '提示', {
|
||||
@ -396,8 +418,13 @@ const batchSyncToSAP = async () => {
|
||||
// autofocus: false,
|
||||
confirmButtonText: 'OK'
|
||||
})
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
});
|
||||
options.loading = false;
|
||||
}
|
||||
|
||||
@ -422,7 +449,7 @@ const stateProcessRoute = reactive({
|
||||
ParentGuid: undefined
|
||||
},
|
||||
localPageParam: {
|
||||
pageSize: 50 as number,
|
||||
pageSize: 2000 as number,
|
||||
defaultSort: { field: 'createTime', order: 'asc', descStr: 'desc' },
|
||||
},
|
||||
visible: false,
|
||||
@ -475,6 +502,10 @@ const handleQueryProcessRoute = async (reset = false) => {
|
||||
//工艺路线同步到sap
|
||||
const syncToSAPprocessRoute = async () => {
|
||||
options.loading = true;
|
||||
// 显示加载效果
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: '工艺路线同步中,请勿操作',
|
||||
});
|
||||
var data = processRoutexGrid.value?.getTableData().fullData;
|
||||
ElMessageBox.confirm(`确定要同步工艺路线吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
@ -489,8 +520,13 @@ const syncToSAPprocessRoute = async () => {
|
||||
} else {
|
||||
ElMessage.error("同步失败");
|
||||
}
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
});
|
||||
options.loading = false;
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@
|
||||
<!-- 这里可以放置 BOM 的具体内容 -->
|
||||
<el-card class="full-table" shadow="hover" style="margin-top: 5px;height: 100%;">
|
||||
<el-form :model="stateBom.queryParams" ref="queryForm" :show-message="false" :inlineMessage="true"
|
||||
label-width="auto" style="flex: 1 1 0%" @submit.prevent="handleQueryBom">
|
||||
label-width="auto" style="flex: 1 1 0%;display: none;" @submit.prevent="handleQueryBom">
|
||||
<el-input v-model="stateBom.queryParams.ParentGuid" placeholder="父GUID" @click="handleQueryBom" />
|
||||
</el-form>
|
||||
|
||||
@ -82,7 +82,7 @@
|
||||
<!-- 这里可以放置 BOM 的具体内容 -->
|
||||
<el-card class="full-table" shadow="hover" style="margin-top: 5px;height: 100%;">
|
||||
<el-form :model="stateProcessRoute.queryParams" ref="queryForm" :show-message="false" :inlineMessage="true"
|
||||
label-width="auto" style="flex: 1 1 0%" @submit.prevent="handleQueryProcessRoute">
|
||||
label-width="auto" style="flex: 1 1 0%;display: none" @submit.prevent="handleQueryProcessRoute">
|
||||
<el-input v-model="stateProcessRoute.queryParams.ParentGuid" placeholder="父GUID" @click="handleQueryProcessRoute" />
|
||||
</el-form>
|
||||
|
||||
@ -100,7 +100,7 @@
|
||||
</template>
|
||||
<script lang="ts" setup name="projectManagement">
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
import { ElMessageBox, ElMessage, ElLoading } from "element-plus";
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
@ -226,6 +226,10 @@ const handleQuery = async (reset = false) => {
|
||||
// 同步到SAP
|
||||
const syncToSAP = async (row: any) => {
|
||||
options.loading = true;
|
||||
// 显示加载效果
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: '同步中,请勿操作',
|
||||
});
|
||||
ElMessageBox.confirm(`确定要同步物料吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@ -239,8 +243,13 @@ const syncToSAP = async (row: any) => {
|
||||
} else {
|
||||
ElMessage.error("同步失败");
|
||||
}
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
});
|
||||
options.loading = false;
|
||||
|
||||
};
|
||||
@ -248,6 +257,10 @@ const syncToSAP = async (row: any) => {
|
||||
//物料批量同步到SAP
|
||||
const batchSyncToSAP = async () => {
|
||||
options.loading = true;
|
||||
// 显示加载效果
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: '批量同步中,请勿操作',
|
||||
});
|
||||
var data = xGrid.value?.getCheckboxRecords();
|
||||
|
||||
ElMessageBox.confirm(`确定要批量同步物料吗?`, '提示', {
|
||||
@ -273,8 +286,13 @@ const batchSyncToSAP = async () => {
|
||||
// autofocus: false,
|
||||
confirmButtonText: 'OK'
|
||||
})
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
});
|
||||
options.loading = false;
|
||||
}
|
||||
|
||||
@ -287,7 +305,7 @@ const stateBom = reactive({
|
||||
ParentGuid: undefined
|
||||
},
|
||||
localPageParam: {
|
||||
pageSize: 50 as number,
|
||||
pageSize: 2000 as number,
|
||||
defaultSort: { field: 'createTime', order: 'asc', descStr: 'desc' },
|
||||
},
|
||||
visible: false,
|
||||
@ -349,6 +367,10 @@ const handleQueryBom = async (reset = false) => {
|
||||
//Bom同步到sap
|
||||
const syncToSAPBom = async () => {
|
||||
options.loading = true;
|
||||
// 显示加载效果
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: 'Bom同步中,请勿操作',
|
||||
});
|
||||
var data = bomxGrid.value?.getTableData().fullData;
|
||||
ElMessageBox.confirm(`确定要同步BOM吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
@ -363,8 +385,13 @@ const syncToSAPBom = async () => {
|
||||
} else {
|
||||
ElMessage.error("同步失败");
|
||||
}
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
});
|
||||
options.loading = false;
|
||||
}
|
||||
|
||||
@ -389,7 +416,7 @@ const stateProcessRoute = reactive({
|
||||
ParentGuid: undefined
|
||||
},
|
||||
localPageParam: {
|
||||
pageSize: 50 as number,
|
||||
pageSize: 2000 as number,
|
||||
defaultSort: { field: 'createTime', order: 'asc', descStr: 'desc' },
|
||||
},
|
||||
visible: false,
|
||||
@ -442,6 +469,10 @@ const handleQueryProcessRoute = async (reset = false) => {
|
||||
//工艺路线同步到sap
|
||||
const syncToSAPprocessRoute = async () => {
|
||||
options.loading = true;
|
||||
// 显示加载效果
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: '工艺路线同步中,请勿操作',
|
||||
});
|
||||
var data = processRoutexGrid.value?.getTableData().fullData;
|
||||
ElMessageBox.confirm(`确定要同步工艺路线吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
@ -456,8 +487,13 @@ const syncToSAPprocessRoute = async () => {
|
||||
} else {
|
||||
ElMessage.error("同步失败");
|
||||
}
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
});
|
||||
options.loading = false;
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
||||
|
||||
<script lang="ts" setup name="changeNoticeEcn">
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
import { ElMessageBox, ElMessage, ElLoading } from "element-plus";
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
@ -91,7 +91,7 @@ const options = useVxeTable(
|
||||
{ type: 'checkbox', title: '', width: 60 },
|
||||
{ type: 'seq', title: '序号', width: 60 },
|
||||
{ field: '_System_objNBS', title: 'ECN编号', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
{ field: '_System_objDescription', title: '变更原因', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
{ field: '_System_ObjDescription', title: '变更原因', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
{field: 'fld004693', title: '有效日期', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
{ field: '_System_CurrentStage', title: '_System_CurrentStage', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
{ field: 'fld005294', title: '物料同步状态', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
@ -162,6 +162,10 @@ const gridEvents: VxeGridListeners = {
|
||||
// 同步到SAP
|
||||
const syncToSAP = async (row: any) => {
|
||||
options.loading = true;
|
||||
// 显示加载效果
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: '同步中,请勿操作',
|
||||
});
|
||||
ElMessageBox.confirm(`确定要同步物料吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@ -175,8 +179,13 @@ const syncToSAP = async (row: any) => {
|
||||
} else {
|
||||
ElMessage.error("同步失败");
|
||||
}
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
});
|
||||
options.loading = false;
|
||||
|
||||
};
|
||||
@ -184,6 +193,10 @@ const syncToSAP = async (row: any) => {
|
||||
//ECN批量同步到SAP
|
||||
const batchSyncToSAP = async () => {
|
||||
options.loading = true;
|
||||
// 显示加载效果
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: '批量同步中,请勿操作',
|
||||
});
|
||||
var data = xGrid.value?.getCheckboxRecords();
|
||||
|
||||
ElMessageBox.confirm(`确定要批量同步ECN吗?`, '提示', {
|
||||
@ -209,8 +222,13 @@ const batchSyncToSAP = async () => {
|
||||
// autofocus: false,
|
||||
confirmButtonText: 'OK'
|
||||
})
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
});
|
||||
options.loading = false;
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,7 @@
|
||||
</template>
|
||||
<script lang="ts" setup name="projectManagement">
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
import { ElMessageBox, ElMessage, ElLoading } from "element-plus";
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
@ -226,6 +226,10 @@ const handleQuery = async (reset = false) => {
|
||||
// 同步到SAP
|
||||
const syncToSAP = async (row: any) => {
|
||||
options.loading = true;
|
||||
// 显示加载效果
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: '同步中,请勿操作',
|
||||
});
|
||||
ElMessageBox.confirm(`确定要同步物料吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@ -239,8 +243,13 @@ const syncToSAP = async (row: any) => {
|
||||
} else {
|
||||
ElMessage.error("同步失败");
|
||||
}
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
});
|
||||
options.loading = false;
|
||||
|
||||
};
|
||||
@ -248,6 +257,10 @@ const syncToSAP = async (row: any) => {
|
||||
//物料批量同步到SAP
|
||||
const batchSyncToSAP = async () => {
|
||||
options.loading = true;
|
||||
// 显示加载效果
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: '批量同步中,请勿操作',
|
||||
});
|
||||
var data = xGrid.value?.getCheckboxRecords();
|
||||
|
||||
ElMessageBox.confirm(`确定要批量同步物料吗?`, '提示', {
|
||||
@ -273,8 +286,13 @@ const batchSyncToSAP = async () => {
|
||||
// autofocus: false,
|
||||
confirmButtonText: 'OK'
|
||||
})
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
});
|
||||
options.loading = false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user