diff --git a/src/component/Administrator/SE/allUser/addAllUser.vue b/src/component/Administrator/SE/allUser/addAllUser.vue
index a0357ed6..8f65d043 100644
--- a/src/component/Administrator/SE/allUser/addAllUser.vue
+++ b/src/component/Administrator/SE/allUser/addAllUser.vue
@@ -86,6 +86,16 @@
style="width: 250px"
/>
+
{{ $t('admin.Close') }}
@@ -114,9 +124,16 @@ import md5 from "md5";
import { useI18n } from 'vue-i18n'
export default defineComponent({
components: {},
+ props: {
+ planOptions: {
+ type: Array,
+ default: () => []
+ }
+ },
emits: ["searchHistoryList"],
setup(props, { emit }) {
const {t} = useI18n()
+ const { planOptions } = toRefs(props)
let operations = reactive({
operationsModal: false,
operationsEdit: false,
@@ -130,6 +147,8 @@ export default defineComponent({
password: "",
oldPassword: "",
credits: "",
+ subscriptionPlanId: "",
+ oldSubscriptionPlanId: ""
});
let state = ref([
{
@@ -163,12 +182,18 @@ export default defineComponent({
// operationsData.validStartTime='2024-08-05T00:00:06'
// operationsData.validEndTime='2024-08-05T00:00:06'
operationsData.credits = data.creditsUsageLimit;
+ operationsData.subscriptionPlanId = data.subscriptionPlanId || "";
+ operationsData.oldSubscriptionPlanId = data.subscriptionPlanId || "";
// operationsData.accountId = data.accountId
// operationsData.userName = data.userName
// operationsData.userEmail = data.userEmail
// operationsData.validStartTime = formatTime(data.validStartTime)
// operationsData.validEndTime = formatTime(data.validEndTime)
}
+ if (funStr.value == "Add") {
+ operationsData.subscriptionPlanId = "";
+ operationsData.oldSubscriptionPlanId = "";
+ }
};
let focus = (event) => {
if (operationsData.password == operationsData.oldPassword) {
@@ -187,6 +212,7 @@ export default defineComponent({
userEmail: operationsData.userEmail,
userPassword: operationsData.password?md5(operationsData.password + "abc"):'',
userName: operationsData.userName,
+ subscriptionPlanId: operationsData.subscriptionPlanId
};
};
let setEditData = () => {
@@ -199,6 +225,7 @@ export default defineComponent({
operationsData.password == operationsData.oldPassword
? null
: md5(operationsData.password + "abc"),
+ subscriptionPlanId: operationsData.subscriptionPlanId
};
};
let cancelDsign = () => {
@@ -207,6 +234,8 @@ export default defineComponent({
operationsData.userEmail = "";
operationsData.password = "";
operationsData.credits = "";
+ operationsData.subscriptionPlanId = "";
+ operationsData.oldSubscriptionPlanId = "";
operations.operationsModal = false;
};
let setOk = () => {
@@ -237,11 +266,26 @@ export default defineComponent({
message.info("The email format is incorrect");
return;
}
- if (!data.userName || !data.userEmail)
+ if (!data.userName || !data.userEmail || !data.subscriptionPlanId)
return message.warning("Please check the input box marked with *");
+ const needSwitchPlan =
+ operationsData.subscriptionPlanId &&
+ operationsData.subscriptionPlanId !==
+ operationsData.oldSubscriptionPlanId;
Https.axiosPost(Https.httpUrls.addOrUpdateSubAccount, data).then(
(rv) => {
if (rv) {
+ if (needSwitchPlan) {
+ Https.axiosGet(
+ Https.httpUrls.switchSubAccountSubscribePlan,
+ {
+ params: {
+ targetSubscriptionPlanId: operationsData.subscriptionPlanId,
+ subAccId: operationsData.accountId,
+ },
+ }
+ );
+ }
cancelDsign();
emit("searchHistoryList");
}
@@ -258,6 +302,7 @@ export default defineComponent({
focus,
blur,
setOk,
+ planOptions,
};
},
data() {
diff --git a/src/component/Administrator/SE/allUser/index.vue b/src/component/Administrator/SE/allUser/index.vue
index ebfe2ca1..ea543c38 100644
--- a/src/component/Administrator/SE/allUser/index.vue
+++ b/src/component/Administrator/SE/allUser/index.vue
@@ -1,573 +1,728 @@
-
-
-
-
-
{{ $t('admin.CreateTime') }}:
-
-
-
-
-
-
-
-
-
-
{{ $t('admin.UserName') }}:
-
-
-
-
-
-
- {{ $t('admin.search') }}
-
-
- {{ $t('admin.add') }}
-
-
- {{ $t('admin.DownloadTemplate') }}
-
-
- {{ $t('admin.UploadTemplate') }}
-
-
- {{ $t('admin.ExportAccountData') }}
-
-
- {{ $t('admin.Delete') }}
-
-
-
-
- {{ $t('admin.NearlyAYear') }}
-
-
- {{ $t('admin.LastMonth') }}
-
-
- {{ $t('admin.LastWeek') }}
-
-
+
+
+
+
+
{{ $t('admin.CreateTime') }}:
+
+
+
+
+
-
-
-
-
-
- {{ $t('admin.Edit') }}
-
-
- {{ $t('admin.Delete') }}
-
-
-
-
-
+
+
{{ $t('admin.UserName') }}:
+
-
+
+
+
+ {{ $t('admin.search') }}
+
+
+ {{ $t('admin.add') }}
+
+
+ {{ $t('admin.DownloadTemplate') }}
+
+
+ {{ $t('admin.UploadTemplate') }}
+
+
+ {{ $t('admin.ExportAccountData') }}
+
+
+ {{ $t('admin.Delete') }}
+
+
+
+
+ {{ $t('admin.NearlyAYear') }}
+
+
+ {{ $t('admin.LastMonth') }}
+
+
+ {{ $t('admin.LastWeek') }}
+
+
+
+
+
+ {{ plan.name }}
+
+
+
+
+
+
+
+ {{ $t('admin.Edit') }}
+
+
+ {{ $t('admin.Delete') }}
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
+.plan_list {
+ margin-top: 1rem;
+ display: flex;
+ // flex-wrap: wrap;
+ padding-left: 2.8rem;
+ column-gap: 0.6rem;
+ margin-bottom: 2rem;
+ .plan_item {
+ height: 4rem;
+ width: auto;
+ min-width: 10rem;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ // font-size: 1.8rem;
+
+ font-weight: 600;
+ border-radius: 1.3rem;
+ color: #fff;
+ cursor: pointer;
+ border: 1.8px solid #000;
+ background-color: #000;
+ padding: 0 1rem 0 2rem;
+
+ &:hover {
+ color: #000;
+ background-color: #fff;
+ }
+
+ &.active {
+ background: #ffffff;
+ color: #000000;
+ }
+ }
+
+ .plan_item {
+ column-gap: 0.6rem;
+ }
+
+ .plan_more_icon {
+ font-size: 1.6rem;
+ cursor: pointer;
+ }
+}
+.subscription-plan-cell {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.rename-plan-form {
+ padding: 2rem 0;
+ .admin_state_item {
+ display: flex;
+ align-items: center;
+ > span {
+ width: 10rem;
+ margin-right: 1rem;
+ }
+ }
+}
+
diff --git a/src/component/Administrator/subscriptionPlan.vue b/src/component/Administrator/subscriptionPlan.vue
index 6c06903b..eeff2a17 100644
--- a/src/component/Administrator/subscriptionPlan.vue
+++ b/src/component/Administrator/subscriptionPlan.vue
@@ -58,6 +58,16 @@
:options="allUserList"
>
+
+
+
Search
@@ -69,59 +79,61 @@
-
-
-
- {{ formatTime(record[column.key], 'YYYY-MM-DD hh:mm:ss') }}
-
-
+
+
+
+
+ {{ formatTime(record[column.key], 'YYYY-MM-DD hh:mm:ss') }}
+
-
-
- {{ statusLabelMap[record.status] }}
-
-
-
- {{ allUserList.find(item => item.value === record.adminAccId)?.label }}
-
+
+
+ {{ record.status }}
+
+
+
+ {{ allUserList.find(item => item.value === record.adminAccId)?.label }}
+
-
-
- Edit
-
- Delete
-
-
+
+
+ Edit
+
+ Delete
+
+
+
-
-
+
+
@@ -175,7 +187,7 @@
-
+
Name:
*
@@ -184,7 +196,6 @@
v-model:value="formState.name"
placeholder="Input the name"
style="width: 250px"
- :disabled="isEditMode"
/>
@@ -200,7 +211,6 @@
@popupScroll="handleOrganizationScroll"
@select="handleOrganizationSelect"
@change="handleOrganizationChange"
- :disabled="isEditMode"
>
+ 添加组织
@@ -287,11 +297,21 @@
placeholder="Input the credit limit"
/>
+
@@ -353,14 +373,15 @@