|
@@ -31,13 +31,13 @@
|
|
<span> {{ adminObj.username }}</span>
|
|
<span> {{ adminObj.username }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="van-cell van-field">
|
|
|
|
|
|
+ <!-- <div class="van-cell van-field">
|
|
<div class="van-cell__title van-field__label"><span>{{ $t('merchantManage.relationAdmin') }}</span>
|
|
<div class="van-cell__title van-field__label"><span>{{ $t('merchantManage.relationAdmin') }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="van-field__value o-pt-8" style="text-align: left;">
|
|
<div class="van-field__value o-pt-8" style="text-align: left;">
|
|
<span> {{ relationObj.username }}</span>
|
|
<span> {{ relationObj.username }}</span>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
|
|
+ </div> -->
|
|
<van-field v-model="adminObj.name" name="password" :label="$t('merchantManage.fullNameLabel')"
|
|
<van-field v-model="adminObj.name" name="password" :label="$t('merchantManage.fullNameLabel')"
|
|
:placeholder="$t('merchantManage.fullNamePlaceholder')"
|
|
:placeholder="$t('merchantManage.fullNamePlaceholder')"
|
|
:rules="[{ required: true, message: $t('merchantManage.fullNamePlaceholder') }]" />
|
|
:rules="[{ required: true, message: $t('merchantManage.fullNamePlaceholder') }]" />
|
|
@@ -141,7 +141,7 @@
|
|
<script>
|
|
<script>
|
|
import { onMounted, ref } from "vue";
|
|
import { onMounted, ref } from "vue";
|
|
import sHeader from "@/components/SimpleHeader";
|
|
import sHeader from "@/components/SimpleHeader";
|
|
-import { getAdmin, getRelation, getAdminMch, updateAdmin, getHuifuMch } from "@/service/merchantManage";
|
|
|
|
|
|
+import { getAdmin, getAdminMch, updateAdmin, getHuifuMch } from "@/service/merchantManage";
|
|
import { showFailToast, showSuccessToast } from "vant";
|
|
import { showFailToast, showSuccessToast } from "vant";
|
|
import { useRoute } from "vue-router";
|
|
import { useRoute } from "vue-router";
|
|
import { getLoginUser, styleUrl } from "@/common/js/utils";
|
|
import { getLoginUser, styleUrl } from "@/common/js/utils";
|
|
@@ -158,7 +158,7 @@ export default {
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
const merchantId = ref('');
|
|
const merchantId = ref('');
|
|
const adminObj = ref({});
|
|
const adminObj = ref({});
|
|
- const relationObj = ref({});
|
|
|
|
|
|
+ // const relationObj = ref({});
|
|
const adminMchObj = ref({});
|
|
const adminMchObj = ref({});
|
|
const huifuMchObj = ref({});
|
|
const huifuMchObj = ref({});
|
|
const ifForeign = ref('0');
|
|
const ifForeign = ref('0');
|
|
@@ -169,7 +169,7 @@ export default {
|
|
styleUrl('merchantManage');
|
|
styleUrl('merchantManage');
|
|
merchantId.value = route.query.merchantId;
|
|
merchantId.value = route.query.merchantId;
|
|
getAdminFun();
|
|
getAdminFun();
|
|
- getRelationFun();
|
|
|
|
|
|
+ // getRelationFun();
|
|
getAdminMchFun();
|
|
getAdminMchFun();
|
|
getHuifuMchFun();
|
|
getHuifuMchFun();
|
|
|
|
|
|
@@ -191,18 +191,18 @@ export default {
|
|
// else { showFailToast(data.message); }
|
|
// else { showFailToast(data.message); }
|
|
// console.log('getAdminFun', data);
|
|
// console.log('getAdminFun', data);
|
|
};
|
|
};
|
|
- const getRelationFun = async () => {
|
|
|
|
- console.log('adminId', merchantId.value);
|
|
|
|
- const { data } = await getRelation({ adminId: merchantId.value });
|
|
|
|
- console.log("relationObj.value", relationObj.value);
|
|
|
|
- console.log("relationObj.value.username", relationObj.value.username);
|
|
|
|
- if (data.code === "00000") {
|
|
|
|
- if (data.data != null) {
|
|
|
|
- relationObj.value = data.data;
|
|
|
|
- relationObj.value.username = data.data.username;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ // const getRelationFun = async () => {
|
|
|
|
+ // console.log('adminId', merchantId.value);
|
|
|
|
+ // const { data } = await getRelation({ adminId: merchantId.value });
|
|
|
|
+ // console.log("relationObj.value", relationObj.value);
|
|
|
|
+ // console.log("relationObj.value.username", relationObj.value.username);
|
|
|
|
+ // if (data.code === "00000") {
|
|
|
|
+ // if (data.data != null) {
|
|
|
|
+ // relationObj.value = data.data;
|
|
|
|
+ // relationObj.value.username = data.data.username;
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
const getAdminMchFun = async () => {
|
|
const getAdminMchFun = async () => {
|
|
const { data } = await getAdminMch({ id: merchantId.value });
|
|
const { data } = await getAdminMch({ id: merchantId.value });
|
|
if (data.code === "00000") {
|
|
if (data.code === "00000") {
|
|
@@ -283,7 +283,7 @@ export default {
|
|
tabType,
|
|
tabType,
|
|
adminType,
|
|
adminType,
|
|
adminObj,
|
|
adminObj,
|
|
- relationObj,
|
|
|
|
|
|
+ // relationObj,
|
|
adminMchObj,
|
|
adminMchObj,
|
|
huifuMchObj,
|
|
huifuMchObj,
|
|
onSubmit,
|
|
onSubmit,
|