|
@@ -17,7 +17,7 @@
|
|
|
|
|
|
</detail-list>
|
|
|
</a-card>
|
|
|
- <a-card class="detail-card" :bordered="false" title="优惠券">
|
|
|
+ <!-- <a-card class="detail-card" :bordered="false" title="优惠券">
|
|
|
<detail-list v-if="coupon">
|
|
|
<detail-list-item term="优惠券名称">{{ coupon.name ? coupon.name : '--' }}</detail-list-item>
|
|
|
<detail-list-item term="发放/领取时间">{{ customerCoupon.createDate ? customerCoupon.createDate : '--' }}</detail-list-item>
|
|
@@ -26,8 +26,9 @@
|
|
|
<div class="detail-card-info" v-if="!coupon">
|
|
|
此订单没有使用优惠券
|
|
|
</div>
|
|
|
- </a-card>
|
|
|
- <a-card class="detail-card" :bordered="false" title="套餐内容" v-if="isPay">
|
|
|
+ </a-card> -->
|
|
|
+ <!-- <a-card class="detail-card" :bordered="false" title="套餐内容" v-if="isPay"> -->
|
|
|
+ <a-card class="detail-card" :bordered="false" title="服务内容" >
|
|
|
<a-table :columns="columns" rowKey="id" :dataSource="customerBundleItemList" bordered :pagination="false">
|
|
|
<span slot="no" slot-scope="text, record, index">
|
|
|
<template>
|
|
@@ -37,12 +38,13 @@
|
|
|
<span slot="hexiao" slot-scope="text, record, index">
|
|
|
<template>
|
|
|
<a-button :disabled="record.remainTimes<=0" type="primary" v-hasPermission="'B_customerBundle_hexiao'" @click="hexiao(record)">延期</a-button>
|
|
|
- <span v-if="!$hasPermissions('B_customerBundle_hexiao')" style="text-align: center;font-size: 20px;">-</span>
|
|
|
+ <span v-if="!$hasPermissions('B_customerBundle_hexiao')" style="text-align: center;font-size: 20px;">--</span>
|
|
|
</template>
|
|
|
</span>
|
|
|
</a-table>
|
|
|
</a-card>
|
|
|
- <a-card class="detail-card" :bordered="false" title="使用记录" v-if="isPay">
|
|
|
+ <a-card class="detail-card" :bordered="false" title="使用记录">
|
|
|
+ <!-- <a-card class="detail-card" :bordered="false" title="使用记录" v-if="isPay"> -->
|
|
|
<a-table :columns="usedColumns" rowKey="id" :dataSource="verificationList" bordered v-if="verificationList && verificationList.length > 0" :pagination="false">
|
|
|
<span slot="no" slot-scope="text, record, index">
|
|
|
<template>
|
|
@@ -54,7 +56,7 @@
|
|
|
此订单没有使用记录
|
|
|
</div>
|
|
|
</a-card>
|
|
|
- <a-card class="detail-card" :bordered="false" title="订单取消信息" v-if="isCancel">
|
|
|
+ <!-- <a-card class="detail-card" :bordered="false" title="订单取消信息" v-if="isCancel">
|
|
|
<detail-list>
|
|
|
<detail-list-item term="取消原因">{{ palyStatusStr }}</detail-list-item>
|
|
|
<detail-list-item term="取消时间">{{ orderBundle.cancleTime }}</detail-list-item>
|
|
@@ -64,18 +66,100 @@
|
|
|
<div class="detail-card-info">
|
|
|
{{ orderBundle.expiryDate }} 点前未支付, 系统将自动取消订单
|
|
|
</div>
|
|
|
- </a-card>
|
|
|
-
|
|
|
- <a-modal title="确定核销一次" :footer="null" v-model="hexiaoModal" @cancel="canselHx" @ok="handleHexiaoOk">
|
|
|
+ </a-card> -->
|
|
|
+ <a-card class="detail-card" :bordered="false" style="text-align: center;">
|
|
|
+ <a-button type="primary" @click="canselBuy">取消购买</a-button>
|
|
|
+ </a-card>
|
|
|
+ <!-- 取消购买弹窗 -->
|
|
|
+ <a-modal title="取消购买" v-model="buyModal" @cancel="canselBuy" :bodyStyle="{textAlign:'center'}" :centered='true' :footer="null">
|
|
|
+ <p>取消购买后,服务的剩余次数变为0,用户无法再使用服务</p>
|
|
|
+ <p>确认取消购买吗?</p>
|
|
|
+ <div class="button-row">
|
|
|
+ <a-button key="back" @click="canselHx">
|
|
|
+ 取消
|
|
|
+ </a-button>
|
|
|
+ <a-button key="submit" type="primary" :loading="loading" @click="handleHexiaoOk">
|
|
|
+ 确定
|
|
|
+ </a-button>
|
|
|
+ </div>
|
|
|
+ </a-modal>
|
|
|
+ <!-- 延期弹窗 -->
|
|
|
+ <a-modal title="服务延期" :footer="null" v-model="hexiaoModal" @cancel="canselHx" @ok="handleHexiaoOk">
|
|
|
<!-- <StoreSearch ref="storeSearch" @storeChange="storeChange" placeholder="搜索并选择核销门店"></StoreSearch> -->
|
|
|
- <div class="button-row">
|
|
|
- <a-button key="back" @click="canselHx">
|
|
|
- 取消
|
|
|
- </a-button>
|
|
|
- <a-button key="submit" type="primary" :loading="loading" @click="handleHexiaoOk">
|
|
|
- 确定
|
|
|
- </a-button>
|
|
|
- </div>
|
|
|
+ <a-form :form="form" @submit="handleSubmit">
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="12">
|
|
|
+ <!-- 用户名称 -->
|
|
|
+ <a-form-item label="服务名称" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
|
|
|
+ <span>{{}}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <!-- 手机号码 -->
|
|
|
+ <a-form-item label="到期时间" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
|
|
|
+ <span>{{}}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="12">
|
|
|
+ <!-- 手机号码 -->
|
|
|
+ <a-form-item label="过期次数" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
|
|
|
+ <span>{{}}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <!-- 状态 -->
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="是否返回已过期服务" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
|
|
|
+ <a-radio-group
|
|
|
+ id="user-add-loginFlag"
|
|
|
+ name="radioGroup"
|
|
|
+ v-decorator="[
|
|
|
+ 'formData.loginFlag',
|
|
|
+ {
|
|
|
+ initialValue: formData.loginFlag,
|
|
|
+ rules: [{ required: true, message: '请选择状态!' }] },
|
|
|
+ ]"
|
|
|
+ >
|
|
|
+ <a-radio :value="1">是</a-radio>
|
|
|
+ <a-radio :value="0">否</a-radio>
|
|
|
+ </a-radio-group>
|
|
|
+
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="24">
|
|
|
+ <a-form-item label="新的到期时间" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
|
|
|
+ <a-date-picker
|
|
|
+ format="YYYY-MM-DD"
|
|
|
+ :disabled-date="disabledDate"
|
|
|
+ />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="24">
|
|
|
+ <a-form-item label="返还次数" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
|
|
|
+ <a-input placeholder="请输入" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
|
|
|
+ <div class="button-row">
|
|
|
+ <a-button key="back" @click="canselHx">
|
|
|
+ 取消
|
|
|
+ </a-button>
|
|
|
+ <a-button key="submit" type="primary" :loading="loading" @click="handleHexiaoOk">
|
|
|
+ 确定
|
|
|
+ </a-button>
|
|
|
+ </div>
|
|
|
+ <!-- <a-button id="user-add-btn-save" type="primary" @click="handleSubmit()">
|
|
|
+ 保存
|
|
|
+ </a-button>
|
|
|
+ <a-button id="user-add-btn-cancel" :style="{ marginLeft: '8px' }" @click="handleCancel()">
|
|
|
+ 取消
|
|
|
+ </a-button> -->
|
|
|
+ </a-form-item>
|
|
|
+ </a-form>
|
|
|
</a-modal>
|
|
|
</a-card>
|
|
|
</template>
|
|
@@ -88,6 +172,7 @@ import { STable } from '@/components'
|
|
|
// import StoreSearch from '@/components/QueryStore/StoreSearch'
|
|
|
import DetailList from '@/components/tools/DetailList'
|
|
|
import _ from 'lodash'
|
|
|
+import moment from 'moment';
|
|
|
const DetailListItem = DetailList.Item
|
|
|
export default {
|
|
|
name: 'OrderAdd',
|
|
@@ -152,10 +237,14 @@ export default {
|
|
|
customerCoupon: {},
|
|
|
palyStatusList: [],
|
|
|
hexiaoModal: false,
|
|
|
+ buyModal:false,
|
|
|
hxStoreId: '',
|
|
|
hxCustomerBundleItemId: '',
|
|
|
- dataSourceName: '',
|
|
|
+ dataSourceName: '',
|
|
|
customer: null,
|
|
|
+ formData:{
|
|
|
+ loginFlag:'',
|
|
|
+ },
|
|
|
orderBundle: {
|
|
|
// bundleId: 10000,
|
|
|
// bundleName: '测试套餐',
|
|
@@ -250,46 +339,97 @@ export default {
|
|
|
{
|
|
|
title: '序号',
|
|
|
// dataIndex: 'no',
|
|
|
- scopedSlots: { customRender: 'no' }
|
|
|
+ scopedSlots: { customRender: 'no' },
|
|
|
+ width: 60,
|
|
|
+ align:'center'
|
|
|
},
|
|
|
{
|
|
|
- title: '服务项目',
|
|
|
- dataIndex: 'itemName'
|
|
|
+ title: '到期时间',
|
|
|
+ dataIndex: 'itemName',
|
|
|
+ width: 100,
|
|
|
+ align:'center'
|
|
|
},
|
|
|
+ {
|
|
|
+ title: '购买数量',
|
|
|
+ dataIndex: '',
|
|
|
+ width: 100,
|
|
|
+ align:'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '剩余次数',
|
|
|
+ dataIndex: '',
|
|
|
+ width: 100,
|
|
|
+ align:'center'
|
|
|
+ },
|
|
|
{
|
|
|
- title: '剩余数量',
|
|
|
- dataIndex: 'remainTimes'
|
|
|
+ title: '已用次数',
|
|
|
+ dataIndex: '',
|
|
|
+ width: 100,
|
|
|
+ align:'center'
|
|
|
},
|
|
|
+ {
|
|
|
+ title: '过期次数',
|
|
|
+ dataIndex: '',
|
|
|
+ width: 100,
|
|
|
+ align:'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '退款次数',
|
|
|
+ dataIndex: '',
|
|
|
+ width: 100,
|
|
|
+ align:'center'
|
|
|
+ },
|
|
|
{
|
|
|
title: '核销操作',
|
|
|
- width: 200,
|
|
|
+ width: 100,
|
|
|
+ align:'center',
|
|
|
scopedSlots: { customRender: 'hexiao' }
|
|
|
}
|
|
|
],
|
|
|
usedColumns: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
- scopedSlots: { customRender: 'no' }
|
|
|
+ scopedSlots: { customRender: 'no' },
|
|
|
+ width: 60,
|
|
|
+ align:'center'
|
|
|
},
|
|
|
{
|
|
|
- title: '服务项目',
|
|
|
- dataIndex: 'bundItemName'
|
|
|
+ title: '服务名称',
|
|
|
+ dataIndex: 'bundItemName',
|
|
|
+ width: 100,
|
|
|
+ align:'center'
|
|
|
},
|
|
|
{
|
|
|
title: '使用时间',
|
|
|
- dataIndex: 'usedTime'
|
|
|
+ dataIndex: 'usedTime',
|
|
|
+ width: 100,
|
|
|
+ align:'center'
|
|
|
},
|
|
|
{
|
|
|
title: '使用门店',
|
|
|
- dataIndex: 'usedStoreName'
|
|
|
- }
|
|
|
+ dataIndex: 'usedStoreName',
|
|
|
+ width: 100,
|
|
|
+ align:'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '核销单号',
|
|
|
+ dataIndex: '',
|
|
|
+ width: 200,
|
|
|
+ align:'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '门店结算金额',
|
|
|
+ dataIndex: '',
|
|
|
+ width: 100,
|
|
|
+ align:'center'
|
|
|
+ }
|
|
|
]
|
|
|
|
|
|
}
|
|
|
},
|
|
|
- created () {
|
|
|
- this.initPage()
|
|
|
- },
|
|
|
+ // created () {
|
|
|
+ // this.initPage()
|
|
|
+ // },
|
|
|
beforeRouteEnter (to, from, next) {
|
|
|
next(vm => {
|
|
|
// vm.clear()
|
|
@@ -299,6 +439,12 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ moment,
|
|
|
+ // 不可选日期
|
|
|
+ disabledDate(current) {
|
|
|
+ // Can not select days before today and today
|
|
|
+ return current && current < moment().endOf('day');
|
|
|
+ },
|
|
|
initPage () {
|
|
|
const _this = this
|
|
|
getLookUpDataBy({
|
|
@@ -362,7 +508,11 @@ export default {
|
|
|
},
|
|
|
storeChange (data) {
|
|
|
this.hxStoreId = data ? data.id : ''
|
|
|
- }
|
|
|
+ },
|
|
|
+ // 取消购买
|
|
|
+ canselBuy(){
|
|
|
+ this.buyModal=true
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -377,7 +527,7 @@ export default {
|
|
|
}
|
|
|
.button-row{
|
|
|
padding-top: 20px;
|
|
|
- text-align: right;
|
|
|
+ text-align: center;
|
|
|
}
|
|
|
.button-row .ant-btn{
|
|
|
margin-left: 20px;
|