Commit 1c8d0a22 by 吕明尚

修改优惠券管理

parent 2bb6d86a
...@@ -47,38 +47,38 @@ ...@@ -47,38 +47,38 @@
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <!-- <el-col :span="1.5">-->
<el-button <!-- <el-button-->
type="primary" <!-- type="primary"-->
plain <!-- plain-->
icon="el-icon-plus" <!-- icon="el-icon-plus"-->
size="mini" <!-- size="mini"-->
@click="handleAdd" <!-- @click="handleAdd"-->
v-hasPermi="['system:records:add']" <!-- v-hasPermi="['system:records:add']"-->
>新增</el-button> <!-- >新增</el-button>-->
</el-col> <!-- </el-col>-->
<el-col :span="1.5"> <!-- <el-col :span="1.5">-->
<el-button <!-- <el-button-->
type="success" <!-- type="success"-->
plain <!-- plain-->
icon="el-icon-edit" <!-- icon="el-icon-edit"-->
size="mini" <!-- size="mini"-->
:disabled="single" <!-- :disabled="single"-->
@click="handleUpdate" <!-- @click="handleUpdate"-->
v-hasPermi="['system:records:edit']" <!-- v-hasPermi="['system:records:edit']"-->
>修改</el-button> <!-- >修改</el-button>-->
</el-col> <!-- </el-col>-->
<el-col :span="1.5"> <!-- <el-col :span="1.5">-->
<el-button <!-- <el-button-->
type="danger" <!-- type="danger"-->
plain <!-- plain-->
icon="el-icon-delete" <!-- icon="el-icon-delete"-->
size="mini" <!-- size="mini"-->
:disabled="multiple" <!-- :disabled="multiple"-->
@click="handleDelete" <!-- @click="handleDelete"-->
v-hasPermi="['system:records:remove']" <!-- v-hasPermi="['system:records:remove']"-->
>删除</el-button> <!-- >删除</el-button>-->
</el-col> <!-- </el-col>-->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
...@@ -129,24 +129,24 @@ ...@@ -129,24 +129,24 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<el-button <!-- <el-button-->
size="mini" <!-- size="mini"-->
type="text" <!-- type="text"-->
icon="el-icon-edit" <!-- icon="el-icon-edit"-->
@click="handleUpdate(scope.row)" <!-- @click="handleUpdate(scope.row)"-->
v-hasPermi="['system:records:edit']" <!-- v-hasPermi="['system:records:edit']"-->
>修改</el-button> <!-- >修改</el-button>-->
<el-button <!-- <el-button-->
size="mini" <!-- size="mini"-->
type="text" <!-- type="text"-->
icon="el-icon-delete" <!-- icon="el-icon-delete"-->
@click="handleDelete(scope.row)" <!-- @click="handleDelete(scope.row)"-->
v-hasPermi="['system:records:remove']" <!-- v-hasPermi="['system:records:remove']"-->
>删除</el-button> <!-- >删除</el-button>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
</el-table> </el-table>
<pagination <pagination
......
...@@ -186,6 +186,16 @@ ...@@ -186,6 +186,16 @@
<el-table-column align="center" class-name="small-padding fixed-width" fixed="right" label="操作"> <el-table-column align="center" class-name="small-padding fixed-width" fixed="right" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-if="scope.row.couponType ===6"
v-hasPermi="['system:coupon:edit']"
icon="el-icon-edit"
size="mini"
type="text"
@click="sumUpdate(scope.row)"
>修改
</el-button>
<el-button
v-if="scope.row.couponType ===5 || scope.row.couponType ===4"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
...@@ -193,6 +203,7 @@ ...@@ -193,6 +203,7 @@
v-hasPermi="['system:coupon:edit']" v-hasPermi="['system:coupon:edit']"
>修改 >修改
</el-button> </el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
...@@ -787,6 +798,17 @@ export default { ...@@ -787,6 +798,17 @@ export default {
this.sumOpen = true; this.sumOpen = true;
this.sumTitle = "添加金额券"; this.sumTitle = "添加金额券";
}, },
sumUpdate(row) {
this.reset();
const id = row.id || this.ids
getCoupon(id).then(response => {
this.sumForm = response.data;
this.sumForm.platformType = 1;
this.sumForm.couponType = '6';
this.sumOpen = true;
this.sumTitle = "修改金额券";
});
},
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
......
...@@ -109,7 +109,8 @@ ...@@ -109,7 +109,8 @@
clearable placeholder="请输入促销时长"/> clearable placeholder="请输入促销时长"/>
</el-form-item> </el-form-item>
<el-form-item label="促销金额" prop="promotionAmount"> <el-form-item label="促销金额" prop="promotionAmount">
<el-input v-model="form.promotionAmount" :disabled="!form.storeId" placeholder="请输入促销金额"/> <el-input-number v-model="form.promotionAmount" :disabled="!form.storeId" :max="9999" :min="1"/>
<!-- <el-input v-model="form.promotionAmount" :disabled="!form.storeId" placeholder="请输入促销金额"/>-->
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
......
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