Commit 694155ba by 吕明尚

优惠卷赠送功能

parent 062283b4
......@@ -201,23 +201,26 @@
<el-input-number v-model="form.duration" :min="0" :max="24" placeholder="请输入时长"/>
</el-form-item>
<el-form-item label="平台类型" prop="platformType">
<el-select v-model="form.platformType" placeholder="请选择第三方平台类型">
<el-select v-model="form.platformType" placeholder="请选择平台类型" clearable>
<el-option
v-for="dict in dict.type.store_platform_type"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
:key="1"
label="自营"
:value="1"
/>
</el-select>
</el-form-item>
<el-form-item label="订单类型" prop="orderType">
<el-select v-model="form.orderType" placeholder="请选择订单类型">
<el-select v-model="form.orderType" placeholder="请选择订单类型" clearable>
<el-option
v-for="dict in dict.type.store_order_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
key="1"
label="预订"
value="1"
/>
<el-option
key="2"
label="续单"
value="2"
/>
</el-select>
</el-form-item>
<el-form-item label="套餐" prop="packageId">
......@@ -419,6 +422,12 @@ export default {
const id = row.id || this.ids
getCoupon(id).then(response => {
this.form = response.data;
if (response.data.orderType) {
this.form.orderType = response.data.orderType.toString();
}
if (response.data.packageId) {
this.form.packageId = response.data.packageId.toString();
}
if (this.form.storeType) {
this.storeType = this.form.storeType.split(",")
}
......
......@@ -134,17 +134,6 @@
</div>
</template>
</el-table-column>
<el-table-column label="优惠金额" align="center" prop="subPrice"/>
<el-table-column label="有效期开始" align="center" prop="startDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.startDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="有效期结束" align="center" prop="endDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="数量" align="center" prop="number"/>
<el-table-column label="备注" align="center" prop="remark" />
......@@ -196,23 +185,26 @@
<!-- <el-input-number v-model="form.duration" :min="0" :max="24" placeholder="请输入时长"/>-->
<!-- </el-form-item>-->
<el-form-item label="平台类型" prop="platformType">
<el-select v-model="form.platformType" placeholder="请选择第三方平台类型">
<el-select v-model="form.platformType" placeholder="请选择平台类型" clearable>
<el-option
v-for="dict in dict.type.store_platform_type"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
key="2"
label="美团"
value="2"
/>
</el-select>
</el-form-item>
<el-form-item label="订单类型" prop="orderType">
<el-select v-model="form.orderType" placeholder="请选择订单类型">
<el-select v-model="form.orderType" placeholder="请选择订单类型" clearable>
<el-option
v-for="dict in dict.type.store_order_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
key="1"
label="预订"
value="1"
/>
<el-option
key="2"
label="续单"
value="2"
/>
</el-select>
</el-form-item>
<el-form-item label="套餐" prop="packageId">
......@@ -225,25 +217,6 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="优惠金额" prop="subPrice">
<el-input-number v-model="form.subPrice" :min="0" :max="9999" label="请输入优惠金额"/>
</el-form-item>
<el-form-item label="有效期开始" prop="startDate">
<el-date-picker clearable
v-model="form.startDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择有效期开始">
</el-date-picker>
</el-form-item>
<el-form-item label="有效期结束" prop="endDate">
<el-date-picker clearable
v-model="form.endDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择有效期结束">
</el-date-picker>
</el-form-item>
<el-form-item label="数量" prop="number">
<el-input-number v-model="form.number" :min="0" :max="9999" label="优惠卷数量"/>
<!-- <el-input v-model="form.number" type="textarea" placeholder="请输入数量" />-->
......@@ -421,8 +394,12 @@ export default {
const id = row.id || this.ids
getCoupon(id).then(response => {
this.form = response.data;
this.form.orderType = response.data.orderType.toString();
this.form.packageId = response.data.packageId.toString();
if (response.data.orderType) {
this.form.orderType = response.data.orderType.toString();
}
if (response.data.packageId) {
this.form.packageId = response.data.packageId.toString();
}
if(this.form.storeType){
this.storeType = this.form.storeType.split(",")
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment