优化loading
This commit is contained in:
@@ -5,10 +5,10 @@ ENV = development
|
|||||||
# VITE_API_WSS = 'wss://sockets.sxczgkj.com/wss'
|
# VITE_API_WSS = 'wss://sockets.sxczgkj.com/wss'
|
||||||
|
|
||||||
# 正式ws
|
# 正式ws
|
||||||
# VITE_API_WSS = 'wss://czgeatws.sxczgkj.com/wss'
|
VITE_API_WSS = 'wss://czgeatws.sxczgkj.com/wss'
|
||||||
|
|
||||||
# 本地ws
|
# 本地ws
|
||||||
VITE_API_WSS = 'ws://192.168.1.31:2348'
|
# VITE_API_WSS = 'ws://192.168.1.31:2348'
|
||||||
|
|
||||||
# 正式 php
|
# 正式 php
|
||||||
VITE_API_PHP_URL = 'https://newblockwlx.sxczgkj.cn/index.php/api'
|
VITE_API_PHP_URL = 'https://newblockwlx.sxczgkj.cn/index.php/api'
|
||||||
@@ -20,10 +20,10 @@ VITE_API_PHP_URL = 'https://newblockwlx.sxczgkj.cn/index.php/api'
|
|||||||
VITE_API_KP_URL = 'https://invoice.sxczgkj.cn/api'
|
VITE_API_KP_URL = 'https://invoice.sxczgkj.cn/api'
|
||||||
|
|
||||||
# 本地调试连接
|
# 本地调试连接
|
||||||
VITE_API_URL = 'http://192.168.1.31/'
|
# VITE_API_URL = 'http://192.168.1.31/'
|
||||||
|
|
||||||
# 线上测试
|
# 线上测试
|
||||||
# VITE_API_URL = 'https://tapi.cashier.sxczgkj.cn'
|
# VITE_API_URL = 'https://tapi.cashier.sxczgkj.cn'
|
||||||
|
|
||||||
# 线上正式
|
# 线上正式
|
||||||
# VITE_API_URL = 'https://cashier.sxczgkj.com'
|
VITE_API_URL = 'https://cashier.sxczgkj.com'
|
||||||
@@ -2,13 +2,13 @@
|
|||||||
ENV = test
|
ENV = test
|
||||||
|
|
||||||
# 测试ws
|
# 测试ws
|
||||||
# VITE_API_WSS = 'ws://192.168.1.31:2348'
|
VITE_API_WSS = 'ws://192.168.1.31:2348'
|
||||||
|
|
||||||
# 测试ws
|
# 测试ws
|
||||||
# VITE_API_WSS = 'wss://sockets.sxczgkj.com/wss'
|
# VITE_API_WSS = 'wss://sockets.sxczgkj.com/wss'
|
||||||
|
|
||||||
# 正式ws
|
# 正式ws
|
||||||
VITE_API_WSS = 'wss://czgeatws.sxczgkj.com/wss'
|
# VITE_API_WSS = 'wss://czgeatws.sxczgkj.com/wss'
|
||||||
|
|
||||||
# 正式 php
|
# 正式 php
|
||||||
VITE_API_PHP_URL = 'https://newblockwlx.sxczgkj.cn/index.php/api'
|
VITE_API_PHP_URL = 'https://newblockwlx.sxczgkj.cn/index.php/api'
|
||||||
@@ -23,7 +23,7 @@ VITE_API_KP_URL = 'https://invoice.sxczgkj.cn/api'
|
|||||||
# VITE_API_URL = 'https://fv901fw8033.vicp.fun/'
|
# VITE_API_URL = 'https://fv901fw8033.vicp.fun/'
|
||||||
|
|
||||||
# 正式Java
|
# 正式Java
|
||||||
VITE_API_URL = 'https://cashier.sxczgkj.com/'
|
# VITE_API_URL = 'https://cashier.sxczgkj.com/'
|
||||||
|
|
||||||
# 本地调试连接
|
# 本地调试连接
|
||||||
# VITE_API_URL = 'http://192.168.1.31/'
|
VITE_API_URL = 'http://192.168.1.31/'
|
||||||
@@ -235,13 +235,13 @@ async function submitHandle() {
|
|||||||
}
|
}
|
||||||
Loading.value = true;
|
Loading.value = true;
|
||||||
await printerAdd(form.value, form.value.id ? "put" : "post");
|
await printerAdd(form.value, form.value.id ? "put" : "post");
|
||||||
Loading.value = false;
|
|
||||||
ElMessage.success(form.value.id ? "编辑成功" : "添加成功");
|
ElMessage.success(form.value.id ? "编辑成功" : "添加成功");
|
||||||
printStore.init();
|
printStore.init();
|
||||||
router.back();
|
router.back();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
Loading.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询打印机详情
|
// 查询打印机详情
|
||||||
|
|||||||
@@ -155,7 +155,6 @@ async function tbPrintMachineDeleteAjax() {
|
|||||||
try {
|
try {
|
||||||
delLoading.value = true;
|
delLoading.value = true;
|
||||||
await printerAdd({ id: deleteId.value }, 'delete');
|
await printerAdd({ id: deleteId.value }, 'delete');
|
||||||
delLoading.value = false;
|
|
||||||
dialogVisible.value = false;
|
dialogVisible.value = false;
|
||||||
ElMessage.success("删除成功");
|
ElMessage.success("删除成功");
|
||||||
tbPrintMachineGetAjax();
|
tbPrintMachineGetAjax();
|
||||||
@@ -163,6 +162,7 @@ async function tbPrintMachineDeleteAjax() {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
delLoading.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取打印机列表
|
// 获取打印机列表
|
||||||
|
|||||||
@@ -65,8 +65,8 @@ function refundConfirm() {
|
|||||||
emits('succcess')
|
emits('succcess')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
refundLoading.value = false
|
|
||||||
}
|
}
|
||||||
|
refundLoading.value = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -200,9 +200,9 @@ async function groupOrdergroupScanHandle() {
|
|||||||
ElMessage.success('核销成功')
|
ElMessage.success('核销成功')
|
||||||
emits('succcess')
|
emits('succcess')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
groupDetailLoading.value = false
|
|
||||||
console.log('groupOrdergroupScanHandle.error', error);
|
console.log('groupOrdergroupScanHandle.error', error);
|
||||||
}
|
}
|
||||||
|
groupDetailLoading.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
const douyin_table = ref(null)
|
const douyin_table = ref(null)
|
||||||
@@ -259,12 +259,12 @@ async function submitHandle() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
loading.value = false
|
|
||||||
console.log('submitHandle.error', error);
|
console.log('submitHandle.error', error);
|
||||||
if (error.code == 4399) {
|
if (error.code == 4399) {
|
||||||
BindShopRef.value.show()
|
BindShopRef.value.show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
loading.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
// 重新扫码
|
// 重新扫码
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<el-text tag="del" class="del" size="small">¥{{ item.skuList[0].salePrice
|
<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>
|
<el-text>¥{{ +item.skuList[0].memberPrice || item.skuList[0].salePrice }}</el-text>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
@@ -682,7 +682,6 @@ async function closeSellHandle() {
|
|||||||
id: goodEditorItem.value.id,
|
id: goodEditorItem.value.id,
|
||||||
isSoldOut: 0
|
isSoldOut: 0
|
||||||
})
|
})
|
||||||
closeSellLoading.value = false
|
|
||||||
showCloseSell.value = false
|
showCloseSell.value = false
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
@@ -693,6 +692,7 @@ async function closeSellHandle() {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
closeSellLoading.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
// 上架商品
|
// 上架商品
|
||||||
@@ -718,7 +718,6 @@ async function putawayHandle(item) {
|
|||||||
id: goodEditorItem.value.id,
|
id: goodEditorItem.value.id,
|
||||||
isSale: 1
|
isSale: 1
|
||||||
})
|
})
|
||||||
showPutawayLoading.value = false
|
|
||||||
showPutaway.value = false
|
showPutaway.value = false
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
@@ -729,6 +728,7 @@ async function putawayHandle(item) {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
showPutawayLoading.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
// 确认操作
|
// 确认操作
|
||||||
@@ -751,7 +751,6 @@ async function goodEditorConfirm() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
goodEditorLoading.value = false
|
|
||||||
showGoodEditor.value = false
|
showGoodEditor.value = false
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
@@ -762,6 +761,7 @@ async function goodEditorConfirm() {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
goodEditorLoading.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
// 显示修改库存
|
// 显示修改库存
|
||||||
@@ -801,7 +801,6 @@ async function goodsEditorStockConfirm() {
|
|||||||
productId: goodsEditorStockItem.value.id,
|
productId: goodsEditorStockItem.value.id,
|
||||||
stock: goodsEditorStockNumber.value
|
stock: goodsEditorStockNumber.value
|
||||||
})
|
})
|
||||||
goodsEditorStockLoading.value = false
|
|
||||||
showGoodsEditorStock.value = false
|
showGoodsEditorStock.value = false
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
@@ -812,6 +811,7 @@ async function goodsEditorStockConfirm() {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
goodsEditorStockLoading.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
|
|||||||
@@ -160,9 +160,9 @@ async function showStaffDiscountHandle() {
|
|||||||
// global.updateData(false)
|
// global.updateData(false)
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
discountLoading.value = false
|
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
discountLoading.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取员工折扣
|
// 获取员工折扣
|
||||||
@@ -211,12 +211,12 @@ async function printOrderLable(isBefore = false) {
|
|||||||
type: isBefore ? 1 : 0,
|
type: isBefore ? 1 : 0,
|
||||||
id: orderId,
|
id: orderId,
|
||||||
});
|
});
|
||||||
printLoading.value = false;
|
|
||||||
ElMessage.success(`云打印${isBefore ? '预' : ''}结算单成功`);
|
ElMessage.success(`云打印${isBefore ? '预' : ''}结算单成功`);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
printLoading.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 订单已支付
|
// 订单已支付
|
||||||
|
|||||||
@@ -323,9 +323,9 @@ async function delCartHandle(params) {
|
|||||||
cartLoading.value = false;
|
cartLoading.value = false;
|
||||||
cartListActive.value = 0;
|
cartListActive.value = 0;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
cartLoading.value = false;
|
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
cartLoading.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 赠送打包操作
|
// 赠送打包操作
|
||||||
|
|||||||
@@ -240,9 +240,9 @@ function refundHandle() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
loading.value = false
|
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
loading.value = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -284,9 +284,9 @@ async function passwordSuccess(e = '') {
|
|||||||
emits('refund')
|
emits('refund')
|
||||||
memberqueryMemberAccountAjax()
|
memberqueryMemberAccountAjax()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
loading.value = false
|
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
loading.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
function show(row) {
|
function show(row) {
|
||||||
|
|||||||
Reference in New Issue
Block a user