|
@@ -5,6 +5,7 @@
|
|
|
v-model="visible"
|
|
v-model="visible"
|
|
|
title="佣金获取详情"
|
|
title="佣金获取详情"
|
|
|
@open="handleOpen"
|
|
@open="handleOpen"
|
|
|
|
|
+ body-style="padding: 0px 10px;"
|
|
|
>
|
|
>
|
|
|
<common-table
|
|
<common-table
|
|
|
ref="pageRef"
|
|
ref="pageRef"
|
|
@@ -19,59 +20,27 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import { ref, reactive, nextTick, watch } from 'vue';
|
|
|
|
|
|
|
+import { ref, reactive, nextTick } from 'vue';
|
|
|
import CommonTable from '@/components/CommonPage/CommonTable.vue';
|
|
import CommonTable from '@/components/CommonPage/CommonTable.vue';
|
|
|
|
|
|
|
|
-const props = defineProps({
|
|
|
|
|
- modelValue: {
|
|
|
|
|
- type: Boolean,
|
|
|
|
|
- default: false
|
|
|
|
|
- },
|
|
|
|
|
- rowData: {
|
|
|
|
|
- type: Object,
|
|
|
|
|
- default: null
|
|
|
|
|
- }
|
|
|
|
|
-});
|
|
|
|
|
-
|
|
|
|
|
-const emit = defineEmits(['update:modelValue']);
|
|
|
|
|
-
|
|
|
|
|
-const pageRef = ref(null);
|
|
|
|
|
-
|
|
|
|
|
/** 弹窗是否打开 */
|
|
/** 弹窗是否打开 */
|
|
|
-const visible = ref(false);
|
|
|
|
|
|
|
+const visible = defineModel({ type: Boolean });
|
|
|
|
|
|
|
|
-// 监听modelValue变化
|
|
|
|
|
-watch(() => props.modelValue, (newVal) => {
|
|
|
|
|
- visible.value = newVal;
|
|
|
|
|
-});
|
|
|
|
|
-
|
|
|
|
|
-// 监听visible变化
|
|
|
|
|
-watch(visible, (newVal) => {
|
|
|
|
|
- emit('update:modelValue', newVal);
|
|
|
|
|
-});
|
|
|
|
|
|
|
+const pageRef = ref(null);
|
|
|
|
|
|
|
|
/** 关闭弹窗 */
|
|
/** 关闭弹窗 */
|
|
|
const handleCancel = () => {
|
|
const handleCancel = () => {
|
|
|
visible.value = false;
|
|
visible.value = false;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-/** 弹窗打开事件 */
|
|
|
|
|
-const handleOpen = () => {
|
|
|
|
|
- if (props.rowData && props.rowData.beInviteUserId) {
|
|
|
|
|
- pageConfig.params.inviteUserId = props.rowData.beInviteUserId;
|
|
|
|
|
- nextTick(() => {
|
|
|
|
|
- pageRef.value?.reload();
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
|
|
|
|
|
/** 表格列配置 */
|
|
/** 表格列配置 */
|
|
|
const columns = ref([
|
|
const columns = ref([
|
|
|
- { label: "UID", prop: "beInviteUserId", align: "center", width: 120 },
|
|
|
|
|
- { label: "昵称", prop: "nickName", align: "center", minWidth: 120 },
|
|
|
|
|
- { label: "联系方式", prop: "mobile", align: "center", minWidth: 140 },
|
|
|
|
|
|
|
+ { label: "UID", prop: "beInviteUserId", align: "center" },
|
|
|
|
|
+ { label: "昵称", prop: "nickName", align: "center" },
|
|
|
|
|
+ { label: "联系方式", prop: "mobile", align: "center" },
|
|
|
{ label: "邀请时间", prop: "createTime", align: "center", width: 180 },
|
|
{ label: "邀请时间", prop: "createTime", align: "center", width: 180 },
|
|
|
- { label: "获得佣金", prop: "settlementMoney", align: "center", width: 120 },
|
|
|
|
|
|
|
+ { label: "获得佣金", prop: "settlementMoney", align: "center" },
|
|
|
]);
|
|
]);
|
|
|
|
|
|
|
|
const pageConfig = reactive({
|
|
const pageConfig = reactive({
|
|
@@ -82,4 +51,22 @@ const pageConfig = reactive({
|
|
|
inviteUserId: null
|
|
inviteUserId: null
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+// 打开弹窗并请求数据
|
|
|
|
|
+function handleOpen(row) {
|
|
|
|
|
+ console.log(row);
|
|
|
|
|
+ if (row && row.inviteUserId) {
|
|
|
|
|
+ pageConfig.params.inviteUserId = row.inviteUserId;
|
|
|
|
|
+ console.log(pageConfig.params);
|
|
|
|
|
+
|
|
|
|
|
+ visible.value = true;
|
|
|
|
|
+ nextTick(() => {
|
|
|
|
|
+ pageRef.value?.reload();
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+defineExpose({
|
|
|
|
|
+ handleOpen
|
|
|
|
|
+});
|
|
|
</script>
|
|
</script>
|