Commit 3ad72939 by 胡悦

合并

2 parents 8ea18ff1 bbb19dfe
<!-- 弹窗 --> <!-- 弹窗 -->
<template> <template>
<div> <div>
<el-dialog :title="title" :visible.sync="isVisible" :show-close="showClose" :before-close="handleClose" :close-on-click-modal="false" :width="width"> <el-dialog :title="title" :visible.sync="isVisible" :show-close="showClose" :before-close="handleClose" :close-on-click-modal="false" :modal-append-to-body="false" :width="width">
<el-scrollbar> <el-scrollbar v-if="hasScroll">
<span slot="title"> <span slot="title">
{{ title }} <span class="main-title">{{ title }}</span>
<span class="dialog-sub-title"> <span class="dialog-sub-title">
<slot name="sub-title"></slot> <slot name="sub-title"></slot>
</span> </span>
</span> </span>
<slot></slot> <slot></slot>
</el-scrollbar> </el-scrollbar>
<template v-if="!hasScroll">
<span slot="title">
<span class="main-title">{{ title }}</span>
<span class="dialog-sub-title">
<slot name="sub-title"></slot>
</span>
</span>
<slot></slot>
</template>
<div slot="footer"> <div slot="footer">
<slot name="btn-start"></slot> <slot name="btn-start"></slot>
<el-button type="primary" v-if="!noClose" :size="btnSize" @click="handleClose">关闭</el-button> <el-button :type="typeName" v-if="!noClose" :size="btnSize" @click="handleClose">{{btnCloseLabel}}</el-button>
<el-button type="primary" v-if="!noBtnOk" :size="btnSize" @click="handleConfirm">{{ btnOkLabel }}</el-button> <el-button type="primary" v-if="!noBtnOk" :size="btnSize" @click="handleConfirm">{{ btnOkLabel }}</el-button>
<el-button v-if="!noCancel" type="primary" :size="btnSize" @click="handleClose">{{ btnCancelLabel }}</el-button> <el-button type="primary" v-if="!noCancel" :size="btnSize" @click="handleClose">{{ btnCancelLabel }}</el-button>
<slot name="btn-middle"></slot> <slot name="btn-middle"></slot>
</div> </div>
</el-dialog> </el-dialog>
...@@ -29,6 +39,10 @@ export default { ...@@ -29,6 +39,10 @@ export default {
return {} return {}
}, },
props: { props: {
hasScroll:{
type: Boolean,
default: true
},
title: { title: {
type: String, type: String,
default: '' default: ''
...@@ -41,6 +55,10 @@ export default { ...@@ -41,6 +55,10 @@ export default {
type: Boolean, type: Boolean,
default: true default: true
}, },
btnCloseLabel:{
type: String,
default: '关闭'
},
btnOkLabel: { btnOkLabel: {
type: String, type: String,
default: '确定' default: '确定'
...@@ -61,6 +79,10 @@ export default { ...@@ -61,6 +79,10 @@ export default {
type: Boolean, type: Boolean,
default: true default: true
}, },
typeName:{
type:String,
default:''
},
width: { width: {
type: String, type: String,
default: '580px' default: '580px'
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</GLTable> </GLTable>
</div> </div>
<glsx-dialog title="权益详情" width="712px" :noBtnOk="true" :noCancel="true" :noClose="false" btnCancelLabel="关闭" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose"> <glsx-dialog title="权益详情" width="712px" :noBtnOk="true" :noCancel="true" :noClose="false" btnCancelLabel="关闭" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose">
<el-scrollbar> <!-- <el-scrollbar> -->
<div class="modal-body"> <div class="modal-body">
<div class="equity-name">汽车权益</div> <div class="equity-name">汽车权益</div>
<div class="equity-panel"> <div class="equity-panel">
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
</div> </div>
</div> </div>
</div> </div>
</el-scrollbar> <!-- </el-scrollbar> -->
</glsx-dialog> </glsx-dialog>
</div> </div>
</template> </template>
...@@ -180,7 +180,6 @@ export default { ...@@ -180,7 +180,6 @@ export default {
{ {
label: '会员类型', label: '会员类型',
prop: 'memberType', prop: 'memberType',
line: 1,
formatter: cellValue => { formatter: cellValue => {
return this.baseDataList.memberTypeList.find(item => item.confId == cellValue.memberType).confName return this.baseDataList.memberTypeList.find(item => item.confId == cellValue.memberType).confName
} }
...@@ -192,18 +191,17 @@ export default { ...@@ -192,18 +191,17 @@ export default {
{ {
label: '开通方式', label: '开通方式',
prop: 'activeTypeDesc', prop: 'activeTypeDesc',
line: 1
}, },
{ {
label: '开通日期', label: '开通日期',
prop: 'activeTime', prop: 'activeTime',
line: 1
// addHtml: 'activeTime' // addHtml: 'activeTime'
}, },
{ {
label: '状态', label: '状态',
prop: 'status', prop: 'status',
width: '80',
formatter: cellValue => { formatter: cellValue => {
return this.baseDataList.statusList.find(item => item.confId == cellValue.status).confName return this.baseDataList.statusList.find(item => item.confId == cellValue.status).confName
} }
...@@ -283,11 +281,12 @@ export default { ...@@ -283,11 +281,12 @@ export default {
}, },
getCardContentFun() { getCardContentFun() {
getCardContent({ merchantId: this.merchantId }).then(res => { getCardContent({ merchantId: this.merchantId }).then(res => {
this.ruleForm.equityId = res[0].id
this.ruleForm.cardName = res[0].cardClassName this.ruleForm.cardName = res[0].cardClassName
this.ruleForm.price = res[0].price this.ruleForm.price = res[0].price
this.ruleForm.marketPrice = res[0].marketPrice this.ruleForm.marketPrice = res[0].marketPrice
this.ruleForm.linkUrl = res[0].url this.ruleForm.linkUrl = res[0].url
this.ruleForm.equityId = res[0].id
}) })
}, },
openEditWrap() { openEditWrap() {
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<img class="img-60" :src="scope.scope.shareImgUrl" /> <img class="img-60" :src="scope.scope.shareImgUrl" />
</span> --> </span> -->
<span class="table-btns" slot="auth-button" slot-scope="scope" :data="scope.scope"> <span class="table-btns" slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="handleDetail(scope.scope)">详情</el-button> <el-button type="text" @click="handleDetail(scope.scope)" v-if="scope.scope.orderType==1">详情</el-button>
</span> </span>
</GLTable> </GLTable>
</div> </div>
...@@ -86,7 +86,7 @@ export default { ...@@ -86,7 +86,7 @@ export default {
{ {
label: '名称', label: '名称',
prop: 'packageName', prop: 'packageName',
width: '180' width: '180',
// formatter: cellValue => { // formatter: cellValue => {
// return cellValue.startTime + '-' + cellValue.endTime // return cellValue.startTime + '-' + cellValue.endTime
// } // }
...@@ -96,7 +96,7 @@ export default { ...@@ -96,7 +96,7 @@ export default {
prop: 'orderType', prop: 'orderType',
formatter: cellValue => { formatter: cellValue => {
return this.baseDataList.orderTypesList.find(item => item.confId == cellValue.orderType).confName return this.baseDataList.orderTypesList.find(item => item.confId == cellValue.orderType).confName
} }
}, },
{ {
label: '价格', label: '价格',
......
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
<div class="topMsg"> <div class="topMsg">
<div class="orderNo">订单编号:{{ detail.orderCode }}</div> <div class="orderNo">订单编号:{{ detail.orderCode }}</div>
<div class="orderTime">下单时间:{{ detail.createDate }}</div> <div class="orderTime">下单时间:{{ detail.createDate }}</div>
<el-button type="primary" size="small" class="backBtn" @click="goBack">返回</el-button> <el-button type="primary" size="small" class="backBtn" @click="goBack">
返回
</el-button>
</div> </div>
<div class="midMsgWrap"> <div class="midMsgWrap">
<div class="midMsgTitle"> <div class="midMsgTitle">
...@@ -16,7 +18,7 @@ ...@@ -16,7 +18,7 @@
<div class="midMsgContent"> <div class="midMsgContent">
<div class="item"> <div class="item">
<div>付款状态:已付款</div> <div>付款状态:已付款</div>
<div>付款金额:{{ detail.realPayPrice }}元</div> <div>付款金额:{{ detail.realPayPrice }}<span v-show="detail.realPayPrice">元</span></div>
<div>付款方式:微信支付</div> <div>付款方式:微信支付</div>
<div>付款时间:{{ detail.createDate }}</div> <div>付款时间:{{ detail.createDate }}</div>
</div> </div>
...@@ -37,6 +39,7 @@ ...@@ -37,6 +39,7 @@
</div> </div>
</div> </div>
<div id="tableWrap"> <div id="tableWrap">
<div class="tableWrapBox">
<el-table :data="tableData" style="width: 100%" :header-cell-style="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }"> <el-table :data="tableData" style="width: 100%" :header-cell-style="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<el-table-column label="商品名称" align="center"> <el-table-column label="商品名称" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -59,7 +62,7 @@ ...@@ -59,7 +62,7 @@
<el-table-column prop="totalPrice" label="小计/元" align="center"></el-table-column> <el-table-column prop="totalPrice" label="小计/元" align="center"></el-table-column>
<el-table-column prop="realPayPrice" label="实收金额" align="center"> <el-table-column prop="realPayPrice" label="实收金额" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="color: #eb4e4e">{{ scope.row.realPayPrice }}</span> <span style="color:#EB4E4E">{{ scope.row.realPayPrice }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="orderStatus" label="状态" align="center"> <el-table-column prop="orderStatus" label="状态" align="center">
...@@ -68,6 +71,8 @@ ...@@ -68,6 +71,8 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -79,8 +84,8 @@ export default { ...@@ -79,8 +84,8 @@ export default {
data() { data() {
return { return {
tableData: [{}], tableData: [{}],
detail: {}, //this.$route.query.detail, detail: {},//this.$route.query.detail,
mylist: [] mylist:[]
} }
}, },
created() { created() {
...@@ -95,23 +100,25 @@ export default { ...@@ -95,23 +100,25 @@ export default {
}) })
}, },
methods: { methods: {
getOrderPageDetail() { getOrderPageDetail(){
getOrderPageDetail({ id: this.$route.query.id }).then(res => { getOrderPageDetail({id:this.$route.query.id}).then(res=>{
// this.mylist=res.list // this.mylist=res.list
if (res.code == '0') { if(res.code=='0'){
this.detail = res.data this.detail=res.data
this.$set(this.tableData[0], 'couponList', this.detail.couponList) this.$set(this.tableData[0], 'couponList', this.detail.couponList)
this.$set(this.tableData[0], 'orderType', this.detail.orderType) this.$set(this.tableData[0], 'orderType', this.detail.orderType)
this.$set(this.tableData[0], 'effectiveNum', this.detail.effectiveNum) this.$set(this.tableData[0], 'effectiveNum', this.detail.effectiveNum)
this.$set(this.tableData[0], 'originalPrice', this.detail.originalPrice) this.$set(this.tableData[0], 'originalPrice', this.detail.originalPrice)
this.$set(this.tableData[0], 'amount', 1) this.$set(this.tableData[0], 'amount', 1)
this.$set(this.tableData[0], 'totalPrice', this.detail.originalPrice) this.$set(this.tableData[0], 'totalPrice', this.detail.originalPrice)
this.$set(this.tableData[0], 'realPayPrice', this.detail.realPayPrice) this.$set(this.tableData[0], 'realPayPrice', this.detail.realPayPrice)
this.$set(this.tableData[0], 'orderStatus', this.detail.orderStatus) this.$set(this.tableData[0], 'orderStatus', this.detail.orderStatus)
} else { }else{
this.$message.error(`${res.message}`) this.$message.error(`${res.message}`)
} }
})
})
}, },
// setTableData() { // setTableData() {
...@@ -135,8 +142,9 @@ export default { ...@@ -135,8 +142,9 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.container { .container {
padding-top: 0px; padding: 0 0 20px;
.topMsg { .topMsg {
margin-right: 20px;
display: flex; display: flex;
height: 56px; height: 56px;
align-items: center; align-items: center;
...@@ -162,6 +170,7 @@ export default { ...@@ -162,6 +170,7 @@ export default {
} }
} }
.midMsgWrap { .midMsgWrap {
border-bottom: 1px solid#DCDFE6; border-bottom: 1px solid#DCDFE6;
margin-bottom: 30px; margin-bottom: 30px;
.midMsgTitle { .midMsgTitle {
...@@ -196,5 +205,10 @@ export default { ...@@ -196,5 +205,10 @@ export default {
} }
} }
} }
.tableWrapBox{
margin-left: 30px;
margin-right: 30px;
border: 1px solid rgba(0, 0, 0, 0.06);
}
} }
</style> </style>
...@@ -116,6 +116,7 @@ export default { ...@@ -116,6 +116,7 @@ export default {
} }
] ]
} }
} }
}, },
methods: { methods: {
...@@ -193,7 +194,7 @@ export default { ...@@ -193,7 +194,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.el-input--small .el-input__inner{ /deep/.el-input--small .el-input__inner {
width: 215px; width: 215px;
} }
.el-range-editor.is-active, .el-range-editor.is-active,
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- //提示面板组件 --> <!-- //提示面板组件 -->
<tip-panel panelWidth="616px" panelMinHeight="60px" :panelContent="panelContent" v-if="isFirstShow" @closePanel="closePanel"></tip-panel> <tip-panel panelWidth="616px" panelMinHeight="60px" :panelContent="panelContent" v-if="isFirstShow" @closePanel="closePanel"></tip-panel>
<div class="live-room container"> <div class="live-room container">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="100px" label-position="right"> <el-form :inline="true" style="width:100%" :model="searchForm" label-width="100px" label-position="right">
<el-row> <el-row>
<el-form-item size="small"> <el-form-item size="small">
<el-button :size="size" type="primary" icon="el-icon-plus" @click="handleCreate">创建服务</el-button> <el-button :size="size" type="primary" icon="el-icon-plus" @click="handleCreate">创建服务</el-button>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<el-input :size="size" v-model="searchForm.couponName" placeholder="请输入服务名称" clearable></el-input> <el-input :size="size" v-model="searchForm.couponName" placeholder="请输入服务名称" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" style="float: right"> <el-form-item size="small" style="float:right">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" @click="handleReset">重置</el-button> <el-button :size="size" @click="handleReset">重置</el-button>
</el-form-item> </el-form-item>
...@@ -47,7 +47,8 @@ ...@@ -47,7 +47,8 @@
</template> </template>
<script> <script>
import { getServiceListApi, effectiveService, deleteService, getLoginCount } from '@/api/modules/service' import { getServiceListApi, effectiveService, deleteService,getLoginCount } from '@/api/modules/service'
import { serviceStatusList } from '@/common/constant' import { serviceStatusList } from '@/common/constant'
import tipPanel from '@/components/tipPanel/index.vue' import tipPanel from '@/components/tipPanel/index.vue'
export default { export default {
...@@ -98,11 +99,12 @@ export default { ...@@ -98,11 +99,12 @@ export default {
label: '剩余库存', label: '剩余库存',
prop: 'residueAmount', prop: 'residueAmount',
line: 1 line: 1
// addHtml: 'activeTime'
}, },
{ {
label: '状态', label: '状态',
prop: 'status', prop: 'status',
width: '80', // width: '80',
formatter: cellValue => { formatter: cellValue => {
return this.baseDataList.serviceStatusList.find(item => item.confId == cellValue.status).confName return this.baseDataList.serviceStatusList.find(item => item.confId == cellValue.status).confName
} }
...@@ -110,7 +112,7 @@ export default { ...@@ -110,7 +112,7 @@ export default {
{ {
label: '创建时间', label: '创建时间',
prop: 'createdDate', prop: 'createdDate',
width: 95 width:95
} }
] ]
}, },
...@@ -125,7 +127,7 @@ export default { ...@@ -125,7 +127,7 @@ export default {
//运行在qiankun容器中 //运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId this.merchantId = this.$globalState.session.merchantId
} }
this.getLoginCountFun() this.getLoginCountFun()
}, },
methods: { methods: {
getLoginCountFun() { getLoginCountFun() {
...@@ -255,6 +257,7 @@ export default { ...@@ -255,6 +257,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.el-input--small .el-input__inner{ /deep/.el-input--small .el-input__inner{
width: 215px; width: 215px;
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<div class="live-room container"> <div class="live-room container">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm"> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm">
<el-form-item size="small" label="服务名称" prop="couponName" style="width: 420px"> <el-form-item size="small" label="服务名称" prop="couponName" style="width: 420px">
<el-input size="small" :disabled="disabledContent" v-model="ruleForm.couponName" maxlength="20" placeholder="请输入服务名称,如“精洗轿车”"></el-input> <el-input size="small" :disabled="disabledContent" v-model.trim="ruleForm.couponName" maxlength="20" placeholder="请输入服务名称,如“精洗轿车”"></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="有效期" prop="effectiveType"> <el-form-item size="small" label="有效期" prop="effectiveType">
...@@ -18,11 +18,11 @@ ...@@ -18,11 +18,11 @@
<el-radio :label="1"> <el-radio :label="1">
领取后 领取后
<el-input <el-input
v-model="effectiveDays" v-model="ruleForm.effectiveDays"
maxlength="4" maxlength="4"
@input=" @input="
val => { val => {
effectiveDays = val.replace(/[^\d]/g, '') ruleForm.effectiveDays = val.replace(/[^\d]/g, '')
} }
" "
:disabled="disabledContent" :disabled="disabledContent"
...@@ -47,18 +47,18 @@ ...@@ -47,18 +47,18 @@
<el-radio :label="1"> <el-radio :label="1">
有效期内可使用 有效期内可使用
<el-button @click="sub1" class="addsubBtn" :disabled="disabledContent">-</el-button> <el-button @click="sub1" class="addsubBtn" :disabled="disabledContent">-</el-button>
<span class="numWrap">{{ limitTime1 }}</span> <span class="numWrap">{{ ruleForm.limitTime1 }}</span>
<el-button @click="add1" class="addsubBtn" :disabled="disabledContent">+</el-button> <el-button @click="add1" class="addsubBtn" :disabled="disabledContent">+</el-button>
次 次
</el-radio> </el-radio>
<el-radio :label="2"> <el-radio :label="2">
有效期内每 有效期内每
<el-input <el-input
v-model="limitDays" v-model="ruleForm.limitDays"
maxlength="4" maxlength="4"
@input=" @input="
val => { val => {
limitDays = val.replace(/[^\d]/g, '') ruleForm.limitDays = val.replace(/[^\d]/g, '')
} }
" "
:disabled="disabledContent" :disabled="disabledContent"
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
></el-input> ></el-input>
天内可使用 天内可使用
<el-button @click.stop="sub2" class="addsubBtn" :disabled="disabledContent">-</el-button> <el-button @click.stop="sub2" class="addsubBtn" :disabled="disabledContent">-</el-button>
<span class="numWrap">{{ limitTime2 }}</span> <span class="numWrap">{{ ruleForm.limitTime2 }}</span>
<el-button @click.stop="add2" class="addsubBtn" :disabled="disabledContent">+</el-button> <el-button @click.stop="add2" class="addsubBtn" :disabled="disabledContent">+</el-button>
次 次
</el-radio> </el-radio>
...@@ -91,11 +91,16 @@ ...@@ -91,11 +91,16 @@
<el-form-item size="small" label="使用说明" prop="useDescription" style="width: 670px"> <el-form-item size="small" label="使用说明" prop="useDescription" style="width: 670px">
<el-input size="small" :rows="6" :disabled="title == '查看'" type="textarea" v-model="ruleForm.useDescription" placeholder="请输入" maxlength="200" show-word-limit></el-input> <el-input size="small" :rows="6" :disabled="title == '查看'" type="textarea" v-model="ruleForm.useDescription" placeholder="请输入" maxlength="200" show-word-limit></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item size="small">
<el-button type="primary" @click="submitForm('ruleForm')" size="small">创建</el-button>
<el-button type="primary" @click="resetForm('ruleForm')" size="small">重置</el-button>
</el-form-item> -->
</el-form> </el-form>
<div class="serviceCard"> <div class="serviceCard">
<div class="cardtop"> <div class="cardtop">
<img src="@/assets/serviceMemberCard.png" alt="" /> <img src="@/assets/serviceMemberCard.png" alt="" />
<span class="serviceName ellipsis-1" :title="couponName">{{ ruleForm.couponName || '-' }}</span> <span class="serviceName ellipsis-1" :title="ruleForm.couponName">{{ ruleForm.couponName || '-' }}</span>
<span class="effectiveRange">{{ limitText }}</span> <span class="effectiveRange">{{ limitText }}</span>
<span class="timeRange">{{ effectiveRangeText }}</span> <span class="timeRange">{{ effectiveRangeText }}</span>
<div class="grayLine"></div> <div class="grayLine"></div>
...@@ -113,15 +118,34 @@ ...@@ -113,15 +118,34 @@
}" }"
> >
<el-button type="primary" @click="submitForm('ruleForm')" size="small">创建</el-button> <el-button type="primary" @click="submitForm('ruleForm')" size="small">创建</el-button>
<el-button type="primary" @click="resetForm('ruleForm')" size="small">取消</el-button> <el-button type="primary" @click="goBack" size="small">取消</el-button>
</div> </div>
<!-- :hasScroll="false" :noBtnOk="true" :noCancel="true" :noClose="false" -->
<glsx-dialog title="" width="547px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleConfirm">
<div class="content-body">
当前有内容信息未保存,是否继续取消
</div>
</glsx-dialog>
</div> </div>
</template> </template>
<script> <script>
import glsxDialog from '@/components/glsx-dialog'
import { createService, detailService, updateService } from '@/api/modules/service' import { createService, detailService, updateService } from '@/api/modules/service'
export default { export default {
components: {
glsxDialog
},
data() { data() {
var checkZero = (rule, value, callback) => {
setTimeout(() => {
if (value == 0) {
callback(new Error('请输入有效数字值'))
} else {
callback()
}
})
}
var checkStock = (rule, value, callback) => { var checkStock = (rule, value, callback) => {
if (value <= 0) { if (value <= 0) {
return callback(new Error('库存不能为空或负数')) return callback(new Error('库存不能为空或负数'))
...@@ -139,6 +163,7 @@ export default { ...@@ -139,6 +163,7 @@ export default {
}, 1000) }, 1000)
} }
return { return {
isDialogVisible:false,
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() < Date.now()- 8.64e7// 如果没有后面的-8.64e7就是不可以选择今天的 return time.getTime() < Date.now()- 8.64e7// 如果没有后面的-8.64e7就是不可以选择今天的
...@@ -153,17 +178,18 @@ export default { ...@@ -153,17 +178,18 @@ export default {
// type: [], // type: [],
// resource: '', // resource: '',
effectiveType: 3, //有效期(默认无有效期) effectiveType: 3, //有效期(默认无有效期)
effectiveDays: '',
customUseLimit: 0, //使用限制(默认不限制使用次数) customUseLimit: 0, //使用限制(默认不限制使用次数)
limitTime1: 1,
limitDays: '30',
limitTime2: 5,
vipPrice: '', vipPrice: '',
shopPrice: '', shopPrice: '',
stock: '', stock: '',
useDescription: '', useDescription: '',
daterange: [] daterange: []
}, },
effectiveDays: '', copyRuleForm:{},
limitTime1: 1,
limitDays: '30',
limitTime2: 5,
rules: { rules: {
couponName: [{ required: true, message: '请输入服务名称', trigger: 'blur' }], couponName: [{ required: true, message: '请输入服务名称', trigger: 'blur' }],
// region: [{ required: true, message: '请选择活动区域', trigger: 'change' }], // region: [{ required: true, message: '请选择活动区域', trigger: 'change' }],
...@@ -172,8 +198,14 @@ export default { ...@@ -172,8 +198,14 @@ export default {
// type: [{ type: 'array', required: true, message: '请至少选择一个活动性质', trigger: 'change' }], // type: [{ type: 'array', required: true, message: '请至少选择一个活动性质', trigger: 'change' }],
effectiveType: [{ required: true, message: '请选择有效期', trigger: 'change' }], effectiveType: [{ required: true, message: '请选择有效期', trigger: 'change' }],
customUseLimit: [{ required: true, message: '请选择使用限制', trigger: 'change' }], customUseLimit: [{ required: true, message: '请选择使用限制', trigger: 'change' }],
vipPrice: [{ required: true, message: '请输入会员价', trigger: 'blur' }], vipPrice: [
shopPrice: [{ required: true, message: '请输入门店价', trigger: 'blur' }], { required: true, message: '请输入会员价', trigger: 'blur' },
{ validator: checkZero, trigger: 'blur' }
],
shopPrice: [
{ required: true, message: '请输入门店价', trigger: 'blur' },
{ validator: checkZero, trigger: 'blur' }
],
stock: [ stock: [
{ required: true, message: '请输入库存', trigger: 'blur' }, { required: true, message: '请输入库存', trigger: 'blur' },
{ validator: checkStock, trigger: 'blur' } { validator: checkStock, trigger: 'blur' }
...@@ -197,15 +229,15 @@ export default { ...@@ -197,15 +229,15 @@ export default {
if (this.ruleForm.customUseLimit == 0) { if (this.ruleForm.customUseLimit == 0) {
return `不限制使用次数` return `不限制使用次数`
} else if (this.ruleForm.customUseLimit == 1) { } else if (this.ruleForm.customUseLimit == 1) {
return `有效期内可使用${this.limitTime1}次` return `有效期内可使用${this.ruleForm.limitTime1}次`
} else if (this.ruleForm.customUseLimit == 2) { } else if (this.ruleForm.customUseLimit == 2) {
return `有效期内每${this.limitDays}天内可使用${this.limitTime2}次` return `有效期内每${this.ruleForm.limitDays}天内可使用${this.ruleForm.limitTime2}次`
} }
return '不限制使用次数' return '不限制使用次数'
}, },
effectiveRangeText() { effectiveRangeText() {
if (this.ruleForm.effectiveType == 1) { if (this.ruleForm.effectiveType == 1) {
return `领取后${this.effectiveDays}天内有效` return `领取后${this.ruleForm.effectiveDays}天内有效`
} else if (this.ruleForm.effectiveType == 2) { } else if (this.ruleForm.effectiveType == 2) {
return `${this.ruleForm.daterange[0]}-${this.ruleForm.daterange[1]}` return `${this.ruleForm.daterange[0]}-${this.ruleForm.daterange[1]}`
} }
...@@ -214,6 +246,7 @@ export default { ...@@ -214,6 +246,7 @@ export default {
// 有效期内可使用3次 // 有效期内可使用3次
}, },
created() { created() {
this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm))//深拷贝一份数据
if (window.__POWERED_BY_QIANKUN__) { if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中 //运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId this.merchantId = this.$globalState.session.merchantId
...@@ -239,21 +272,22 @@ export default { ...@@ -239,21 +272,22 @@ export default {
this.ruleForm.customUseLimit = res.useType this.ruleForm.customUseLimit = res.useType
if (res.effectiveType == 1) { if (res.effectiveType == 1) {
this.effectiveDays = res.effectiveDays this.ruleForm.effectiveDays = res.effectiveDays
} }
if (res.effectiveType == 2) { if (res.effectiveType == 2) {
this.ruleForm.daterange = [res.effectiveStartTime, res.effectiveEndTime] this.ruleForm.daterange = [res.effectiveStartTime, res.effectiveEndTime]
} }
// this.limitTime1 = '' // this.ruleForm.limitTime1 = ''
// this.limitTime2 = '' // this.ruleForm.limitTime2 = ''
// this.limitDays = '' // this.limitDays = ''
if (res.useType == 1) { if (res.useType == 1) {
this.limitTime1 = res.useAmount this.ruleForm.limitTime1 = res.useAmount
} }
if (res.useType == 2) { if (res.useType == 2) {
this.limitTime2 = res.useAmount this.ruleForm.limitTime2 = res.useAmount
this.limitDays = res.useLimitDays this.ruleForm.limitDays = res.useLimitDays
} }
this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm))//深拷贝一份数据
}) })
}, },
submitForm(formName) { submitForm(formName) {
...@@ -282,11 +316,11 @@ export default { ...@@ -282,11 +316,11 @@ export default {
//使用限制 //使用限制
params.useType = this.ruleForm.customUseLimit params.useType = this.ruleForm.customUseLimit
//有效期 effectiveType: 3 1 2 //有效期 effectiveType: 3 1 2
if (this.ruleForm.effectiveType == 1 && !parseInt(this.effectiveDays)) { if (this.ruleForm.effectiveType == 1 && !parseInt(this.ruleForm.effectiveDays)) {
this.$message.error('请输入有效期') this.$message.error('请输入有效期')
return false return false
} }
params.effectiveDays = this.effectiveDays params.effectiveDays = this.ruleForm.effectiveDays
if (this.ruleForm.effectiveType == 2) { if (this.ruleForm.effectiveType == 2) {
if (!this.ruleForm.daterange) { if (!this.ruleForm.daterange) {
this.$message.error('请输入有效期') this.$message.error('请输入有效期')
...@@ -298,20 +332,20 @@ export default { ...@@ -298,20 +332,20 @@ export default {
} }
//使用限制 //使用限制
if (this.ruleForm.customUseLimit == 1) { if (this.ruleForm.customUseLimit == 1) {
if (!parseInt(this.limitTime1)) { if (!parseInt(this.ruleForm.limitTime1)) {
this.$message.error('请输入有效期使用次数') this.$message.error('请输入有效期使用次数')
return false return false
} else { } else {
params.useAmount = this.limitTime1 params.useAmount = this.ruleForm.limitTime1
} }
} }
if (this.ruleForm.customUseLimit == 2) { if (this.ruleForm.customUseLimit == 2) {
if (!parseInt(this.limitTime2) || !parseInt(this.limitDays)) { if (!parseInt(this.ruleForm.limitTime2) || !parseInt(this.ruleForm.limitDays)) {
this.$message.error('请输入有效期使用次数') this.$message.error('请输入有效期使用次数')
return false return false
} else { } else {
params.useLimitDays = this.limitDays params.useLimitDays = this.ruleForm.limitDays
params.useAmount = this.limitTime2 params.useAmount = this.ruleForm.limitTime2
} }
} }
...@@ -357,12 +391,24 @@ export default { ...@@ -357,12 +391,24 @@ export default {
} }
}) })
}, },
resetForm(formName) { // resetForm(formName) {
this.$router.push('/memberCenter/service')
// this.$refs[formName].resetFields() // this.$router.push('/memberCenter/service')
}, // this.$refs[formName].resetFields()
// },
goBack() { goBack() {
if(JSON.stringify(this.ruleForm)==JSON.stringify(this.copyRuleForm)){
this.$router.push('/memberCenter/service') this.$router.push('/memberCenter/service')
}else{
// this.$message.error('是否保存信息')
this.isDialogVisible=true
}
},
handleClose(){
this.isDialogVisible=false
},
handleConfirm(){
this.$router.push('/memberCenter/service')
}, },
oninput(value) { oninput(value) {
let str = value let str = value
...@@ -396,22 +442,22 @@ export default { ...@@ -396,22 +442,22 @@ export default {
return str return str
}, },
sub1() { sub1() {
if (this.limitTime1 <= 0) { if (this.ruleForm.limitTime1 <= 0) {
return return
} }
this.limitTime1-- this.ruleForm.limitTime1--
}, },
add1() { add1() {
this.limitTime1++ this.ruleForm.limitTime1++
}, },
sub2() { sub2() {
if (this.limitTime2 <= 0) { if (this.ruleForm.limitTime2 <= 0) {
return return
} }
this.limitTime2-- this.ruleForm.limitTime2--
}, },
add2() { add2() {
this.limitTime2++ this.ruleForm.limitTime2++
} }
} }
} }
...@@ -420,7 +466,7 @@ export default { ...@@ -420,7 +466,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.live-room { .live-room {
.topMsg { .topMsg {
margin: 20px 0px 0; margin: 20px 40px 0;
padding: 0 20px; padding: 0 20px;
background-color: #fff; background-color: #fff;
height: 56px; height: 56px;
...@@ -440,7 +486,8 @@ export default { ...@@ -440,7 +486,8 @@ export default {
} }
} }
.container { .container {
margin: 0 0px 100px; margin: 0 40px 100px;
position: relative; position: relative;
/deep/ .el-form-item__content { /deep/ .el-form-item__content {
.radioGroupWrap { .radioGroupWrap {
...@@ -552,5 +599,19 @@ export default { ...@@ -552,5 +599,19 @@ export default {
z-index: 999; z-index: 999;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1); box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
} }
/deep/ .el-dialog__body{
border-bottom: 1px solid #e6e6e6;
padding: 20px 25px;
.content-body{
font-size: 18px;
text-align: center;
font-weight: 400;
color: #333333;
}
}
/deep/ .el-dialog__footer {
text-align: center;
}
} }
</style> </style>
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
</span> </span>
</GLTable> </GLTable>
</div> </div>
<glsx-dialog title="示例效果" width="1142px" :noBtnOk="true" :noCancel="true" :noClose="false" btnCancelLabel="关闭" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose"> <!-- btnCancelLabel="关闭" -->
<glsx-dialog title="示例效果" width="1142px" :hasScroll="false" :noBtnOk="true" :noCancel="true" :noClose="false" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose">
<div class="content-body"> <div class="content-body">
<div class="content-item col1"> <div class="content-item col1">
<div class="subTitle"> <div class="subTitle">
...@@ -54,6 +55,7 @@ ...@@ -54,6 +55,7 @@
import glsxDialog from '@/components/glsx-dialog' import glsxDialog from '@/components/glsx-dialog'
import { getSetMealListApi, deleteSetMeal, upDownPackage } from '@/api/modules/setmeal' import { getSetMealListApi, deleteSetMeal, upDownPackage } from '@/api/modules/setmeal'
import { getLoginCount } from '@/api/modules/service' import { getLoginCount } from '@/api/modules/service'
import { stateList } from '@/common/constant' import { stateList } from '@/common/constant'
import tipPanel from '@/components/tipPanel/index.vue' import tipPanel from '@/components/tipPanel/index.vue'
export default { export default {
...@@ -119,7 +121,7 @@ export default { ...@@ -119,7 +121,7 @@ export default {
} }
}, },
created () { created () {
this.getLoginCountFun() this.getLoginCountFun()
}, },
methods: { methods: {
getLoginCountFun() { getLoginCountFun() {
...@@ -220,18 +222,22 @@ export default { ...@@ -220,18 +222,22 @@ export default {
margin-bottom: 20px; margin-bottom: 20px;
} }
/deep/ .el-dialog__header .el-dialog__title { /deep/ .el-dialog__header {
.main-title{
font-size: 16px; font-size: 16px;
font-weight: 700; font-weight: 700;
color: #000000; color: #000000;
}
} }
/deep/ .el-dialog__body { /deep/ .el-dialog__body {
border-top: 1px solid #e6e6e6; border-top: 1px solid #e6e6e6;
border-bottom: 1px solid #e6e6e6; border-bottom: 1px solid #e6e6e6;
padding: 20px 25px; padding: 20px 25px;
.content-body { .content-body {
display: flex; display: flex;
.col2 { .col2 {
margin-left: 40px; margin-left: 40px;
} }
...@@ -243,10 +249,21 @@ export default { ...@@ -243,10 +249,21 @@ export default {
font-weight: 700; font-weight: 700;
color: #000000; color: #000000;
} }
.imageWrap,.twoImageWrap{
margin-left: 25px;
img{
border: 1.5px solid rgba(0, 0, 0, 0.03);
box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.03);
}
img+img{
margin-left: 22px;
}
}
} }
} }
} }
/deep/ .el-dialog__footer { /deep/ .el-dialog__footer {
text-align: center; text-align: center;
padding: 20px;
} }
</style> </style>
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<div class="live-room container"> <div class="live-room container">
<el-form ref="ruleForm" :rules="rules" :model="ruleForm" label-width="120px" class="demo-ruleForm"> <el-form ref="ruleForm" :rules="rules" :model="ruleForm" label-width="120px" class="demo-ruleForm">
<el-form-item size="small" label="套餐名称" prop="packageName" style="width: 420px"> <el-form-item size="small" label="套餐名称" prop="packageName" style="width: 420px">
<el-input size="small" v-model="ruleForm.packageName" placeholder="请输入套餐名称"></el-input> <el-input size="small" v-model="ruleForm.packageName" placeholder="请输入套餐名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="套餐内容" class="is-required"> <el-form-item size="small" label="套餐内容" class="is-required">
<el-button @click="openDialog" size="small" icon="el-icon-plus">选择服务</el-button> <el-button @click="openDialog" size="small" icon="el-icon-plus">选择服务</el-button>
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
<template slot="append">元</template> <template slot="append">元</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="说明" prop="notes" style="width: 670px"> <el-form-item size="small" label="说明" prop="notes" style="width: 670px">
<el-input size="small" :rows="6" type="textarea" v-model="ruleForm.notes" placeholder="请输入" maxlength="200" show-word-limit></el-input> <el-input size="small" :rows="6" type="textarea" v-model="ruleForm.notes" placeholder="请输入" maxlength="200" show-word-limit></el-input>
</el-form-item> </el-form-item>
...@@ -45,9 +46,9 @@ ...@@ -45,9 +46,9 @@
}" }"
> >
<el-button type="primary" @click="submitForm('ruleForm')" size="small">创建</el-button> <el-button type="primary" @click="submitForm('ruleForm')" size="small">创建</el-button>
<el-button type="primary" @click="resetForm('ruleForm')" size="small">取消</el-button> <el-button type="primary" @click="goBack" size="small">取消</el-button>
</div> </div>
<glsx-dialog title="套餐服务" width="1142px" btnCancelLabel="关闭" btnSize="small" :isVisible="setmealDialogVisible" @closeDialog="handleClose" @confirmDialog="handleConfirm"> <glsx-dialog title="套餐服务" width="1142px" :noCancel="true" :noClose="false" btnSize="small" :isVisible="setmealDialogVisible" @closeDialog="handleClose" @confirmDialog="handleConfirm">
<div class="content-body"> <div class="content-body">
<div class="subTitle"> <div class="subTitle">
<span>请选择套餐服务:</span> <span>请选择套餐服务:</span>
...@@ -96,6 +97,11 @@ ...@@ -96,6 +97,11 @@
</div> </div>
</div> </div>
</glsx-dialog> </glsx-dialog>
<glsx-dialog title="" width="547px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isTipDialogVisible" :showClose="false" @closeDialog="handleTipClose" @confirmDialog="handleTipConfirm">
<div class="content-body">
当前有内容信息未保存,是否继续取消
</div>
</glsx-dialog>
</div> </div>
</template> </template>
...@@ -125,6 +131,8 @@ export default { ...@@ -125,6 +131,8 @@ export default {
setmealContentRules: false, setmealContentRules: false,
//弹窗 //弹窗
setmealDialogVisible: false, setmealDialogVisible: false,
//弹窗2(提示弹窗)
isTipDialogVisible:false,
selectNum: 0, selectNum: 0,
totalPrice: 0, totalPrice: 0,
id: this.$route.query.id || 0 id: this.$route.query.id || 0
...@@ -316,10 +324,10 @@ export default { ...@@ -316,10 +324,10 @@ export default {
console.log('配置接口', res.data) console.log('配置接口', res.data)
}) })
}, },
resetForm(formName) { // resetForm(formName) {
// this.$refs[formName].resetFields()
this.$router.go(-1) // this.$router.go(-1)
}, // },
goBack() { goBack() {
this.$router.go(-1) this.$router.go(-1)
}, },
...@@ -382,6 +390,12 @@ export default { ...@@ -382,6 +390,12 @@ export default {
// return preValue + choseItem.vipPrice * choseItem.serviceQuantity // return preValue + choseItem.vipPrice * choseItem.serviceQuantity
// }, 0) // }, 0)
this.getSetmealServiceFun() this.getSetmealServiceFun()
},
handleTipClose(){
this.isTipDialogVisible=false
},
handleTipConfirm(){
this.$router.go(-1);
} }
} }
} }
...@@ -390,7 +404,7 @@ export default { ...@@ -390,7 +404,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.live-room { .live-room {
.topMsg { .topMsg {
margin: 20px 0px 0; margin: 20px 40px 0;
padding: 0 20px; padding: 0 20px;
background-color: #fff; background-color: #fff;
height: 56px; height: 56px;
...@@ -410,7 +424,7 @@ export default { ...@@ -410,7 +424,7 @@ export default {
} }
} }
.container { .container {
margin: 0 0px 20px; margin: 0 40px 20px;
position: relative; position: relative;
min-height: calc(100vh - 300px); min-height: calc(100vh - 300px);
.allChoseWrap { .allChoseWrap {
...@@ -455,6 +469,8 @@ export default { ...@@ -455,6 +469,8 @@ export default {
} }
} }
.totalWrap { .totalWrap {
margin-top: 5px;
margin-bottom: -5px;
span { span {
font-size: 14px; font-size: 14px;
...@@ -479,12 +495,14 @@ export default { ...@@ -479,12 +495,14 @@ export default {
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1); box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
} }
/deep/.el-dialog__headerbtn { /deep/.el-dialog__headerbtn {
background-color: #d9e0f5; background-color: #d9e0f5;
width: 25px; width: 25px;
height: 25px; height: 25px;
border-radius: 50%; border-radius: 50%;
.el-dialog__close { .el-dialog__close {
color: #5850ff; color: #5850ff;
font-weight: bold;
} }
} }
/deep/ .el-dialog__header .el-dialog__title { /deep/ .el-dialog__header .el-dialog__title {
...@@ -496,10 +514,11 @@ export default { ...@@ -496,10 +514,11 @@ export default {
/deep/ .el-dialog__body { /deep/ .el-dialog__body {
border-top: 1px solid #e6e6e6; border-top: 1px solid #e6e6e6;
border-bottom: 1px solid #e6e6e6; border-bottom: 1px solid #e6e6e6;
padding: 20px 25px; padding: 0px 25px;
.content-body { .content-body {
max-height: 400px; max-height: 446px;
.subTitle { .subTitle {
margin-top: 20px;
margin-bottom: 20px; margin-bottom: 20px;
span:first-child { span:first-child {
font-size: 16px; font-size: 16px;
...@@ -585,6 +604,8 @@ export default { ...@@ -585,6 +604,8 @@ export default {
} }
} }
.amountTo { .amountTo {
margin-top: 17px;
margin-bottom: 28px;
text-align: center; text-align: center;
.bottomText { .bottomText {
font-size: 16px; font-size: 16px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!