优化loading

This commit is contained in:
gyq
2025-04-09 17:57:51 +08:00
parent e443b5b51e
commit f466bdc9f4
10 changed files with 23 additions and 23 deletions

View File

@@ -235,13 +235,13 @@ async function submitHandle() {
}
Loading.value = true;
await printerAdd(form.value, form.value.id ? "put" : "post");
Loading.value = false;
ElMessage.success(form.value.id ? "编辑成功" : "添加成功");
printStore.init();
router.back();
} catch (error) {
console.log(error);
}
Loading.value = false;
}
// 查询打印机详情

View File

@@ -155,7 +155,6 @@ async function tbPrintMachineDeleteAjax() {
try {
delLoading.value = true;
await printerAdd({ id: deleteId.value }, 'delete');
delLoading.value = false;
dialogVisible.value = false;
ElMessage.success("删除成功");
tbPrintMachineGetAjax();
@@ -163,6 +162,7 @@ async function tbPrintMachineDeleteAjax() {
} catch (error) {
console.log(error);
}
delLoading.value = false;
}
// 获取打印机列表

View File

@@ -65,8 +65,8 @@ function refundConfirm() {
emits('succcess')
} catch (error) {
console.log(error);
refundLoading.value = false
}
refundLoading.value = false
}
})
}

View File

@@ -200,9 +200,9 @@ async function groupOrdergroupScanHandle() {
ElMessage.success('核销成功')
emits('succcess')
} catch (error) {
groupDetailLoading.value = false
console.log('groupOrdergroupScanHandle.error', error);
}
groupDetailLoading.value = false
}
const douyin_table = ref(null)
@@ -259,12 +259,12 @@ async function submitHandle() {
break;
}
} catch (error) {
loading.value = false
console.log('submitHandle.error', error);
if (error.code == 4399) {
BindShopRef.value.show()
}
}
loading.value = false
}
// 重新扫码

View File

@@ -88,7 +88,7 @@
</template>
<template v-else>
<el-text tag="del" class="del" size="small">{{ item.skuList[0].salePrice
}}</el-text>
}}</el-text>
<el-text>{{ +item.skuList[0].memberPrice || item.skuList[0].salePrice }}</el-text>
</template>
</div>
@@ -682,7 +682,6 @@ async function closeSellHandle() {
id: goodEditorItem.value.id,
isSoldOut: 0
})
closeSellLoading.value = false
showCloseSell.value = false
ElMessage({
type: 'success',
@@ -693,6 +692,7 @@ async function closeSellHandle() {
} catch (error) {
console.log(error);
}
closeSellLoading.value = false
}
// 上架商品
@@ -718,7 +718,6 @@ async function putawayHandle(item) {
id: goodEditorItem.value.id,
isSale: 1
})
showPutawayLoading.value = false
showPutaway.value = false
ElMessage({
type: 'success',
@@ -729,6 +728,7 @@ async function putawayHandle(item) {
} catch (error) {
console.log(error);
}
showPutawayLoading.value = false
}
// 确认操作
@@ -751,7 +751,6 @@ async function goodEditorConfirm() {
})
}
goodEditorLoading.value = false
showGoodEditor.value = false
ElMessage({
type: 'success',
@@ -762,6 +761,7 @@ async function goodEditorConfirm() {
} catch (error) {
console.log(error);
}
goodEditorLoading.value = false
}
// 显示修改库存
@@ -801,7 +801,6 @@ async function goodsEditorStockConfirm() {
productId: goodsEditorStockItem.value.id,
stock: goodsEditorStockNumber.value
})
goodsEditorStockLoading.value = false
showGoodsEditorStock.value = false
ElMessage({
type: 'success',
@@ -812,6 +811,7 @@ async function goodsEditorStockConfirm() {
} catch (error) {
console.log(error);
}
goodsEditorStockLoading.value = false
}
defineExpose({

View File

@@ -160,9 +160,9 @@ async function showStaffDiscountHandle() {
// global.updateData(false)
}
} catch (error) {
discountLoading.value = false
console.log(error);
}
discountLoading.value = false
}
// 获取员工折扣
@@ -211,12 +211,12 @@ async function printOrderLable(isBefore = false) {
type: isBefore ? 1 : 0,
id: orderId,
});
printLoading.value = false;
ElMessage.success(`云打印${isBefore ? '预' : ''}结算单成功`);
}
} catch (error) {
console.log(error);
}
printLoading.value = false;
}
// 订单已支付

View File

@@ -323,9 +323,9 @@ async function delCartHandle(params) {
cartLoading.value = false;
cartListActive.value = 0;
} catch (error) {
cartLoading.value = false;
console.log(error);
}
cartLoading.value = false;
}
// 赠送打包操作

View File

@@ -240,9 +240,9 @@ function refundHandle() {
}
}
} catch (error) {
loading.value = false
console.log(error);
}
loading.value = false
})
}
@@ -284,9 +284,9 @@ async function passwordSuccess(e = '') {
emits('refund')
memberqueryMemberAccountAjax()
} catch (error) {
loading.value = false
console.log(error);
}
loading.value = false
}
function show(row) {