提交 b14cd9de authored 作者: 刘旭's avatar 刘旭

优化

上级 7c99390a
...@@ -378,8 +378,8 @@ const valChange = (e: any, item: any) => { ...@@ -378,8 +378,8 @@ const valChange = (e: any, item: any) => {
}; };
// 初始化数据 // 初始化数据
const initCartIndex = (type: number) => { const initCartIndex = (types: number) => {
getCartIndex({ type }).then((res: any) => { getCartIndex({ types }).then((res: any) => {
if (res.data.code === 200) { if (res.data.code === 200) {
cartList.value = res.data.data.cartList; cartList.value = res.data.data.cartList;
totalPrice.value = res.data.data.cartTotal.checkedGoodsAmount.toFixed(2); totalPrice.value = res.data.data.cartTotal.checkedGoodsAmount.toFixed(2);
...@@ -428,6 +428,15 @@ const getCheckedList = (goods: any) => { ...@@ -428,6 +428,15 @@ const getCheckedList = (goods: any) => {
onShow(() => { onShow(() => {
initCartIndex(type.value); initCartIndex(type.value);
setTimeout(() => {
// 在初始化把勾选的失效商品清掉
let ids: any = [];
_.each(cartList.value, (v: any) => {
if (!v.isSubmit) ids.push(v.id);
});
// 把失效商品的id去掉
if (ids.length !== 0) initCartChecked(0, ids, type.value);
}, 50);
// type.value = 0; // type.value = 0;
}); });
</script> </script>
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
typeof scope.row.isSubmit === 'undefined' typeof scope.row.isSubmit === 'undefined'
? false ? false
: !scope.row.isSubmit && !scope.row.deleted : !scope.row.isSubmit && !scope.row.deleted
" "
name="error-circle-fill" name="error-circle-fill"
color="#0055ff" color="#0055ff"
style="margin-right: 4rpx;" style="margin-right: 4rpx;"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论