affiliate修改佣金比例结构替换编辑接口
This commit is contained in:
@@ -57,6 +57,11 @@
|
||||
style="width: 250px"
|
||||
/>
|
||||
</div>
|
||||
{{ currentState }}
|
||||
<div class="admin_state_item">
|
||||
<span>State:</span>
|
||||
<a-select v-model:value="currentState" style="width:250px" optionFilterProp="label" :options="state" placeholder="Please select" allowClear show-search></a-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="allUserPoeration_btn admin_page">
|
||||
<div class="admin_search_item" @click="cancelDsign">Close</div>
|
||||
@@ -96,14 +101,29 @@ export default defineComponent({
|
||||
id: "",
|
||||
commission: "",
|
||||
});
|
||||
let currentState = ref('')
|
||||
let state = ref([
|
||||
{
|
||||
label:'Active',
|
||||
value:'Active',
|
||||
},
|
||||
{
|
||||
label:'Delete',
|
||||
value:'Delete',
|
||||
},
|
||||
{
|
||||
label:'Inactive',
|
||||
value:'Inactive',
|
||||
},
|
||||
])
|
||||
let init = (data) => {
|
||||
let funStr = 'Edit'
|
||||
console.log(data)
|
||||
operations.operationsModal = true;
|
||||
operations.title = funStr;
|
||||
if (funStr == "Edit") {
|
||||
operationsData.id = data.id;
|
||||
operationsData.commission = data.commissionPercent;
|
||||
currentState.value = data.status;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -111,11 +131,13 @@ export default defineComponent({
|
||||
return {
|
||||
id: operationsData.id,
|
||||
commission: operationsData.commission,
|
||||
operationType: currentState.value,
|
||||
};
|
||||
};
|
||||
let cancelDsign = () => {
|
||||
operationsData.id = "";
|
||||
operationsData.commission = "";
|
||||
currentState.value = "";
|
||||
operations.operationsModal = false;
|
||||
};
|
||||
let setOk = () => {
|
||||
@@ -125,7 +147,7 @@ export default defineComponent({
|
||||
!data.commission
|
||||
)
|
||||
return message.warning("Please check the input box marked with *");
|
||||
Https.axiosGet(Https.httpUrls.updateCommission, {params:data}).then(
|
||||
Https.axiosGet(Https.httpUrls.editAffiliate, {params:data}).then(
|
||||
(rv) => {
|
||||
if (rv) {
|
||||
cancelDsign();
|
||||
@@ -139,6 +161,8 @@ export default defineComponent({
|
||||
...toRefs(operationsData),
|
||||
cancelDsign,
|
||||
init,
|
||||
state,
|
||||
currentState,
|
||||
setOk,
|
||||
};
|
||||
},
|
||||
|
||||
@@ -366,6 +366,7 @@ export const Https = {
|
||||
personalCenter:`/api/affiliate/personalCenter`,//affiliate个人中心
|
||||
affiliateList:`/api/affiliate/list`,//affiliate审批列表
|
||||
updateCommission:`/api/affiliate/updateCommission`,//编辑佣金比例
|
||||
editAffiliate:`/api/affiliate/editAffiliate`,//编辑affiliate
|
||||
getEachAffiliateGeneratedRevenue:`/api/affiliate/getEachAffiliateGeneratedRevenue`,//affiliate每个用户根据日期查询收益
|
||||
affiliateApproval:`/api/affiliate/approval`,//affiliate同意 审批
|
||||
getPersonalMonthlyIncome:`/api/affiliate/getPersonalMonthlyIncome`,//affiliate图表接口
|
||||
|
||||
Reference in New Issue
Block a user