Merge branch 'test' of e.coding.net:g-cphe0354/yinshoukeguanliduan/management into gyq
This commit is contained in:
@@ -80,6 +80,9 @@
|
|||||||
<el-button type="primary" @click="addRewardHandle('rewardCoupons')">添加券</el-button>
|
<el-button type="primary" @click="addRewardHandle('rewardCoupons')">添加券</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="rewardCoupons">
|
<el-form-item prop="rewardCoupons">
|
||||||
|
<div>
|
||||||
|
<div class="tips">奖励券不受优惠券发放数量影响</div>
|
||||||
|
</div>
|
||||||
<el-table :data="form.rewardCoupons" border style="width: 600px;">
|
<el-table :data="form.rewardCoupons" border style="width: 600px;">
|
||||||
<el-table-column label="券ID" prop="couponId"></el-table-column>
|
<el-table-column label="券ID" prop="couponId"></el-table-column>
|
||||||
<el-table-column label="名称" prop="couponName"></el-table-column>
|
<el-table-column label="名称" prop="couponName"></el-table-column>
|
||||||
|
|||||||
@@ -10,14 +10,14 @@
|
|||||||
<el-form-item label="优惠券券名" prop="title" style="width: 100%;">
|
<el-form-item label="优惠券券名" prop="title" style="width: 100%;">
|
||||||
<el-input v-model="form.title" placeholder="" style="width: 289px;" />
|
<el-input v-model="form.title" placeholder="" style="width: 289px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="使用门槛" prop="fullAmount">
|
<el-form-item v-if="form.type == 1" label="使用门槛" prop="fullAmount">
|
||||||
<el-input v-model="form.fullAmount" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" placeholder="" style="width: 180px;margin-right: 66px;">
|
<el-input v-model="form.fullAmount" oninput="value= value.replace(/[^\d|\.]/g, '')" placeholder="" style="width: 180px;margin-right: 66px;">
|
||||||
<template slot="prepend">满</template>
|
<template slot="prepend">满</template>
|
||||||
<template slot="append">元</template>
|
<template slot="append">元</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="" prop="discountAmount">
|
<el-form-item v-if="form.type == 1" label="" prop="discountAmount">
|
||||||
<el-input v-model="form.discountAmount" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" placeholder="" style="width: 180px;">
|
<el-input v-model="form.discountAmount" oninput="value= value.replace(/[^\d|\.]/g, '')" placeholder="" style="width: 180px;">
|
||||||
<template slot="prepend">减</template>
|
<template slot="prepend">减</template>
|
||||||
<template slot="append">元</template>
|
<template slot="append">元</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
@@ -29,6 +29,11 @@
|
|||||||
</el-radio>
|
</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.validityType == 'fixed'" label="有效期(天)" prop="validDays" style="width: 100%;">
|
||||||
|
<el-input v-model="form.validDays" placeholder="" style="width: 200px;">
|
||||||
|
<template slot="append">天</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item v-if="form.validityType == 'custom'" label="有效时间" prop="validEndTime" style="width: 100%;">
|
<el-form-item v-if="form.validityType == 'custom'" label="有效时间" prop="validEndTime" style="width: 100%;">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="validityTime"
|
v-model="validityTime"
|
||||||
@@ -41,11 +46,6 @@
|
|||||||
@change="validityChange"
|
@change="validityChange"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="有效期(天)" prop="validDays" style="width: 100%;">
|
|
||||||
<el-input v-model="form.validDays" placeholder="" style="width: 200px;">
|
|
||||||
<template slot="append">天</template>
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<!-- <el-form-item label="使用门槛" prop="daysToTakeEffect" style="width: 100%;">
|
<!-- <el-form-item label="使用门槛" prop="daysToTakeEffect" style="width: 100%;">
|
||||||
<el-input v-model="form.daysToTakeEffect" placeholder="" style="width: 200px;">
|
<el-input v-model="form.daysToTakeEffect" placeholder="" style="width: 200px;">
|
||||||
<template slot="prepend">隔</template>
|
<template slot="prepend">隔</template>
|
||||||
@@ -87,25 +87,81 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
<!-- <el-button @click="dialogVisible = false">取 消</el-button> -->
|
||||||
<el-button type="primary" :loading="loading" @click="onSubmitHandle">确 定</el-button>
|
<el-button type="primary" :loading="loading" @click="onSubmitHandle">确 定</el-button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- 商品券 -->
|
<div v-if="form.type == 2">
|
||||||
<div v-if="form.type == 2" class="content">
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px" label-position="left">
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px" label-position="left">
|
||||||
<el-form-item label="商品券券名" prop="title">
|
<el-form-item label="优惠券券名" prop="title" style="width: 100%;">
|
||||||
<el-input v-model="form.title" placeholder="" style="width: 289px;" />
|
<el-input v-model="form.title" placeholder="" style="width: 289px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="发放数量" prop="number">
|
<el-form-item label="使用门槛" prop="fullAmount">
|
||||||
<el-input v-model="form.number" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" placeholder="" style="width: 289px;" />
|
全额满<el-input v-model="form.fullAmount" oninput="value= value.replace(/[^\d|\.]/g, '')" placeholder="" style="width: 100px;margin: 0 23px;"><template slot="suffix">元</template></el-input>可用
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="有效期类型" style="width: 100%;">
|
||||||
|
<el-radio-group v-model="form.validityType">
|
||||||
|
<el-radio v-for="item in couponEnum.validityType" :key="item.value" :label="item.value">
|
||||||
|
{{ item.label }}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.validityType == 'fixed'" label="有效期(天)" prop="validDays" style="width: 100%;">
|
||||||
|
<el-input v-model="form.validDays" placeholder="" style="width: 200px;">
|
||||||
|
<template slot="append">天</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.validityType == 'custom'" label="有效时间" prop="validEndTime" style="width: 100%;">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="validityTime"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
:default-time="['06:00:00', '23:59:59']"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
@change="validityChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="使用门槛" prop="daysToTakeEffect" style="width: 100%;">
|
||||||
|
<el-input v-model="form.daysToTakeEffect" placeholder="" style="width: 200px;">
|
||||||
|
<template slot="prepend">隔</template>
|
||||||
|
<template slot="append">天生效</template>
|
||||||
|
</el-input>
|
||||||
|
<el-tooltip class="item" effect="dark" content="领取后0天后0点0分" placement="top-start">
|
||||||
|
<i class="el-icon-question" />
|
||||||
|
</el-tooltip>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="可用周期" prop="userDays" style="width: 100%;">
|
||||||
|
<el-checkbox-group v-model="form.userDays">
|
||||||
|
<el-checkbox v-for="(city,index) in couponEnum.cycle" :key="index" :label="city.label" @change="userDayChagne">{{ city.label }}</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="指定时间段" style="width: 100%;">
|
||||||
|
<el-radio-group v-model="form.useTimeType">
|
||||||
|
<el-radio v-for="item in couponEnum.useTimeType" :key="item.value" :label="item.value">
|
||||||
|
{{ item.label }}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.useTimeType == 'custom'" label="指定时间段" prop="useEndTime" style="width: 100%;">
|
||||||
|
<el-time-picker
|
||||||
|
v-model="useTime"
|
||||||
|
is-range
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
:default-time="['00:00:00', '23:59:59']"
|
||||||
|
value-format="HH:mm"
|
||||||
|
@change="useTimeChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发放数量" prop="number" style="width: 100%;">
|
||||||
|
<el-input v-model="form.number" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" placeholder="" style="width: 200px;" />
|
||||||
<el-tooltip class="item" effect="dark" content="限用户自行领取,(当库存为 0时,集草等活动仍会赠送)" placement="top-start">
|
<el-tooltip class="item" effect="dark" content="限用户自行领取,(当库存为 0时,集草等活动仍会赠送)" placement="top-start">
|
||||||
<i class="el-icon-question" />
|
<i class="el-icon-question" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="使用门槛" prop="fullAmount">
|
|
||||||
全额满<el-input v-model="form.fullAmount" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" placeholder="" style="width: 100px;margin: 0 23px;"><template slot="suffix">元</template></el-input>可用
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="赠送商品" prop="products">
|
<el-form-item label="赠送商品" prop="products">
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="$refs.shopListRef.show([...form.products])">
|
<el-button type="primary" icon="el-icon-plus" @click="$refs.shopListRef.show([...form.products])">
|
||||||
@@ -123,10 +179,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
<!-- <el-button @click="dialogVisible = false">取 消</el-button> -->
|
||||||
<el-button type="primary" :loading="loading" @click="onSubmitHandle">确 定</el-button>
|
<el-button type="primary" :loading="loading" @click="onSubmitHandle">确 定</el-button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -266,6 +321,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
tabClick(item) {
|
tabClick(item) {
|
||||||
console.log(this.form)
|
console.log(this.form)
|
||||||
|
this.form = this.resetForm
|
||||||
this.form.number = ''
|
this.form.number = ''
|
||||||
this.form.type = item.type
|
this.form.type = item.type
|
||||||
this.$refs.form.resetFields()
|
this.$refs.form.resetFields()
|
||||||
@@ -324,7 +380,7 @@ export default {
|
|||||||
res.map(async item => {
|
res.map(async item => {
|
||||||
if (!await this.checkShop(item.id)) {
|
if (!await this.checkShop(item.id)) {
|
||||||
this.form.products.push({
|
this.form.products.push({
|
||||||
id: item.id,
|
productId: item.id,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
num: null
|
num: null
|
||||||
})
|
})
|
||||||
@@ -332,7 +388,7 @@ export default {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.form.products.push({
|
this.form.products.push({
|
||||||
id: res[0].id,
|
productId: res[0].id,
|
||||||
name: res[0].name,
|
name: res[0].name,
|
||||||
num: null
|
num: null
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ export function returnPackFee(arr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function canTuicai(orderInfo,item){
|
export function canTuicai(orderInfo,item){
|
||||||
|
if(orderInfo.status=='unpaid'&&orderInfo.isPostpaid!==null&&orderInfo.isPostpaid==0){
|
||||||
|
return false
|
||||||
|
}
|
||||||
return orderInfo.status=='unpaid'&&orderInfo.useType!='dine-in-before'&& item.status!='return'
|
return orderInfo.status=='unpaid'&&orderInfo.useType!='dine-in-before'&& item.status!='return'
|
||||||
}
|
}
|
||||||
export function canTuiKuan(orderInfo,item){
|
export function canTuiKuan(orderInfo,item){
|
||||||
|
|||||||
@@ -1752,7 +1752,11 @@ export default {
|
|||||||
},
|
},
|
||||||
yinFuJinE() {
|
yinFuJinE() {
|
||||||
const total = this.currentPayMoney - (this.points.toMoney || 0);
|
const total = this.currentPayMoney - (this.points.toMoney || 0);
|
||||||
|
if(this.isCreateOrder){
|
||||||
return total.toFixed(2);
|
return total.toFixed(2);
|
||||||
|
}else{
|
||||||
|
return this.allPrice;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
disableTuicai() {
|
disableTuicai() {
|
||||||
return (
|
return (
|
||||||
@@ -3891,7 +3895,7 @@ export default {
|
|||||||
this.$router.replace({ path: "/tool/table_list" });
|
this.$router.replace({ path: "/tool/table_list" });
|
||||||
} else {
|
} else {
|
||||||
this.$router.replace({ path: "/tool/Instead/index" });
|
this.$router.replace({ path: "/tool/Instead/index" });
|
||||||
// this.$router.go(0);
|
this.$router.go(0);
|
||||||
// this.reset();
|
// this.reset();
|
||||||
// this.$router.replace({ path: "/tool/Instead/index" });
|
// this.$router.replace({ path: "/tool/Instead/index" });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,12 +5,13 @@
|
|||||||
<el-form-item label="充值">
|
<el-form-item label="充值">
|
||||||
<template>
|
<template>
|
||||||
<div style="display: flex;">
|
<div style="display: flex;">
|
||||||
<el-input style="width: 220px;" placeholder="请输入金额" v-model="form.amount">
|
<el-input style="width: 220px;" placeholder="请输入金额" v-model="form.amount"
|
||||||
|
@input="(v) => (form.amount = v.replace(/^(0+)|[^\d]+/g, ''))">
|
||||||
<template slot="prepend">满</template>
|
<template slot="prepend">满</template>
|
||||||
<template slot="append">元</template>
|
<template slot="append">元</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<el-input style="margin-left: 20px; width: 220px;" placeholder="请输入金额"
|
<el-input style="margin-left: 20px; width: 220px;" placeholder="请输入金额"
|
||||||
v-model="form.giftAmount">
|
v-model="form.giftAmount" @input="(v) => (form.giftAmount = v.replace(/^(0+)|[^\d]+/g, ''))">
|
||||||
<template slot="prepend">赠</template>
|
<template slot="prepend">赠</template>
|
||||||
<template slot="append">元</template>
|
<template slot="append">元</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
|
|||||||
Reference in New Issue
Block a user