更新支付页面
This commit is contained in:
@@ -1308,7 +1308,7 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
|
|||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
display: block;
|
display: block;
|
||||||
width: 10.5rem;
|
width: 13rem;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
.admin_page .admin_state_item > input {
|
.admin_page .admin_state_item > input {
|
||||||
|
|||||||
@@ -1428,7 +1428,7 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
|
|||||||
display: block;
|
display: block;
|
||||||
// min-width: 20%;
|
// min-width: 20%;
|
||||||
// width: 100px;
|
// width: 100px;
|
||||||
width: 10.5rem;
|
width: 13rem;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
>input{
|
>input{
|
||||||
|
|||||||
277
src/component/Administrator/coupons/addAllUser.vue
Normal file
277
src/component/Administrator/coupons/addAllUser.vue
Normal file
@@ -0,0 +1,277 @@
|
|||||||
|
<template>
|
||||||
|
<div class="allUserPoerationModal" ref="allUserPoerationModal"></div>
|
||||||
|
<a-modal
|
||||||
|
class="allUserPoeration_modal generalModel"
|
||||||
|
v-model:visible="operationsModal"
|
||||||
|
:footer="null"
|
||||||
|
:get-container="() => $refs.allUserPoerationModal"
|
||||||
|
width="50%"
|
||||||
|
:height="'77rem'"
|
||||||
|
:maskClosable="false"
|
||||||
|
:centered="true"
|
||||||
|
:closable="false"
|
||||||
|
:mask="true"
|
||||||
|
wrapClassName="#app"
|
||||||
|
:keyboard="false"
|
||||||
|
>
|
||||||
|
<div class="generalModel_btn">
|
||||||
|
<div class="generalModel_closeIcon" @click.stop="cancelDsign()">
|
||||||
|
<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<circle cx="23" cy="23" r="23" fill="white" fill-opacity="0.3"/>
|
||||||
|
<rect x="32.5063" y="12" width="3" height="29" rx="1.5" transform="rotate(45 32.5063 12)" fill="white"/>
|
||||||
|
<rect x="34.6274" y="32.5059" width="3" height="29" rx="1.5" transform="rotate(135 34.6274 32.5059)" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal_title_text">
|
||||||
|
<div>{{ title }} Coupon</div>
|
||||||
|
</div>
|
||||||
|
<div class="allUserPoeration_center admin_page">
|
||||||
|
<div class="admin_state_item">
|
||||||
|
<span>Cooperator:</span>
|
||||||
|
<input
|
||||||
|
v-model="cooperator"
|
||||||
|
placeholder="Please enter cooperator"
|
||||||
|
type="text"
|
||||||
|
style="width: 220px"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="admin_state_item" >
|
||||||
|
<span>percentOff(%): <span>*</span></span>
|
||||||
|
<input
|
||||||
|
:class="{active:title != 'Add'}"
|
||||||
|
:disabled="title != 'Add'"
|
||||||
|
v-model="percentOff"
|
||||||
|
placeholder="Please enter percentOff"
|
||||||
|
type="text"
|
||||||
|
style="width: 220px"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="admin_state_item" >
|
||||||
|
<span>Commission Rate: <span>*</span></span>
|
||||||
|
<input
|
||||||
|
:class="{active:title != 'Add'}"
|
||||||
|
:disabled="title != 'Add'"
|
||||||
|
v-model="commissionRate"
|
||||||
|
placeholder="Please enter commission rate"
|
||||||
|
type="text"
|
||||||
|
style="width: 220px"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="admin_state_item" >
|
||||||
|
<!-- <div class="admin_state_item" > -->
|
||||||
|
<span>End Time: <span>*</span></span>
|
||||||
|
<a-space direction="vertical" style="width:220px">
|
||||||
|
<a-date-picker v-model:value="rangePickerValue" :disabled="title != 'Add'" style="width:220px" />
|
||||||
|
</a-space>
|
||||||
|
</div>
|
||||||
|
<div class="admin_state_item" >
|
||||||
|
<span>MaxRedemptions:</span>
|
||||||
|
<input
|
||||||
|
:class="{active:title != 'Add'}"
|
||||||
|
:disabled="title != 'Add'"
|
||||||
|
v-model="maxRedemptions"
|
||||||
|
placeholder="Please enter maximum"
|
||||||
|
type="text"
|
||||||
|
style="width: 220px"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="admin_state_item" >
|
||||||
|
<span>PaidCommission:</span>
|
||||||
|
<input
|
||||||
|
v-model="paidCommission"
|
||||||
|
placeholder="Please enter paidCommission"
|
||||||
|
type="text"
|
||||||
|
style="width: 220px"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="admin_state_item">
|
||||||
|
<span>Remark:</span>
|
||||||
|
<input
|
||||||
|
v-model="remark"
|
||||||
|
placeholder="Please enter remark"
|
||||||
|
type="text"
|
||||||
|
style="width: 220px"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="allUserPoeration_btn admin_page">
|
||||||
|
<div class="admin_search_item" @click="cancelDsign">
|
||||||
|
Close
|
||||||
|
</div>
|
||||||
|
<div class="admin_search_item" @click="setOk">
|
||||||
|
OK
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</a-modal>
|
||||||
|
<div class="mark_loading" v-show="loadingShow">
|
||||||
|
<a-spin size="large" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { defineComponent, ref, reactive, watch, onMounted, nextTick, toRefs } from "vue";
|
||||||
|
import { Https } from "@/tool/https";
|
||||||
|
import { Modal, message } from "ant-design-vue";
|
||||||
|
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
|
||||||
|
import { formatTime,isEmail } from "@/tool/util";
|
||||||
|
import dayjs, { Dayjs } from 'dayjs';
|
||||||
|
const md5 = require("md5");
|
||||||
|
export default defineComponent({
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
emits: ['searchHistoryList'],
|
||||||
|
setup(props,{emit}) {
|
||||||
|
let operations = reactive({
|
||||||
|
operationsModal:false,
|
||||||
|
operationsEdit:false,
|
||||||
|
loadingShow:false,
|
||||||
|
title:''
|
||||||
|
})
|
||||||
|
let operationsData = reactive({
|
||||||
|
rangePickerValue:'',
|
||||||
|
percentOff:'',
|
||||||
|
commissionRate:'',
|
||||||
|
maxRedemptions:'',
|
||||||
|
cooperator:'',
|
||||||
|
paidCommission:'',
|
||||||
|
remark:'',
|
||||||
|
id:''
|
||||||
|
})
|
||||||
|
let init = (funStr,data)=>{
|
||||||
|
operations.operationsModal = true
|
||||||
|
operations.operationsEdit = true
|
||||||
|
operations.title = funStr
|
||||||
|
if(funStr == 'Add') operations.operationsEdit = false
|
||||||
|
if(funStr == 'Edit'){
|
||||||
|
operationsData.id=data.id
|
||||||
|
operationsData.percentOff=data.percentOff
|
||||||
|
operationsData.commissionRate=data.commissionRate
|
||||||
|
operationsData.maxRedemptions=data.maxRedemptions
|
||||||
|
operationsData.cooperator=data.cooperator
|
||||||
|
operationsData.paidCommission=data.paidCommission
|
||||||
|
operationsData.remark=data.remark
|
||||||
|
operationsData.rangePickerValue = dayjs(new Date(data.redeemBy * 1000).toISOString().split('T')[0],'YYYY/MM/DD');
|
||||||
|
|
||||||
|
// operationsData.rangePickerValue='2024-08-05T00:00:06'
|
||||||
|
// operationsData.validEndTime='2024-08-05T00:00:06'
|
||||||
|
// operationsData.commissionRate = data.commissionRate
|
||||||
|
// operationsData.maxRedemptions = data.maxRedemptions
|
||||||
|
// operationsData.validStartTime = formatTime(data.validStartTime)
|
||||||
|
// operationsData.validEndTime = formatTime(data.validEndTime)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
let setAddData = ()=>{
|
||||||
|
const timestampMs = new Date(operationsData.rangePickerValue).getTime() / 1000; // 直接获取毫秒时间戳
|
||||||
|
return {
|
||||||
|
"percentOff": operationsData.percentOff,
|
||||||
|
"maxRedemptions": operationsData.maxRedemptions,
|
||||||
|
"commissionRate": operationsData.commissionRate,
|
||||||
|
"timestamp": timestampMs,
|
||||||
|
cooperator:operationsData.cooperator,
|
||||||
|
remark:operationsData.remark,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let setEditData = ()=>{
|
||||||
|
const timestampMs = new Date(operationsData.rangePickerValue).getTime() / 1000; // 直接获取毫秒时间戳
|
||||||
|
return {
|
||||||
|
id: operationsData.id,
|
||||||
|
paidCommission: operationsData.commissionRate,
|
||||||
|
cooperator:operationsData.cooperator,
|
||||||
|
remark:operationsData.remark,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let cancelDsign = ()=>{
|
||||||
|
operationsData.rangePickerValue=''
|
||||||
|
operationsData.percentOff=''
|
||||||
|
operationsData.commissionRate=''
|
||||||
|
operationsData.maxRedemptions=''
|
||||||
|
operationsData.cooperator=''
|
||||||
|
operationsData.paidCommission=''
|
||||||
|
operationsData.remark=''
|
||||||
|
operationsData.id=''
|
||||||
|
operations.operationsModal = false
|
||||||
|
}
|
||||||
|
let setOk = ()=>{
|
||||||
|
let data
|
||||||
|
if(operations.title == 'Add'){
|
||||||
|
data = setAddData()
|
||||||
|
if(!data.commissionRate || !data.timestamp || !data.percentOff)return message.warning('Please check the input box marked with *')
|
||||||
|
Https.axiosPost(Https.httpUrls.createCoupon, data).then(
|
||||||
|
(rv) => {
|
||||||
|
if (rv) {
|
||||||
|
cancelDsign()
|
||||||
|
emit('searchHistoryList')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}else{
|
||||||
|
data = setEditData()
|
||||||
|
Https.axiosGet(Https.httpUrls.updatePromCodeInfo,{params:data}).then(
|
||||||
|
(rv) => {
|
||||||
|
if (rv) {
|
||||||
|
cancelDsign()
|
||||||
|
emit('searchHistoryList')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
...toRefs(operations),
|
||||||
|
...toRefs(operationsData),
|
||||||
|
cancelDsign,
|
||||||
|
init,
|
||||||
|
focus,
|
||||||
|
blur,
|
||||||
|
setOk,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
},
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
:deep(.allUserPoeration_modal){
|
||||||
|
.ant-modal-body{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
|
||||||
|
.allUserPoeration_modal {
|
||||||
|
.closeIcon {
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
.allUserPoeration_btn{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
height: auto;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding: 1rem 0;
|
||||||
|
.admin_search_item{
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.allUserPoeration_center{
|
||||||
|
flex: 1;
|
||||||
|
overflow-y: auto;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
390
src/component/Administrator/coupons/index.vue
Normal file
390
src/component/Administrator/coupons/index.vue
Normal file
@@ -0,0 +1,390 @@
|
|||||||
|
<template>
|
||||||
|
<div class="test_cli admin_page">
|
||||||
|
<div class="admin_table_search">
|
||||||
|
<div class="admin_state">
|
||||||
|
|
||||||
|
<div class="admin_state_item">
|
||||||
|
<span>Start Date:</span>
|
||||||
|
<a-range-picker
|
||||||
|
style="width:250px"
|
||||||
|
class="range_picker"
|
||||||
|
v-model:value="rangePickerValue"
|
||||||
|
:placeholder="[
|
||||||
|
$t('HistoryPage.StartDate'),
|
||||||
|
$t('HistoryPage.EndDate'),
|
||||||
|
]"
|
||||||
|
valueFormat="YYYY-MM-DD"
|
||||||
|
>
|
||||||
|
<template #suffixIcon>
|
||||||
|
<span
|
||||||
|
class="icon iconfont range_picker_icon icon-rili"
|
||||||
|
></span>
|
||||||
|
</template>
|
||||||
|
</a-range-picker>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="admin_state_item">
|
||||||
|
<span>Start Time:</span>
|
||||||
|
<a-time-range-picker style="width:250px" class="range_picker" valueFormat="HH:mm:ss" v-model:value="rangeTimeValue" />
|
||||||
|
</div> -->
|
||||||
|
<div class="admin_state_item">
|
||||||
|
<span>Expired or not:</span>
|
||||||
|
<a-select
|
||||||
|
v-model:value="isExpired"
|
||||||
|
show-search
|
||||||
|
allowClear
|
||||||
|
style="width: 250px"
|
||||||
|
placeholder="Please select"
|
||||||
|
:options="changeList"
|
||||||
|
@keydown.enter="gettrialList"
|
||||||
|
></a-select>
|
||||||
|
</div>
|
||||||
|
<div class="admin_state_item">
|
||||||
|
<span>Cooperator:</span>
|
||||||
|
<input
|
||||||
|
v-model="cooperator"
|
||||||
|
placeholder="Please enter cooperator"
|
||||||
|
@keydown.enter="gettrialList"
|
||||||
|
type="text"
|
||||||
|
style="width: 250px"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="admin_state_item">
|
||||||
|
<span>Promotion Code:</span>
|
||||||
|
<input
|
||||||
|
v-model="promotionCode"
|
||||||
|
placeholder="Please enter promotion code"
|
||||||
|
@keydown.enter="gettrialList"
|
||||||
|
type="text"
|
||||||
|
style="width: 250px"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="admin_search">
|
||||||
|
<div class="admin_search_item" @click="searchHistoryList">Search</div>
|
||||||
|
<div class="admin_search_item" @click="addhHistoryList">
|
||||||
|
Add
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="admin_table_content" ref="historyTable">
|
||||||
|
<a-table
|
||||||
|
@resizeColumn="handleResizeColumn"
|
||||||
|
:columns="columns"
|
||||||
|
:data-source="dataList"
|
||||||
|
:scroll="{ y: historyTableHeight }"
|
||||||
|
@change="changePage"
|
||||||
|
:pagination="{
|
||||||
|
showSizeChanger: true,
|
||||||
|
current: currentPage,
|
||||||
|
pageSize: pageSize,
|
||||||
|
total: total,
|
||||||
|
showQuickJumper: true,
|
||||||
|
bordered: false,
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<template #bodyCell="{ column, text, record, index }">
|
||||||
|
<div class="operate_list" v-if="column?.Operations">
|
||||||
|
<div
|
||||||
|
class="operate_item"
|
||||||
|
@click="setAagree(record)"
|
||||||
|
style="margin-right: 2rem;"
|
||||||
|
>
|
||||||
|
Edit
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="operate_item"
|
||||||
|
@click="deletePromCode(record)"
|
||||||
|
style="margin-right: 2rem;"
|
||||||
|
>
|
||||||
|
Delete
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</a-table>
|
||||||
|
</div>
|
||||||
|
<allUserPoerationsVue ref="allUserPoerationsVue" @searchHistoryList="searchHistoryList"></allUserPoerationsVue>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script lang="ts">
|
||||||
|
import { defineComponent, ref, reactive, toRefs, computed, toRef, createVNode } from "vue";
|
||||||
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||||
|
import { useStore } from "vuex";
|
||||||
|
import { Modal,message,Upload,CascaderProps } from 'ant-design-vue';
|
||||||
|
import { Https } from "@/tool/https";
|
||||||
|
import allUserPoerationsVue from "./addAllUser.vue";
|
||||||
|
export default defineComponent({
|
||||||
|
components: {
|
||||||
|
allUserPoerationsVue
|
||||||
|
},
|
||||||
|
setup() {
|
||||||
|
const store:any = useStore()
|
||||||
|
let rangePickerValue: any = ref([]);
|
||||||
|
let rangeTimeValue: any = ref([]);
|
||||||
|
let renameData: any = ref({}); //修改名字选中的数据
|
||||||
|
const dataDom = reactive({
|
||||||
|
allUserPoerationsVue:null as any,
|
||||||
|
})
|
||||||
|
const columns: any = computed(() => {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
title: 'User Id',
|
||||||
|
align: "center",
|
||||||
|
ellipsis: true,
|
||||||
|
dataIndex: "id",
|
||||||
|
key: "id",
|
||||||
|
width:100,
|
||||||
|
sorter: true,
|
||||||
|
fixed: "left",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Max Redemptions',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: "maxRedemptions",
|
||||||
|
key: "maxRedemptions",
|
||||||
|
width:200,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: 'Promotion Code',
|
||||||
|
align: "center",
|
||||||
|
ellipsis: true,
|
||||||
|
dataIndex: "promotionCode",
|
||||||
|
key: "promotionCode",
|
||||||
|
width:150,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'redeemBy',
|
||||||
|
align: "center",
|
||||||
|
ellipsis: true,
|
||||||
|
dataIndex: "redeemBy",
|
||||||
|
key: "redeemBy",
|
||||||
|
width:150,
|
||||||
|
customRender: (record: any) => {
|
||||||
|
if(record.text){
|
||||||
|
return new Date(record.text * 1000).toISOString().split('T')[0] // "2025-04-24"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'percent Off',
|
||||||
|
align: "center",
|
||||||
|
ellipsis: true,
|
||||||
|
dataIndex: "percentOff",
|
||||||
|
key: "percentOff",
|
||||||
|
width:150,
|
||||||
|
customRender: (record: any) => {
|
||||||
|
return record.text+'%'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'commissionRate',
|
||||||
|
align: "center",
|
||||||
|
ellipsis: true,
|
||||||
|
dataIndex: "commissionRate",
|
||||||
|
key: "commissionRate",
|
||||||
|
width:150,
|
||||||
|
customRender: (record: any) => {
|
||||||
|
return record.text+'%'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'cooperator',
|
||||||
|
align: "center",
|
||||||
|
ellipsis: true,
|
||||||
|
dataIndex: "cooperator",
|
||||||
|
key: "cooperator",
|
||||||
|
width:150,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Label Volmoney',
|
||||||
|
align: "center",
|
||||||
|
ellipsis: true,
|
||||||
|
dataIndex: "totalEarnings",
|
||||||
|
key: "totalEarnings",
|
||||||
|
width:150,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Commission',
|
||||||
|
align: "center",
|
||||||
|
ellipsis: true,
|
||||||
|
dataIndex: "commission",
|
||||||
|
key: "commission",
|
||||||
|
width:150,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Commission paid',
|
||||||
|
align: "center",
|
||||||
|
ellipsis: true,
|
||||||
|
dataIndex: "paidCommission",
|
||||||
|
key: "paidCommission",
|
||||||
|
width:150,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Unpaid commission',
|
||||||
|
align: "center",
|
||||||
|
ellipsis: true,
|
||||||
|
dataIndex: "unpaidCommission",
|
||||||
|
key: "unpaidCommission",
|
||||||
|
width:150,
|
||||||
|
},
|
||||||
|
//
|
||||||
|
{
|
||||||
|
title: 'remark',
|
||||||
|
align: "center",
|
||||||
|
ellipsis: true,
|
||||||
|
dataIndex: "remark",
|
||||||
|
key: "remark",
|
||||||
|
width:150,
|
||||||
|
}, {
|
||||||
|
title: "Operations",
|
||||||
|
key: "operation",
|
||||||
|
width:120,
|
||||||
|
align: "center",
|
||||||
|
fixed: "right",
|
||||||
|
// slots:{customRender:'action'}
|
||||||
|
Operations: true,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
let cooperator = ref('')
|
||||||
|
let promotionCode = ref('')
|
||||||
|
let dataList: any = ref([]);
|
||||||
|
let status: any = ref(0);
|
||||||
|
let orderBy: any = ref(0);
|
||||||
|
// let filterOption = (input: any, option: any) => {
|
||||||
|
// // 使用 option.label 进行搜索
|
||||||
|
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||||
|
// };
|
||||||
|
const changeList = ref([
|
||||||
|
{
|
||||||
|
value: '',
|
||||||
|
label: 'All',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'false',
|
||||||
|
label: 'No',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'true',
|
||||||
|
label: 'Yes',
|
||||||
|
}
|
||||||
|
])
|
||||||
|
let addhHistoryList = () => {
|
||||||
|
dataDom.allUserPoerationsVue.init('Add','')
|
||||||
|
};
|
||||||
|
let setAagree = (data:any) =>{
|
||||||
|
dataDom.allUserPoerationsVue.init('Edit',data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
...toRefs(dataDom),
|
||||||
|
rangePickerValue,
|
||||||
|
rangeTimeValue,
|
||||||
|
columns,
|
||||||
|
dataList,
|
||||||
|
cooperator,
|
||||||
|
promotionCode,
|
||||||
|
renameData,
|
||||||
|
status,
|
||||||
|
changeList,
|
||||||
|
orderBy,
|
||||||
|
addhHistoryList,
|
||||||
|
setAagree,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
isExpired:'',
|
||||||
|
historyTableHeight: 0,
|
||||||
|
handleResizeColumn: (w:any, col:any) => {
|
||||||
|
col.width = w;
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
let historyTable: any = this.$refs.historyTable;
|
||||||
|
this.historyTableHeight = historyTable.clientHeight - 200;
|
||||||
|
this.gettrialList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//改变页码
|
||||||
|
changePage(e: any, filters:any, sorter:any) {
|
||||||
|
this.currentPage = e.current;
|
||||||
|
this.pageSize = e.pageSize;
|
||||||
|
console.log(sorter)
|
||||||
|
// this.gettrialList();
|
||||||
|
// if(sorter.order){
|
||||||
|
// if(sorter.columnKey == 'id'){
|
||||||
|
// this.orderBy = 'id'
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
this.orderBy = sorter.order == "descend" ? "DESC" : "ASC";
|
||||||
|
},
|
||||||
|
|
||||||
|
//查询列表
|
||||||
|
searchHistoryList() {
|
||||||
|
this.currentPage = 1;
|
||||||
|
this.gettrialList();
|
||||||
|
},
|
||||||
|
deletePromCode(value:any){
|
||||||
|
let this_ = this
|
||||||
|
Modal.confirm({
|
||||||
|
title: 'Are you sure you want to delete this discount record',
|
||||||
|
icon: createVNode(ExclamationCircleOutlined),
|
||||||
|
okText: 'Yes',
|
||||||
|
cancelText: 'No',
|
||||||
|
mask:false,
|
||||||
|
centered:true,
|
||||||
|
onOk() {
|
||||||
|
Https.axiosGet(Https.httpUrls.deletePromCode,{params:{id:value.id}}).then((res:any)=>{
|
||||||
|
this_.gettrialList()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//获取列表
|
||||||
|
gettrialList() {
|
||||||
|
// let startTime: any = this.rangeTimeValue[0]
|
||||||
|
// ? this.rangeTimeValue[0]
|
||||||
|
// : '00:00:00';
|
||||||
|
// let endTime: any = this.rangeTimeValue[1]
|
||||||
|
// ? this.rangeTimeValue[1]
|
||||||
|
// : '23:59:59';
|
||||||
|
let startDate: any = this.rangePickerValue[0]
|
||||||
|
? this.rangePickerValue[0]+' '+'00:00:00'
|
||||||
|
: "";
|
||||||
|
let endDate: any = this.rangePickerValue[1]
|
||||||
|
? this.rangePickerValue[1]+' '+'23:59:59'
|
||||||
|
: "";
|
||||||
|
let data = {
|
||||||
|
endTime:endDate,
|
||||||
|
startTime:startDate,
|
||||||
|
cooperator:this.cooperator,//合作商
|
||||||
|
isExpired:this.isExpired,//是否过期
|
||||||
|
promotionCode:this.promotionCode,//优惠码
|
||||||
|
orderById:null,//排序字段
|
||||||
|
size:this.pageSize,
|
||||||
|
page:this.currentPage,
|
||||||
|
}
|
||||||
|
Https.axiosPost(Https.httpUrls.getAllCoupons,data).then((rv: any) => {
|
||||||
|
if (rv) {
|
||||||
|
console.log(rv)
|
||||||
|
this.dataList = rv.records
|
||||||
|
this.total = rv.total
|
||||||
|
// this.workspaceItem.position = this.singleTypeList[0].label
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.admin_page .admin_table_search .admin_state {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
:class="[key == 'disposeMoodboard'?'exportCanvasBox_item_dispose':'',imgItem?.upScaleChecked?'active':'']"
|
:class="[key == 'disposeMoodboard'?'exportCanvasBox_item_dispose':'',imgItem?.upScaleChecked?'active':'']"
|
||||||
draggable
|
draggable
|
||||||
@dragstart="onDragstart(key,imgItem)"
|
@dragstart="onDragstart(key,imgItem)"
|
||||||
@click.stop="isMoible?setDragstart(key,imgItem):''"
|
@click.stop="setDragstart(key,imgItem)"
|
||||||
>
|
>
|
||||||
<div class="exportCanvasBox_img">
|
<div class="exportCanvasBox_img">
|
||||||
<img :src="key == 'likeDesignCollectionList'?imgItem?.designOutfitUrl:imgItem?.imgUrl" alt="" />
|
<img :src="key == 'likeDesignCollectionList'?imgItem?.designOutfitUrl:imgItem?.imgUrl" alt="" />
|
||||||
|
|||||||
@@ -35,8 +35,7 @@
|
|||||||
<div class="price_box">
|
<div class="price_box">
|
||||||
<div class="price">
|
<div class="price">
|
||||||
<sub>$</sub>
|
<sub>$</sub>
|
||||||
{{ current?.price[current?.type] }}
|
{{ current?.price[current?.type] }} <span>{{ current?.unit[current?.type] }}</span>
|
||||||
<span>{{ current?.unit[current?.type] }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="type" v-if="current.typeList.length > 1">
|
<div class="type" v-if="current.typeList.length > 1">
|
||||||
<label>
|
<label>
|
||||||
@@ -48,6 +47,18 @@
|
|||||||
{{ $t('Renew.Yearly') }}
|
{{ $t('Renew.Yearly') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="type promotion">
|
||||||
|
<div class="text">{{ $t('Renew.promotionCode') }}:</div>
|
||||||
|
<div class="succeed" v-show="promotionData.error == 'true'">
|
||||||
|
{{promotionData.code}}
|
||||||
|
<i class="fi fi-sr-times-hexagon" @click="clearPromotionCode"></i>
|
||||||
|
</div>
|
||||||
|
<div class="input" v-show="!promotionData.error || promotionData.error == 'false'">
|
||||||
|
<input type="text" v-model="promotionData.code">
|
||||||
|
<div style="cursor: pointer;" @click="examine">{{ $t('Renew.use') }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="error" v-show="promotionData.error == 'false'">{{promotionData.str}}</div>
|
||||||
|
</div>
|
||||||
<div class="type payment">
|
<div class="type payment">
|
||||||
<div class="text">{{ $t('Renew.Payment') }}:</div>
|
<div class="text">{{ $t('Renew.Payment') }}:</div>
|
||||||
<label>
|
<label>
|
||||||
@@ -73,7 +84,6 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="activity">{{ $t('Renew.activity1') }}</div> -->
|
|
||||||
<div class="gallery_btn gallery_btn_radius" @click="payment">{{ $t('Renew.SubscribeNow') }}</div>
|
<div class="gallery_btn gallery_btn_radius" @click="payment">{{ $t('Renew.SubscribeNow') }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -136,6 +146,12 @@ export default defineComponent({
|
|||||||
isShowMark_:false,
|
isShowMark_:false,
|
||||||
})
|
})
|
||||||
let renewData = reactive({
|
let renewData = reactive({
|
||||||
|
promotionData:{
|
||||||
|
code:'',
|
||||||
|
error:'',
|
||||||
|
str:'',
|
||||||
|
oldPrice:'',
|
||||||
|
},
|
||||||
personage:computed(()=>{
|
personage:computed(()=>{
|
||||||
return {
|
return {
|
||||||
title:t('Renew.PersonalVersion'),
|
title:t('Renew.PersonalVersion'),
|
||||||
@@ -163,6 +179,10 @@ export default defineComponent({
|
|||||||
year:'HKD / Year',
|
year:'HKD / Year',
|
||||||
},
|
},
|
||||||
type:'year',
|
type:'year',
|
||||||
|
autoRenewal:{
|
||||||
|
text:t('Renew.automatically'),
|
||||||
|
value:true,
|
||||||
|
},
|
||||||
typeList:['year'],
|
typeList:['year'],
|
||||||
info:'Customised plan',
|
info:'Customised plan',
|
||||||
}
|
}
|
||||||
@@ -177,6 +197,10 @@ export default defineComponent({
|
|||||||
year:'HKD / Year',
|
year:'HKD / Year',
|
||||||
},
|
},
|
||||||
type:'year',
|
type:'year',
|
||||||
|
autoRenewal:{
|
||||||
|
text:t('Renew.automatically'),
|
||||||
|
value:true,
|
||||||
|
},
|
||||||
typeList:['year'],
|
typeList:['year'],
|
||||||
info:'Customised plan',
|
info:'Customised plan',
|
||||||
}
|
}
|
||||||
@@ -227,6 +251,7 @@ export default defineComponent({
|
|||||||
returnUrl:url,
|
returnUrl:url,
|
||||||
subscribeType:subscribeType,//yearly为年费,monthly为月费
|
subscribeType:subscribeType,//yearly为年费,monthly为月费
|
||||||
wallet:'ALIPAYHK',
|
wallet:'ALIPAYHK',
|
||||||
|
promotionCode:renewData.promotionData.code,
|
||||||
}
|
}
|
||||||
let httpsUrl = Https.httpUrls.payStripe
|
let httpsUrl = Https.httpUrls.payStripe
|
||||||
payMethodData.isShowMark_ = true
|
payMethodData.isShowMark_ = true
|
||||||
@@ -263,6 +288,38 @@ export default defineComponent({
|
|||||||
renew.renewModel = false
|
renew.renewModel = false
|
||||||
setPaidBack()
|
setPaidBack()
|
||||||
}
|
}
|
||||||
|
const examine = ()=>{
|
||||||
|
// renewData.promotionData.error
|
||||||
|
let price = renewData.current?.price[renewData.current?.type]
|
||||||
|
const normalNumber = Number(price.replace(/,/g, ''));
|
||||||
|
if(!renewData.promotionData.code){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let data = {
|
||||||
|
promotionCode:renewData.promotionData.code,
|
||||||
|
price:normalNumber,
|
||||||
|
}
|
||||||
|
Https.axiosGet(Https.httpUrls.checkCoupon,{params:data}).then((rv:any)=>{
|
||||||
|
if(rv){
|
||||||
|
if(rv.status == "valid"){
|
||||||
|
renewData.promotionData.error = 'true'
|
||||||
|
renewData.promotionData.oldPrice = renewData.current?.price[renewData.current?.type]
|
||||||
|
renewData.current.price[renewData.current.type] = (Number(rv.discountedPrice)).toLocaleString()
|
||||||
|
|
||||||
|
}else{
|
||||||
|
renewData.promotionData.error = 'false'
|
||||||
|
renewData.promotionData.str = rv.message
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const clearPromotionCode = ()=>{
|
||||||
|
renewData.promotionData.error = '';
|
||||||
|
renewData.promotionData.code = ''
|
||||||
|
renewData.current.price[renewData.current.type] = renewData.promotionData.oldPrice
|
||||||
|
renewData.promotionData.oldPrice = ''
|
||||||
|
}
|
||||||
return{
|
return{
|
||||||
store,
|
store,
|
||||||
...toRefs(renew),
|
...toRefs(renew),
|
||||||
@@ -275,6 +332,8 @@ export default defineComponent({
|
|||||||
payment,
|
payment,
|
||||||
setPaidBack,
|
setPaidBack,
|
||||||
completePayment,
|
completePayment,
|
||||||
|
examine,
|
||||||
|
clearPromotionCode,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -315,17 +374,6 @@ export default defineComponent({
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 3rem;
|
margin-bottom: 3rem;
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.activity{
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
background: linear-gradient(88.13deg, #fbd2ff .91%, #e6d3ff 52.5%, #b694ff 101.09%);
|
|
||||||
border-radius: 0 2.8rem 0 1rem;
|
|
||||||
font-size: 2.4rem;
|
|
||||||
font-weight: 600;
|
|
||||||
padding: 1.5rem 2rem;
|
|
||||||
right: 0;
|
|
||||||
}
|
}
|
||||||
.price{
|
.price{
|
||||||
font-size: 6rem;
|
font-size: 6rem;
|
||||||
@@ -339,6 +387,41 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
.type{
|
.type{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
&.promotion{
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
> .succeed{
|
||||||
|
padding: 1rem;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: 1rem;
|
||||||
|
background: #eee;
|
||||||
|
> i{
|
||||||
|
display: flex;
|
||||||
|
margin-left: 1rem;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
> .input{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: 2rem;
|
||||||
|
border: 2px solid #000;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0 1rem;
|
||||||
|
input{
|
||||||
|
border: none;
|
||||||
|
height: 3rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
> .error{
|
||||||
|
color: red;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
> .text{
|
> .text{
|
||||||
margin-right: 2rem;
|
margin-right: 2rem;
|
||||||
// font-weight: 600;
|
// font-weight: 600;
|
||||||
|
|||||||
@@ -672,6 +672,9 @@ export default {
|
|||||||
Renew:{
|
Renew:{
|
||||||
title:'根据您的需求选择最佳计划',
|
title:'根据您的需求选择最佳计划',
|
||||||
Monthly:'月付',
|
Monthly:'月付',
|
||||||
|
promotionCode:'优惠码',
|
||||||
|
use:'应用',
|
||||||
|
PromoCodeError:'请检查优惠码是否正确或者是否过期',
|
||||||
Yearly:'年付',
|
Yearly:'年付',
|
||||||
CreditCard:'信用卡',
|
CreditCard:'信用卡',
|
||||||
Alipay:'支付宝',
|
Alipay:'支付宝',
|
||||||
|
|||||||
@@ -672,6 +672,9 @@ export default {
|
|||||||
title:'Select The Best Plan For Your Needs',
|
title:'Select The Best Plan For Your Needs',
|
||||||
Monthly:'Monthly',
|
Monthly:'Monthly',
|
||||||
Yearly:'Yearly',
|
Yearly:'Yearly',
|
||||||
|
promotionCode:'Coupon',
|
||||||
|
use:'Apply',
|
||||||
|
PromoCodeError:'Please check if the promo code is correct or if the date has expired',
|
||||||
CreditCard:'Credit Card',
|
CreditCard:'Credit Card',
|
||||||
Alipay:'Alipay',
|
Alipay:'Alipay',
|
||||||
Payment:'Payment method',
|
Payment:'Payment method',
|
||||||
|
|||||||
@@ -195,6 +195,12 @@ const routes: Array<RouteRecordRaw> = [
|
|||||||
meta:{enter:3,},
|
meta:{enter:3,},
|
||||||
component: _import_component('Administrator/allUser.vue'),
|
component: _import_component('Administrator/allUser.vue'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path:'coupons',
|
||||||
|
name:'coupons',
|
||||||
|
meta:{enter:3,},
|
||||||
|
component: _import_component('Administrator/coupons/index.vue'),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path:'testClickData',
|
path:'testClickData',
|
||||||
name:'testClickData',
|
name:'testClickData',
|
||||||
|
|||||||
@@ -265,6 +265,12 @@ export const Https = {
|
|||||||
getUserInfo:`/api/inquiry/getUserInfo`,//查询所有用户
|
getUserInfo:`/api/inquiry/getUserInfo`,//查询所有用户
|
||||||
queryTransaction:`/api/inquiry/queryTransaction`,//查询交易记录
|
queryTransaction:`/api/inquiry/queryTransaction`,//查询交易记录
|
||||||
queryTransactionDownload:`/api/inquiry/queryTransaction/download`,//导出交易记录
|
queryTransactionDownload:`/api/inquiry/queryTransaction/download`,//导出交易记录
|
||||||
|
createCoupon:`/api/stripe/createCoupon`,//创建优惠码
|
||||||
|
updatePromCodeInfo:`/api/stripe/updatePromCodeInfo`,//修改优惠码
|
||||||
|
getAllCoupons:`/api/stripe/getAllCoupons`,//查询优惠码列表
|
||||||
|
checkCoupon:`/api/stripe/checkCoupon`,//根据优惠码获取结算后的金额
|
||||||
|
deletePromCode:`/api/stripe/deletePromCode`,//删除优惠券
|
||||||
|
|
||||||
//查询某个时间内design点击次数
|
//查询某个时间内design点击次数
|
||||||
getDesignStatistic:`/api/inquiry/getDesignStatistic`,//拒绝审批
|
getDesignStatistic:`/api/inquiry/getDesignStatistic`,//拒绝审批
|
||||||
getAllQuestionnaire:`/api/inquiry/getAllQuestionnaire`,//拒绝审批
|
getAllQuestionnaire:`/api/inquiry/getAllQuestionnaire`,//拒绝审批
|
||||||
|
|||||||
@@ -242,7 +242,13 @@ export default defineComponent({
|
|||||||
// isShow:true,
|
// isShow:true,
|
||||||
// },
|
// },
|
||||||
],
|
],
|
||||||
}],
|
},{
|
||||||
|
name:'Promotion Code',
|
||||||
|
icon:'usetime',
|
||||||
|
route:'/administrator/coupons',
|
||||||
|
key:'sub12',
|
||||||
|
isShow:true,
|
||||||
|
},],
|
||||||
openKeys: [],
|
openKeys: [],
|
||||||
selectedKeys: ['sub1'],
|
selectedKeys: ['sub1'],
|
||||||
nowPageName:'All User',//当前页面名称
|
nowPageName:'All User',//当前页面名称
|
||||||
|
|||||||
@@ -92,6 +92,8 @@
|
|||||||
<!-- <i @click="Assignment" class="fi fi-rr-gift" title="Assignment"></i> -->
|
<!-- <i @click="Assignment" class="fi fi-rr-gift" title="Assignment"></i> -->
|
||||||
<i @click="UpgradePlan" title="Purchase" class="fi fi-rr-shop"></i>
|
<i @click="UpgradePlan" title="Purchase" class="fi fi-rr-shop"></i>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="gallery_btn" style="margin-left: 3rem;" @click="subscribe">{{$t('Header.SubscribeNow')}}</div>
|
||||||
|
|
||||||
<div v-if="userDetail.systemUser == 0 || userDetail.systemUser == 3" class="gallery_btn" style="margin-left: 3rem;" @click="subscribe">{{$t('Header.SubscribeNow')}}</div>
|
<div v-if="userDetail.systemUser == 0 || userDetail.systemUser == 3" class="gallery_btn" style="margin-left: 3rem;" @click="subscribe">{{$t('Header.SubscribeNow')}}</div>
|
||||||
<div v-else style="width: 30rem;"></div>
|
<div v-else style="width: 30rem;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user