fix
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
</div>
|
||||
<div class="allUserPoeration_center admin_page">
|
||||
<div class="admin_state_item">
|
||||
<span>Cooperator: <span>*</span></span>
|
||||
<span>Cooperator:</span>
|
||||
<input
|
||||
v-model="cooperator"
|
||||
placeholder="Please enter cooperator"
|
||||
@@ -65,7 +65,7 @@
|
||||
</a-space>
|
||||
</div>
|
||||
<div class="admin_state_item" >
|
||||
<span>Maximum: <span>*</span></span>
|
||||
<span>MaxRedemptions:</span>
|
||||
<input
|
||||
:class="{active:title != 'Add'}"
|
||||
v-model="maxRedemptions"
|
||||
@@ -75,7 +75,7 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="admin_state_item" >
|
||||
<span>PaidCommission: <span>*</span></span>
|
||||
<span>PaidCommission:</span>
|
||||
<input
|
||||
v-model="paidCommission"
|
||||
placeholder="Please enter paidCommission"
|
||||
@@ -84,7 +84,7 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="admin_state_item">
|
||||
<span>Remark: <span>*</span></span>
|
||||
<span>Remark:</span>
|
||||
<input
|
||||
v-model="remark"
|
||||
placeholder="Please enter remark"
|
||||
@@ -197,7 +197,7 @@ export default defineComponent({
|
||||
let data
|
||||
if(operations.title == 'Add'){
|
||||
data = setAddData()
|
||||
if(!data.commissionRate || !data.maxRedemptions || !data.timestamp || !data.percentOff)return message.warning('Please check the input box marked with *')
|
||||
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) {
|
||||
@@ -208,7 +208,6 @@ export default defineComponent({
|
||||
);
|
||||
}else{
|
||||
data = setEditData()
|
||||
if(!data.cooperator || !data.paidCommission || !data.remark )return message.warning('Please check the input box marked with *')
|
||||
Https.axiosGet(Https.httpUrls.updatePromCodeInfo,{params:data}).then(
|
||||
(rv) => {
|
||||
if (rv) {
|
||||
|
||||
@@ -90,6 +90,13 @@
|
||||
style="margin-right: 2rem;"
|
||||
>
|
||||
Edit
|
||||
</div>
|
||||
<div
|
||||
class="operate_item"
|
||||
@click="deletePromCode(record)"
|
||||
style="margin-right: 2rem;"
|
||||
>
|
||||
Delete
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -99,8 +106,10 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref, reactive, toRefs, computed, toRef } from "vue";
|
||||
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({
|
||||
@@ -267,6 +276,7 @@ export default defineComponent({
|
||||
let setAagree = (data:any) =>{
|
||||
dataDom.allUserPoerationsVue.init('Edit',data)
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(dataDom),
|
||||
rangePickerValue,
|
||||
@@ -320,7 +330,22 @@ export default defineComponent({
|
||||
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]
|
||||
|
||||
Reference in New Issue
Block a user