diff --git a/buyer/src/components/invoiceModal/index.vue b/buyer/src/components/invoiceModal/index.vue
index c497e913..633b0ff8 100644
--- a/buyer/src/components/invoiceModal/index.vue
+++ b/buyer/src/components/invoiceModal/index.vue
@@ -92,6 +92,7 @@ import { mobile, email } from '@/plugins/RegExp.js';
export default {
name: 'invoiceModal',
+ emits: ['change'],
data () {
return {
invoice: 1, // 1 电子普通发票 2 增值税专用发票
diff --git a/buyer/src/pages/Cart.vue b/buyer/src/pages/Cart.vue
index 54352fbd..88e98398 100644
--- a/buyer/src/pages/Cart.vue
+++ b/buyer/src/pages/Cart.vue
@@ -193,7 +193,7 @@
-
{{ goods.errorMessage }}
+
{{ goods.errorMessage }}
删除
@@ -785,20 +785,18 @@ export default {
outline-color: $theme_color;
}
}
- }
- .error-goods {
- position: absolute;
- width: 100%;
- height: 100%;
- margin-left: -20px;
- background-color: rgba($color: #999, $alpha: 0.5);
- z-index: 10;
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding-left: 150px;
- color: #000;
- padding-right: 30px;
+ .error-goods {
+ position: absolute;
+ inset: 0;
+ background-color: rgba($color: #999, $alpha: 0.5);
+ z-index: 10;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 0 30px 0 150px;
+ box-sizing: border-box;
+ color: #000;
+ }
}
}
&-footer {
diff --git a/buyer/src/pages/home/orderCenter/MyOrder.vue b/buyer/src/pages/home/orderCenter/MyOrder.vue
index 0d1ec14e..09cc3c15 100644
--- a/buyer/src/pages/home/orderCenter/MyOrder.vue
+++ b/buyer/src/pages/home/orderCenter/MyOrder.vue
@@ -55,7 +55,7 @@
{{ goods.name }}
- {{ $filters.unitPrice(goods.goodsPrice, "¥") }} x {{ goods.num }}
+ {{ $filters.unitPrice(goods.goodsPrice, "¥") }} x {{ goods.num }}
{{refundPriceList(goods.isRefund)}}
评价
diff --git a/manager/src/views/member/list/index.vue b/manager/src/views/member/list/index.vue
index 10e36df0..8c40975b 100644
--- a/manager/src/views/member/list/index.vue
+++ b/manager/src/views/member/list/index.vue
@@ -68,7 +68,13 @@
row-key="id"
@selection-change="onSelectionChange"
>
-
+
@@ -109,10 +115,16 @@
-
+
-
+
{{ row.___selected ? "已选择" : "选择" }}
@@ -320,6 +332,10 @@ export default {
type: null,
default: () => [],
},
+ checkboxSelect: {
+ type: Boolean,
+ default: false,
+ },
},
data() {
return {
@@ -432,8 +448,28 @@ export default {
if (name === "updatePoint") this.openMemberPoint(row);
},
onSelectionChange(selection) {
+ if (this.selectedMember && this.checkboxSelect) {
+ this.selectMember = selection || [];
+ return;
+ }
this.selectedRows = selection || [];
},
+ getSelection() {
+ return this.selectMember || [];
+ },
+ syncTableSelection() {
+ if (!this.selectedMember || !this.checkboxSelect) {
+ return;
+ }
+ this.$nextTick(() => {
+ this.clearSelection();
+ this.data.forEach((row) => {
+ if (this.selectMember.some((member) => member.id === row.id)) {
+ this.$refs.table?.toggleRowSelection(row, true);
+ }
+ });
+ });
+ },
openSetMemberGroup() {
this.memberGroupFlag = true;
this.memberGroupLoading = false;
@@ -569,6 +605,7 @@ export default {
this.loading = false;
this.init(res.result.records);
this.total = res.result.total;
+ this.syncTableSelection();
}
});
},
diff --git a/manager/src/views/promotions/coupon-activity/coupon-publish.vue b/manager/src/views/promotions/coupon-activity/coupon-publish.vue
index 10d218c7..3d8a70af 100644
--- a/manager/src/views/promotions/coupon-activity/coupon-publish.vue
+++ b/manager/src/views/promotions/coupon-activity/coupon-publish.vue
@@ -156,10 +156,15 @@
+
+ 取消
+ 确定
+
@@ -185,6 +190,7 @@ export default {
showCouponSelect: false,
tempCouponList: [],
checkUserList: false,
+ memberSelectSnapshot: [],
selectedMember: [],
form: {
promotionName: "",
@@ -237,20 +243,14 @@ export default {
};
return map[type] || "danger";
},
- callbackSelectUser(val) {
- let findUser = this.selectedMember.find((item) => {
- return item.id === val.id;
- });
- if (!findUser) {
- this.selectedMember.push(val);
- } else {
- this.selectedMember.map((item, index) => {
- if (item.id === findUser.id) {
- this.selectedMember.splice(index, 1);
- }
- });
- }
+ cancelMemberSelect() {
+ this.checkUserList = false;
+ },
+ confirmMemberSelect() {
+ const list = this.$refs.memberLayout?.getSelection?.() || [];
+ this.selectedMember = list;
this.reSelectMember();
+ this.checkUserList = false;
},
delUser(index) {
this.selectedMember.splice(index, 1);
@@ -293,10 +293,8 @@ export default {
});
},
addVip() {
+ this.memberSelectSnapshot = JSON.parse(JSON.stringify(this.selectedMember));
this.checkUserList = true;
- this.$nextTick(() => {
- this.$refs.memberLayout.selectedMember = true;
- });
},
showSelector() {
this.tempCouponList = [...this.selectCouponList];
diff --git a/manager/src/views/sys/setting-manage/settingManage.vue b/manager/src/views/sys/setting-manage/settingManage.vue
index f36d8bf8..b1f3b8c4 100644
--- a/manager/src/views/sys/setting-manage/settingManage.vue
+++ b/manager/src/views/sys/setting-manage/settingManage.vue
@@ -93,6 +93,7 @@ export default {
{ type: "WECHAT_PAYMENT", name: "微信支付设置" },
],
tabWay: [], // tab数据
+ settingRequestSeq: 0,
};
},
@@ -115,29 +116,60 @@ export default {
this.selected = name;
this.getSettingData(name);
},
+ resolveTabWay() {
+ const tabMap = {
+ setting: this.setting,
+ authLogin: this.authLogin,
+ pay: this.pay,
+ };
+ this.tabWay = tabMap[this.$route.name] || [];
+ },
+ normalizeSettingResult(res) {
+ if (!res || res.result == null) {
+ return {};
+ }
+ const raw = res.result;
+ if (typeof raw === "string") {
+ try {
+ return JSON.parse(raw);
+ } catch (e) {
+ return {};
+ }
+ }
+ if (typeof raw === "object") {
+ return raw;
+ }
+ return {};
+ },
/**
* 进入页面请求第一个配置
*/
getSettingData(name) {
this.settingData = "";
- Object.keys(this).forEach((item) => {
- if (this.$route.name == item) {
- this.tabWay = this[item];
- }
- });
- // 点击页面给每项第一个数据赋值
+ this.resolveTabWay();
+
if (!name) {
+ if (!this.tabWay.length) {
+ return;
+ }
name = this.tabWay[0].type;
this.selected = name;
}
- getSetting(name).then((res) => {
- if (res.result) {
- this.settingData = JSON.stringify(res.result);
- } else {
+ const requestId = ++this.settingRequestSeq;
+ getSetting(name)
+ .then((res) => {
+ if (requestId !== this.settingRequestSeq) {
+ return;
+ }
+ this.settingData = JSON.stringify(this.normalizeSettingResult(res));
+ })
+ .catch(() => {
+ if (requestId !== this.settingRequestSeq) {
+ return;
+ }
this.settingData = "{}";
- }
- });
+ });
},
},
};