增加获取优惠券
This commit is contained in:
@@ -461,3 +461,14 @@ export function $returnTableDetail(data) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
//获取订单可用优惠券
|
||||||
|
export function $activateByOrderId(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/tbShopCoupon/activateByOrderId',
|
||||||
|
method: "get",
|
||||||
|
params:{
|
||||||
|
shopId: localStorage.getItem("shopId"),
|
||||||
|
...data
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -825,7 +825,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="forms">
|
<div class="forms">
|
||||||
<el-form
|
<el-form
|
||||||
ref="form"
|
ref="form"
|
||||||
:model="createOrder.form"
|
:model="createOrder.form"
|
||||||
@@ -843,7 +843,7 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div> -->
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn_group">
|
<div class="btn_group">
|
||||||
<el-button size="medium" @click="disCountShow">
|
<el-button size="medium" @click="disCountShow">
|
||||||
@@ -1287,6 +1287,7 @@ import {
|
|||||||
tbShopTableGet,
|
tbShopTableGet,
|
||||||
$changeUseType,
|
$changeUseType,
|
||||||
$returnTableDetail,
|
$returnTableDetail,
|
||||||
|
$activateByOrderId
|
||||||
} from "@/api/table";
|
} from "@/api/table";
|
||||||
import { tbShopCategoryGet } from "@/api/shop";
|
import { tbShopCategoryGet } from "@/api/shop";
|
||||||
import {
|
import {
|
||||||
@@ -1745,6 +1746,7 @@ export default {
|
|||||||
tableId: this.table.tableId,
|
tableId: this.table.tableId,
|
||||||
masterId: this.masterId,
|
masterId: this.masterId,
|
||||||
vipUserId: val,
|
vipUserId: val,
|
||||||
|
orderId:this.createOrder.data.id||'',
|
||||||
type: val === "" ? 1 : 0,
|
type: val === "" ? 1 : 0,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -3407,9 +3409,17 @@ export default {
|
|||||||
this.table = params.tableId ? item : "";
|
this.table = params.tableId ? item : "";
|
||||||
},
|
},
|
||||||
async getOrderData(params) {
|
async getOrderData(params) {
|
||||||
|
const orderId= params ? params.orderId : this.createOrder.data.id
|
||||||
|
|
||||||
const res = await tbOrderInfoDetail(
|
const res = await tbOrderInfoDetail(
|
||||||
params ? params.orderId : this.createOrder.data.id
|
params ? params.orderId : this.createOrder.data.id
|
||||||
);
|
);
|
||||||
|
if(res.memberId){
|
||||||
|
$activateByOrderId({
|
||||||
|
orderId,memberId:res.memberId
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
if (res.status != "unpaid") {
|
if (res.status != "unpaid") {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user