Commit 84f8632e by zhangmengjie

23.4.13

parent 3fbeb6e9
<template> <template>
<div class="app-container"> <div class="app-container">
<el-dialog <el-dialog :title="title" :visible.sync="dialogVisible" width="60%" :before-close="handleCancle">
:title="title" <el-form :model="form" :rules="rules" ref="form" label-width="100px" class="demo-form">
:visible.sync="dialogVisible"
width="60%"
:before-close="handleCancle"
>
<el-form
:model="form"
:rules="rules"
ref="form"
label-width="100px"
class="demo-form"
>
<el-form-item label="券类型" prop="couponType"> <el-form-item label="券类型" prop="couponType">
<el-select v-model="form.couponType" placeholder="请选择"> <el-select :disabled="disableds" v-model="form.couponType" placeholder="请选择">
<el-option <el-option v-for="item in activeAreaList" :key="item.value" :label="item.label" :value="item.value">
v-for="item in activeAreaList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="优惠内容" prop="fullSubtraction"> <el-form-item label="优惠内容" prop="fullSubtraction">
<div class="d-flex a-center custom-input"> <div class="d-flex a-center custom-input">
<div class="margin-right">减免</div> <div class="margin-right">减免</div>
<el-input <el-input :disabled="disabled" type="number" class="delInput flex-1" min="1" placeholder="减免金额>0且<99999"
type="number" v-model="form.fullSubtraction">
class="delInput flex-1"
min="1"
placeholder="减免金额>0且<99999"
v-model="form.fullSubtraction"
>
</el-input> </el-input>
<div class="margin-left"></div> <div class="margin-left"></div>
</div> </div>
...@@ -41,31 +20,18 @@ ...@@ -41,31 +20,18 @@
<el-form-item label="优惠门槛" prop="minUsed"> <el-form-item label="优惠门槛" prop="minUsed">
<div class="d-flex a-center custom-input"> <div class="d-flex a-center custom-input">
<div class="margin-right">最低消费,满</div> <div class="margin-right">最低消费,满</div>
<el-input <el-input :disabled="disabled" type="number" class="delInput flex-1" min="0" v-model="form.minUsed" />
type="number"
class="delInput flex-1"
min="0"
v-model="form.minUsed"
/>
<div class="margin-left">元,可用</div> <div class="margin-left">元,可用</div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="生效时间" prop="effectiveTime"> <el-form-item label="生效时间" prop="effectiveTime">
<el-date-picker <el-date-picker :disabled="disabled" v-model="form.effectiveTime" type="date" placeholder="选择日期"
v-model="form.effectiveTime" value-format="yyyy-MM-dd">
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="失效时间" prop="failureTime"> <el-form-item label="失效时间" prop="failureTime">
<el-date-picker <el-date-picker :disabled="disabled" v-model="form.failureTime" type="date" placeholder="选择日期"
v-model="form.failureTime" value-format="yyyy-MM-dd">
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -78,7 +44,7 @@ ...@@ -78,7 +44,7 @@
</template> </template>
<script> <script>
import { coupontsGET} from '@/api/orderform/index' import { coupontsGET } from '@/api/orderform/index'
export default { export default {
props: { props: {
...@@ -88,7 +54,15 @@ export default { ...@@ -88,7 +54,15 @@ export default {
title: { title: {
type: String, type: String,
}, },
isEdit:Boolean isEdit: Boolean,
disabled: {
type: Boolean,
default: false,
},
disableds:{
type:Boolean,
default:false,
}
}, },
data() { data() {
return { return {
...@@ -99,7 +73,7 @@ export default { ...@@ -99,7 +73,7 @@ export default {
fullSubtraction: "", // 减免 fullSubtraction: "", // 减免
minUsed: "", // 最低消费 minUsed: "", // 最低消费
effectiveTime: '', // 生效时间 effectiveTime: '', // 生效时间
failureTime:'', // 失效时间 failureTime: '', // 失效时间
}, },
rules: { rules: {
fullSubtraction: [ fullSubtraction: [
...@@ -130,14 +104,14 @@ export default { ...@@ -130,14 +104,14 @@ export default {
], ],
}; };
}, },
created() {}, created() { },
methods: { methods: {
handleCancle() { handleCancle() {
this.$emit("cancle"); this.$emit("cancle");
}, },
couponts(val){ couponts(val) {
coupontsGET(val).then((res)=>{ coupontsGET(val).then((res) => {
if(res.code == 200){ if (res.code == 200) {
this.form = res.data this.form = res.data
} }
}) })
...@@ -157,7 +131,6 @@ export default { ...@@ -157,7 +131,6 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .delInput input::-webkit-outer-spin-button, ::v-deep .delInput input::-webkit-outer-spin-button,
::v-deep .delInput input::-webkit-inner-spin-button { ::v-deep .delInput input::-webkit-inner-spin-button {
-webkit-appearance: none !important; -webkit-appearance: none !important;
...@@ -166,28 +139,36 @@ export default { ...@@ -166,28 +139,36 @@ export default {
::v-deep .delInput input[type="number"] { ::v-deep .delInput input[type="number"] {
-moz-appearance: textfield; -moz-appearance: textfield;
} }
.description { .description {
font-size: 25px; font-size: 25px;
margin-top: 10px; margin-top: 10px;
} }
.d-flex { .d-flex {
display: flex; display: flex;
} }
.a-center { .a-center {
align-items: center; align-items: center;
} }
.flex-1 { .flex-1 {
flex: 1; flex: 1;
} }
.margin-left { .margin-left {
margin-left: 10px; margin-left: 10px;
} }
.margin-right { .margin-right {
margin-right: 10px; margin-right: 10px;
} }
.custom-input { .custom-input {
width: 250px !important; width: 250px !important;
} }
.customer { .customer {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" /> @pagination="getList" />
<!-- 弹出框 --> <!-- 弹出框 -->
<dialogFile :dialogVisible="dialogVisible" :title="title" @cancle="handleCancleDialog" @onSubmit="handleSave" <dialogFile :dialogVisible="dialogVisible" :disableds="disableds" :disabled="disabled" :title="title" @cancle="handleCancleDialog" @onSubmit="handleSave"
:isEdit="isEdit" ref="refDialogFile"></dialogFile> :isEdit="isEdit" ref="refDialogFile"></dialogFile>
</div> </div>
</template> </template>
...@@ -56,6 +56,8 @@ export default { ...@@ -56,6 +56,8 @@ export default {
pageNum: 0, pageNum: 0,
pageSize: 10, pageSize: 10,
}, },
disabled:false,
disableds:false,
value: "", value: "",
tableData: [], tableData: [],
isEdit: true,//判断添加修改详情的保存按钮是否显示 isEdit: true,//判断添加修改详情的保存按钮是否显示
...@@ -89,6 +91,8 @@ export default { ...@@ -89,6 +91,8 @@ export default {
let that = this; let that = this;
that.title = "添加优惠券"; that.title = "添加优惠券";
this.$refs['refDialogFile'].form = {} this.$refs['refDialogFile'].form = {}
this.disabled = false
this.disableds = false
that.isEdit = true that.isEdit = true
that.dialogVisible = true; that.dialogVisible = true;
}, },
...@@ -109,9 +113,13 @@ export default { ...@@ -109,9 +113,13 @@ export default {
if (type == "1") { if (type == "1") {
that.title = "修改优惠券"; that.title = "修改优惠券";
this.$refs['refDialogFile'].couponts(sta.id) this.$refs['refDialogFile'].couponts(sta.id)
this.disabled = false
this.disableds = true
that.isEdit = true that.isEdit = true
} else if (type == "2") { } else if (type == "2") {
this.$refs['refDialogFile'].couponts(sta.id) this.$refs['refDialogFile'].couponts(sta.id)
this.disabled = true
this.disableds = true
that.title = "查看优惠券"; that.title = "查看优惠券";
that.isEdit = false that.isEdit = false
} }
......
...@@ -117,7 +117,7 @@ export default { ...@@ -117,7 +117,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
if (res.data.videoList && res.data.videoList.length) { if (res.data.videoList && res.data.videoList.length) {
self.video = res.data.videoList[0].url self.video = res.data.videoList[0].url
self.videoCover = res.data.videoList[0].videoCover self.videoCover = res.data.videoList[0].cropImage
console.log(self.particulars.video,'self.particulars.video') console.log(self.particulars.video,'self.particulars.video')
} else { } else {
self.video = '' self.video = ''
......
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