hupeng
5 years ago
41 changed files with 1339 additions and 149 deletions
@ -0,0 +1,34 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
export function get() { |
||||
return request({ |
||||
url: 'api/yxSystemStore', |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
export function getL(data) { |
||||
return request({ |
||||
url: 'api/yxSystemStore/getL', |
||||
method: 'post', |
||||
data |
||||
}) |
||||
} |
||||
|
||||
export function del(ids) { |
||||
return request({ |
||||
url: 'api/yxSystemStore/', |
||||
method: 'delete', |
||||
data: ids |
||||
}) |
||||
} |
||||
|
||||
export function update(data) { |
||||
return request({ |
||||
url: 'api/yxSystemStore', |
||||
method: 'put', |
||||
data |
||||
}) |
||||
} |
||||
|
||||
export default { get, getL, update, del } |
@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
export function add(data) { |
||||
return request({ |
||||
url: 'api/yxUserRecharge', |
||||
method: 'post', |
||||
data |
||||
}) |
||||
} |
||||
|
||||
export function del(ids) { |
||||
return request({ |
||||
url: 'api/yxUserRecharge/', |
||||
method: 'delete', |
||||
data: ids |
||||
}) |
||||
} |
||||
|
||||
export function edit(data) { |
||||
return request({ |
||||
url: 'api/yxUserRecharge', |
||||
method: 'put', |
||||
data |
||||
}) |
||||
} |
||||
|
||||
export default { add, edit, del } |
After Width: | Height: | Size: 379 KiB |
@ -0,0 +1,158 @@
|
||||
<template> |
||||
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" :title="isAdd ? '新增' : '订单核销'" width="500px"> |
||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px"> |
||||
<el-form-item label="核销码"> |
||||
<el-input v-model="form.verifyCode" style="width: 370px;" placeholder="请输入核销码" /> |
||||
<p style="color: red">注意:请务必核对核销码的与客户正确性</p> |
||||
<p style="color: red">注意:手机端也可以核销,去会员管理里把编辑相应会员开启商户管理即可</p> |
||||
</el-form-item> |
||||
</el-form> |
||||
<div slot="footer" class="dialog-footer"> |
||||
<el-button type="text" @click="cancel">取消</el-button> |
||||
<el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button> |
||||
</div> |
||||
</el-dialog> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import { add, editT, get } from '@/api/yxStoreOrder' |
||||
export default { |
||||
props: { |
||||
isAdd: { |
||||
type: Boolean, |
||||
required: true |
||||
} |
||||
}, |
||||
data() { |
||||
return { |
||||
loading: false, dialog: false, express: [], |
||||
form: { |
||||
id: '', |
||||
deliveryName: '', |
||||
deliveryType: 'express', |
||||
deliveryId: '' |
||||
}, |
||||
rules: { |
||||
unique: [ |
||||
{ required: true, message: 'please enter', trigger: 'blur' } |
||||
] |
||||
} |
||||
} |
||||
}, |
||||
|
||||
created() { |
||||
this.get() |
||||
}, |
||||
methods: { |
||||
cancel() { |
||||
this.resetForm() |
||||
}, |
||||
doSubmit() { |
||||
this.loading = true |
||||
if (this.isAdd) { |
||||
this.doAdd() |
||||
} else this.doEdit() |
||||
}, |
||||
doAdd() { |
||||
add(this.form).then(res => { |
||||
this.resetForm() |
||||
this.$notify({ |
||||
title: '添加成功', |
||||
type: 'success', |
||||
duration: 2500 |
||||
}) |
||||
this.loading = false |
||||
this.$parent.init() |
||||
}).catch(err => { |
||||
this.loading = false |
||||
console.log(err.response.data.message) |
||||
}) |
||||
}, |
||||
doEdit() { |
||||
editT(this.form).then(res => { |
||||
this.resetForm() |
||||
this.$notify({ |
||||
title: '操作成功', |
||||
type: 'success', |
||||
duration: 2500 |
||||
}) |
||||
this.loading = false |
||||
this.$parent.init() |
||||
}).catch(err => { |
||||
this.loading = false |
||||
console.log(err.response.data.message) |
||||
}) |
||||
}, |
||||
resetForm() { |
||||
this.dialog = false |
||||
this.$refs['form'].resetFields() |
||||
this.form = { |
||||
id: '', |
||||
orderId: '', |
||||
uid: '', |
||||
realName: '', |
||||
userPhone: '', |
||||
userAddress: '', |
||||
cartId: '', |
||||
freightPrice: '', |
||||
totalNum: '', |
||||
totalPrice: '', |
||||
totalPostage: '', |
||||
payPrice: '', |
||||
payPostage: '', |
||||
deductionPrice: '', |
||||
couponId: '', |
||||
couponPrice: '', |
||||
paid: '', |
||||
payTime: '', |
||||
payType: '', |
||||
addTime: '', |
||||
status: '', |
||||
refundStatus: '', |
||||
refundReasonWapImg: '', |
||||
refundReasonWapExplain: '', |
||||
refundReasonTime: '', |
||||
refundReasonWap: '', |
||||
refundReason: '', |
||||
refundPrice: '', |
||||
deliveryName: '', |
||||
deliveryType: '', |
||||
deliveryId: '', |
||||
gainIntegral: '', |
||||
useIntegral: '', |
||||
backIntegral: '', |
||||
mark: '', |
||||
isDel: '', |
||||
unique: '', |
||||
remark: '', |
||||
merId: '', |
||||
isMerCheck: '', |
||||
combinationId: '', |
||||
pinkId: '', |
||||
cost: '', |
||||
seckillId: '', |
||||
bargainId: '', |
||||
verifyCode: '', |
||||
storeId: '', |
||||
shippingType: '', |
||||
isChannel: '', |
||||
isRemind: '', |
||||
isSystemDel: '' |
||||
} |
||||
}, |
||||
get() { |
||||
get().then(res => { |
||||
this.express = res.content |
||||
}).catch(err => { |
||||
this.loading = false |
||||
console.log(err.response.data.message) |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped> |
||||
|
||||
</style> |
@ -0,0 +1,526 @@
|
||||
<template> |
||||
<div class="app-container"> |
||||
<!--工具栏--> |
||||
<div class="head-container"> |
||||
|
||||
<!-- 搜索 --> |
||||
<el-input v-model="query.value" clearable placeholder="输入搜索内容" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery" /> |
||||
<el-select v-model="query.type" clearable placeholder="类型" class="filter-item" style="width: 130px"> |
||||
<el-option v-for="item in queryTypeOptions" :key="item.key" :label="item.display_name" :value="item.key" /> |
||||
</el-select> |
||||
<el-select v-model="status" clearable placeholder="订单状态" class="filter-item" style="width: 130px"> |
||||
<el-option |
||||
v-for="item in statusOptions" |
||||
:key="item.value" |
||||
:label="item.label" |
||||
:value="item.value" |
||||
/> |
||||
</el-select> |
||||
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button> |
||||
<!-- 新增 --> |
||||
</div> |
||||
<!--表单组件--> |
||||
<eForm ref="form" :is-add="isAdd" /> |
||||
<eDetail ref="form1" :is-add="isAdd" /> |
||||
<eRefund ref="form2" :is-add="isAdd" /> |
||||
<editOrder ref="form3" :is-add="isAdd" /> |
||||
<eRemark ref="form4" :is-add="isAdd" /> |
||||
<!--表格渲染--> |
||||
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;"> |
||||
<el-table-column prop="orderId" width="140" label="订单号"> |
||||
<template slot-scope="scope"> |
||||
<span>{{ scope.row.orderId }}</span> |
||||
<p>{{ scope.row.pinkName }}</p> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="realName" label="用户姓名" /> |
||||
<el-table-column prop="cartInfoList" width="300" label="商品信息"> |
||||
<template slot-scope="scope"> |
||||
<div v-for="(item,index) in scope.row.cartInfoList" v-if="item.cartInfoMap.productInfo.attrInfo"> |
||||
<span> |
||||
<img |
||||
style="width: 30px;height: 30px;margin:0;cursor: pointer;" |
||||
:src="item.cartInfoMap.productInfo.attrInfo.image" |
||||
> |
||||
</span> |
||||
<span>{{ item.cartInfoMap.productInfo.storeName }} {{ item.cartInfoMap.productInfo.attrInfo.suk }}</span> |
||||
<span> | ¥{{ item.cartInfoMap.truePrice }}×{{ item.cartInfoMap.cartNum }}</span> |
||||
</div> |
||||
<div v-else v-for="(item,index) in scope.row.cartInfoList"> |
||||
<span><img |
||||
style="width: 30px;height: 30px;margin:0;cursor: pointer;" |
||||
:src="item.cartInfoMap.productInfo.image" |
||||
></span> |
||||
<span>{{ item.cartInfoMap.productInfo.storeName }}</span> |
||||
<span> | ¥{{ item.cartInfoMap.truePrice }}×{{ item.cartInfoMap.cartNum }}</span> |
||||
</div> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="payPrice" label="实际支付" /> |
||||
<el-table-column prop="payTypeName" label="支付状态" /> |
||||
<el-table-column prop="statusName" label="订单状态"> |
||||
<template slot-scope="scope"> |
||||
<span v-html="scope.row.statusName">{{ scope.row.addTime }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="addTime" width="160" label="创建时间"> |
||||
<template slot-scope="scope"> |
||||
<span>{{ formatTime(scope.row.addTime) }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column v-if="checkPermission(['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT','YXSTOREORDER_DELETE'])" label="操作" width="200" align="center" fixed="right"> |
||||
<template slot-scope="scope"> |
||||
<el-button |
||||
v-permission="['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT']" |
||||
size="mini" |
||||
type="primary" |
||||
@click="detail(scope.row)" |
||||
> |
||||
订单详情</el-button> |
||||
<el-dropdown size="mini" split-button type="primary" trigger="click"> |
||||
操作 |
||||
<el-dropdown-menu slot="dropdown"> |
||||
<el-dropdown-item> |
||||
<el-button |
||||
v-permission="['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT']" |
||||
size="mini" |
||||
type="success" |
||||
@click="remark(scope.row)" |
||||
> |
||||
订单备注</el-button> |
||||
</el-dropdown-item> |
||||
<el-dropdown-item> |
||||
<el-button |
||||
v-if="scope.row._status == 2" |
||||
v-permission="['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT']" |
||||
size="mini" |
||||
type="primary" |
||||
@click="edit(scope.row)" |
||||
> |
||||
订单核销</el-button> |
||||
</el-dropdown-item> |
||||
<el-dropdown-item> |
||||
<el-button |
||||
v-if="scope.row._status == 3" |
||||
v-permission="['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT']" |
||||
size="mini" |
||||
type="primary" |
||||
@click="refund(scope.row)" |
||||
> |
||||
立刻退款</el-button> |
||||
</el-dropdown-item> |
||||
<el-dropdown-item v-if="scope.row._status == 1"> |
||||
<el-button |
||||
v-permission="['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT']" |
||||
size="mini" |
||||
type="primary" |
||||
@click="editOrder(scope.row)" |
||||
> |
||||
修改订单</el-button> |
||||
</el-dropdown-item> |
||||
<el-dropdown-item v-if="scope.row._status == 1"> |
||||
<el-popover |
||||
:ref="scope.row.id" |
||||
v-permission="['admin','YXSTOREORDER_ALL','YXSTOREORDER_DELETE']" |
||||
placement="top" |
||||
width="180" |
||||
> |
||||
<p>确定删除本条数据吗?</p> |
||||
<div style="text-align: right; margin: 0"> |
||||
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button> |
||||
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.row.id)">确定</el-button> |
||||
</div> |
||||
<el-button slot="reference" type="danger" icon="el-icon-delete" size="mini">删除</el-button> |
||||
</el-popover> |
||||
</el-dropdown-item> |
||||
</el-dropdown-menu> |
||||
</el-dropdown> |
||||
|
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<!--分页组件--> |
||||
<el-pagination |
||||
:total="total" |
||||
:current-page="page + 1" |
||||
style="margin-top: 8px;" |
||||
layout="total, prev, pager, next, sizes" |
||||
@size-change="sizeChange" |
||||
@current-change="pageChange" |
||||
/> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import checkPermission from '@/utils/permission' |
||||
import initData from '@/mixins/crud' |
||||
import { del } from '@/api/yxStoreOrder' |
||||
import eForm from './formC' |
||||
import eDetail from './detail' |
||||
import eRefund from './refund' |
||||
import editOrder from './edit' |
||||
import eRemark from './remark' |
||||
import { formatTime } from '@/utils/index' |
||||
export default { |
||||
components: { eForm, eDetail, eRefund, editOrder, eRemark }, |
||||
mixins: [initData], |
||||
data() { |
||||
return { |
||||
delLoading: false, status, orderType: '0', |
||||
queryTypeOptions: [ |
||||
{ key: 'orderId', display_name: '订单号' }, |
||||
{ key: 'realName', display_name: '用户姓名' }, |
||||
{ key: 'userPhone', display_name: '用户电话' } |
||||
], |
||||
statusOptions: [ |
||||
{ value: '0', label: '未支付' }, |
||||
{ value: '1', label: '未发货' }, |
||||
{ value: '2', label: '待收货' }, |
||||
{ value: '3', label: '待评价' }, |
||||
{ value: '4', label: '交易完成' }, |
||||
// { value: '5', label: '待核销' }, |
||||
{ value: '-1', label: '退款中' }, |
||||
{ value: '-2', label: '已退款' }, |
||||
{ value: '-4', label: '已删除' } |
||||
] |
||||
} |
||||
}, |
||||
created() { |
||||
this.$nextTick(() => { |
||||
this.init() |
||||
}) |
||||
}, |
||||
methods: { |
||||
formatTime, |
||||
checkPermission, |
||||
beforeInit() { |
||||
this.url = 'api/yxStoreOrder' |
||||
const sort = 'id,desc' |
||||
this.params = { page: this.page, size: this.size, sort: sort, orderStatus: this.status, orderType: 5 } |
||||
const query = this.query |
||||
const type = query.type |
||||
const value = query.value |
||||
if (type && value) { this.params[type] = value } |
||||
return true |
||||
}, |
||||
subDelete(id) { |
||||
this.delLoading = true |
||||
del(id).then(res => { |
||||
this.delLoading = false |
||||
this.$refs[id].doClose() |
||||
this.dleChangePage() |
||||
this.init() |
||||
this.$notify({ |
||||
title: '删除成功', |
||||
type: 'success', |
||||
duration: 2500 |
||||
}) |
||||
}).catch(err => { |
||||
this.delLoading = false |
||||
this.$refs[id].doClose() |
||||
console.log(err.response.data.message) |
||||
}) |
||||
}, |
||||
add() { |
||||
this.isAdd = true |
||||
this.$refs.form.dialog = true |
||||
}, |
||||
edit(data) { |
||||
this.isAdd = false |
||||
const _this = this.$refs.form |
||||
_this.form = { |
||||
id: data.id, |
||||
orderId: data.orderId, |
||||
uid: data.uid, |
||||
realName: data.realName, |
||||
userPhone: data.userPhone, |
||||
userAddress: data.userAddress, |
||||
cartId: data.cartId, |
||||
freightPrice: data.freightPrice, |
||||
totalNum: data.totalNum, |
||||
totalPrice: data.totalPrice, |
||||
totalPostage: data.totalPostage, |
||||
payPrice: data.payPrice, |
||||
payPostage: data.payPostage, |
||||
deductionPrice: data.deductionPrice, |
||||
couponId: data.couponId, |
||||
couponPrice: data.couponPrice, |
||||
paid: data.paid, |
||||
payTime: data.payTime, |
||||
payType: data.payType, |
||||
addTime: data.addTime, |
||||
status: data.status, |
||||
refundStatus: data.refundStatus, |
||||
refundReasonWapImg: data.refundReasonWapImg, |
||||
refundReasonWapExplain: data.refundReasonWapExplain, |
||||
refundReasonTime: data.refundReasonTime, |
||||
refundReasonWap: data.refundReasonWap, |
||||
refundReason: data.refundReason, |
||||
refundPrice: data.refundPrice, |
||||
deliveryName: data.deliveryName, |
||||
deliveryType: data.deliveryType, |
||||
deliveryId: data.deliveryId, |
||||
gainIntegral: data.gainIntegral, |
||||
useIntegral: data.useIntegral, |
||||
backIntegral: data.backIntegral, |
||||
mark: data.mark, |
||||
isDel: data.isDel, |
||||
unique: data.unique, |
||||
remark: data.remark, |
||||
merId: data.merId, |
||||
isMerCheck: data.isMerCheck, |
||||
combinationId: data.combinationId, |
||||
pinkId: data.pinkId, |
||||
cost: data.cost, |
||||
seckillId: data.seckillId, |
||||
bargainId: data.bargainId, |
||||
verifyCode: data.verifyCode, |
||||
storeId: data.storeId, |
||||
shippingType: data.shippingType, |
||||
isChannel: data.isChannel, |
||||
isRemind: data.isRemind, |
||||
isSystemDel: data.isSystemDel |
||||
} |
||||
_this.dialog = true |
||||
}, |
||||
editOrder(data) { |
||||
this.isAdd = false |
||||
const _this = this.$refs.form3 |
||||
_this.form = { |
||||
id: data.id, |
||||
orderId: data.orderId, |
||||
uid: data.uid, |
||||
realName: data.realName, |
||||
userPhone: data.userPhone, |
||||
userAddress: data.userAddress, |
||||
cartId: data.cartId, |
||||
freightPrice: data.freightPrice, |
||||
totalNum: data.totalNum, |
||||
totalPrice: data.totalPrice, |
||||
totalPostage: data.totalPostage, |
||||
payPrice: data.payPrice, |
||||
payPostage: data.payPostage, |
||||
deductionPrice: data.deductionPrice, |
||||
couponId: data.couponId, |
||||
couponPrice: data.couponPrice, |
||||
paid: data.paid, |
||||
payTime: data.payTime, |
||||
payType: data.payType, |
||||
addTime: data.addTime, |
||||
status: data.status, |
||||
refundStatus: data.refundStatus, |
||||
refundReasonWapImg: data.refundReasonWapImg, |
||||
refundReasonWapExplain: data.refundReasonWapExplain, |
||||
refundReasonTime: data.refundReasonTime, |
||||
refundReasonWap: data.refundReasonWap, |
||||
refundReason: data.refundReason, |
||||
refundPrice: data.refundPrice, |
||||
deliveryName: data.deliveryName, |
||||
deliveryType: data.deliveryType, |
||||
deliveryId: data.deliveryId, |
||||
gainIntegral: data.gainIntegral, |
||||
useIntegral: data.useIntegral, |
||||
backIntegral: data.backIntegral, |
||||
mark: data.mark, |
||||
isDel: data.isDel, |
||||
unique: data.unique, |
||||
remark: data.remark, |
||||
merId: data.merId, |
||||
isMerCheck: data.isMerCheck, |
||||
combinationId: data.combinationId, |
||||
pinkId: data.pinkId, |
||||
cost: data.cost, |
||||
seckillId: data.seckillId, |
||||
bargainId: data.bargainId, |
||||
verifyCode: data.verifyCode, |
||||
storeId: data.storeId, |
||||
shippingType: data.shippingType, |
||||
isChannel: data.isChannel, |
||||
isRemind: data.isRemind, |
||||
isSystemDel: data.isSystemDel |
||||
} |
||||
_this.dialog = true |
||||
}, |
||||
remark(data) { |
||||
this.isAdd = false |
||||
const _this = this.$refs.form4 |
||||
_this.form = { |
||||
id: data.id, |
||||
orderId: data.orderId, |
||||
uid: data.uid, |
||||
realName: data.realName, |
||||
userPhone: data.userPhone, |
||||
userAddress: data.userAddress, |
||||
cartId: data.cartId, |
||||
freightPrice: data.freightPrice, |
||||
totalNum: data.totalNum, |
||||
totalPrice: data.totalPrice, |
||||
totalPostage: data.totalPostage, |
||||
payPrice: data.payPrice, |
||||
payPostage: data.payPostage, |
||||
deductionPrice: data.deductionPrice, |
||||
couponId: data.couponId, |
||||
couponPrice: data.couponPrice, |
||||
paid: data.paid, |
||||
payTime: data.payTime, |
||||
payType: data.payType, |
||||
addTime: data.addTime, |
||||
status: data.status, |
||||
refundStatus: data.refundStatus, |
||||
refundReasonWapImg: data.refundReasonWapImg, |
||||
refundReasonWapExplain: data.refundReasonWapExplain, |
||||
refundReasonTime: data.refundReasonTime, |
||||
refundReasonWap: data.refundReasonWap, |
||||
refundReason: data.refundReason, |
||||
refundPrice: data.refundPrice, |
||||
deliveryName: data.deliveryName, |
||||
deliveryType: data.deliveryType, |
||||
deliveryId: data.deliveryId, |
||||
gainIntegral: data.gainIntegral, |
||||
useIntegral: data.useIntegral, |
||||
backIntegral: data.backIntegral, |
||||
mark: data.mark, |
||||
isDel: data.isDel, |
||||
unique: data.unique, |
||||
remark: data.remark, |
||||
merId: data.merId, |
||||
isMerCheck: data.isMerCheck, |
||||
combinationId: data.combinationId, |
||||
pinkId: data.pinkId, |
||||
cost: data.cost, |
||||
seckillId: data.seckillId, |
||||
bargainId: data.bargainId, |
||||
verifyCode: data.verifyCode, |
||||
storeId: data.storeId, |
||||
shippingType: data.shippingType, |
||||
isChannel: data.isChannel, |
||||
isRemind: data.isRemind, |
||||
isSystemDel: data.isSystemDel |
||||
} |
||||
_this.dialog = true |
||||
}, |
||||
refund(data) { |
||||
this.isAdd = false |
||||
const _this = this.$refs.form2 |
||||
_this.form = { |
||||
id: data.id, |
||||
orderId: data.orderId, |
||||
uid: data.uid, |
||||
realName: data.realName, |
||||
userPhone: data.userPhone, |
||||
userAddress: data.userAddress, |
||||
cartId: data.cartId, |
||||
freightPrice: data.freightPrice, |
||||
totalNum: data.totalNum, |
||||
totalPrice: data.totalPrice, |
||||
totalPostage: data.totalPostage, |
||||
payPrice: data.payPrice, |
||||
payPostage: data.payPostage, |
||||
deductionPrice: data.deductionPrice, |
||||
couponId: data.couponId, |
||||
couponPrice: data.couponPrice, |
||||
paid: data.paid, |
||||
payTime: data.payTime, |
||||
payType: data.payType, |
||||
addTime: data.addTime, |
||||
status: data.status, |
||||
refundStatus: data.refundStatus, |
||||
refundReasonWapImg: data.refundReasonWapImg, |
||||
refundReasonWapExplain: data.refundReasonWapExplain, |
||||
refundReasonTime: data.refundReasonTime, |
||||
refundReasonWap: data.refundReasonWap, |
||||
refundReason: data.refundReason, |
||||
refundPrice: data.refundPrice, |
||||
deliveryName: data.deliveryName, |
||||
deliveryType: data.deliveryType, |
||||
deliveryId: data.deliveryId, |
||||
gainIntegral: data.gainIntegral, |
||||
useIntegral: data.useIntegral, |
||||
backIntegral: data.backIntegral, |
||||
mark: data.mark, |
||||
isDel: data.isDel, |
||||
unique: data.unique, |
||||
remark: data.remark, |
||||
merId: data.merId, |
||||
isMerCheck: data.isMerCheck, |
||||
combinationId: data.combinationId, |
||||
pinkId: data.pinkId, |
||||
cost: data.cost, |
||||
seckillId: data.seckillId, |
||||
bargainId: data.bargainId, |
||||
verifyCode: data.verifyCode, |
||||
storeId: data.storeId, |
||||
shippingType: data.shippingType, |
||||
isChannel: data.isChannel, |
||||
isRemind: data.isRemind, |
||||
isSystemDel: data.isSystemDel |
||||
} |
||||
_this.dialog = true |
||||
}, |
||||
detail(data) { |
||||
this.isAdd = false |
||||
const _this = this.$refs.form1 |
||||
_this.form = { |
||||
id: data.id, |
||||
orderId: data.orderId, |
||||
payTypeName: data.payTypeName, |
||||
statusName: data.statusName, |
||||
uid: data.uid, |
||||
realName: data.realName, |
||||
userPhone: data.userPhone, |
||||
userAddress: data.userAddress, |
||||
cartId: data.cartId, |
||||
freightPrice: data.freightPrice, |
||||
totalNum: data.totalNum, |
||||
totalPrice: data.totalPrice, |
||||
totalPostage: data.totalPostage, |
||||
payPrice: data.payPrice, |
||||
payPostage: data.payPostage, |
||||
deductionPrice: data.deductionPrice, |
||||
couponId: data.couponId, |
||||
couponPrice: data.couponPrice, |
||||
paid: data.paid, |
||||
payTime: data.payTime, |
||||
payType: data.payType, |
||||
addTime: data.addTime, |
||||
status: data.status, |
||||
refundStatus: data.refundStatus, |
||||
refundReasonWapImg: data.refundReasonWapImg, |
||||
refundReasonWapExplain: data.refundReasonWapExplain, |
||||
refundReasonTime: data.refundReasonTime, |
||||
refundReasonWap: data.refundReasonWap, |
||||
refundReason: data.refundReason, |
||||
refundPrice: data.refundPrice, |
||||
deliveryName: data.deliveryName, |
||||
deliveryType: data.deliveryType, |
||||
deliveryId: data.deliveryId, |
||||
gainIntegral: data.gainIntegral, |
||||
useIntegral: data.useIntegral, |
||||
backIntegral: data.backIntegral, |
||||
mark: data.mark, |
||||
isDel: data.isDel, |
||||
unique: data.unique, |
||||
remark: data.remark, |
||||
merId: data.merId, |
||||
isMerCheck: data.isMerCheck, |
||||
combinationId: data.combinationId, |
||||
pinkId: data.pinkId, |
||||
cost: data.cost, |
||||
seckillId: data.seckillId, |
||||
bargainId: data.bargainId, |
||||
verifyCode: data.verifyCode, |
||||
storeId: data.storeId, |
||||
shippingType: data.shippingType, |
||||
isChannel: data.isChannel, |
||||
isRemind: data.isRemind, |
||||
isSystemDel: data.isSystemDel |
||||
} |
||||
_this.dialog = true |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped> |
||||
|
||||
</style> |
@ -0,0 +1,99 @@
|
||||
<template> |
||||
<div class="app-container"> |
||||
<!--工具栏--> |
||||
<div class="head-container"> |
||||
<div v-if="crud.props.searchToggle"> |
||||
<!-- 搜索 --> |
||||
<el-input v-model="query.value" clearable placeholder="输入搜索内容" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" /> |
||||
<el-select v-model="query.type" clearable placeholder="类型" class="filter-item" style="width: 130px"> |
||||
<el-option v-for="item in queryTypeOptions" :key="item.key" :label="item.display_name" :value="item.key" /> |
||||
</el-select> |
||||
<rrOperation :crud="crud" /> |
||||
</div> |
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> |
||||
<crudOperation :permission="permission" /> |
||||
<!--表单组件--> |
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px"> |
||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px"> |
||||
</el-form> |
||||
<div slot="footer" class="dialog-footer"> |
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button> |
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button> |
||||
</div> |
||||
</el-dialog> |
||||
<!--表格渲染--> |
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> |
||||
<el-table-column type="selection" width="55" /> |
||||
<el-table-column v-if="columns.visible('id')" prop="id" label="id" width="75px" /> |
||||
<el-table-column v-if="columns.visible('nickname')" prop="nickname" label="昵称" width="100px" /> |
||||
<el-table-column v-if="columns.visible('orderId')" prop="orderId" label="订单号" /> |
||||
<el-table-column v-if="columns.visible('price')" prop="price" label="充值金额" width="100px" /> |
||||
<el-table-column v-if="columns.visible('rechargeType')" prop="rechargeType" label="充值类型" width="100px" /> |
||||
<el-table-column v-if="columns.visible('paid')" prop="paid" label="是否支付" width="100px"> |
||||
<template slot-scope="scope"> |
||||
<span v-if="scope.row.paid == 1">是</span> |
||||
<span v-else>否</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column v-if="columns.visible('payTime')" prop="payTime" label="支付时间" > |
||||
<template slot-scope="scope"> |
||||
<span>{{ parseTime(scope.row.payTime) }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column v-if="columns.visible('addTime')" prop="addTime" label="充值时间" > |
||||
<template slot-scope="scope"> |
||||
<span>{{ parseTime(scope.row.addTime) }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<!--分页组件--> |
||||
<pagination /> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import crudYxUserRecharge from '@/api/yxUserRecharge' |
||||
import CRUD, { presenter, header, form, crud } from '@crud/crud' |
||||
import rrOperation from '@crud/RR.operation' |
||||
import crudOperation from '@crud/CRUD.operation' |
||||
import udOperation from '@crud/UD.operation' |
||||
import pagination from '@crud/Pagination' |
||||
|
||||
// crud交由presenter持有 |
||||
const defaultCrud = CRUD({ title: '充值管理', url: 'api/yxUserRecharge', sort: 'id,desc', crudMethod: { ...crudYxUserRecharge }, optShow: { add: false, edit: false, del: true, download: true}}) |
||||
const defaultForm = { id: null, uid: null, orderId: null, price: null, rechargeType: null, paid: null, payTime: null, addTime: null, refundPrice: null, nickname: null } |
||||
export default { |
||||
name: 'YxUserRecharge', |
||||
components: { pagination, crudOperation, rrOperation, udOperation }, |
||||
mixins: [presenter(defaultCrud), header(), form(defaultForm), crud()], |
||||
data() { |
||||
return { |
||||
permission: { |
||||
add: ['admin', 'yxUserRecharge:add'], |
||||
edit: ['admin', 'yxUserRecharge:edit'], |
||||
del: ['admin', 'yxUserRecharge:del'] |
||||
}, |
||||
rules: { |
||||
}, |
||||
queryTypeOptions: [ |
||||
{ key: 'nickname', display_name: '昵称' } |
||||
] |
||||
} |
||||
}, |
||||
methods: { |
||||
// 获取数据前设置好接口地址 |
||||
[CRUD.HOOK.beforeRefresh]() { |
||||
const query = this.query |
||||
if (query.type && query.value) { |
||||
this.crud.params[query.type] = query.value |
||||
} |
||||
return true |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped> |
||||
|
||||
</style> |
@ -0,0 +1,171 @@
|
||||
<template> |
||||
<div class="app-container"> |
||||
<!--工具栏--> |
||||
<div class="head-container"> |
||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="150px"> |
||||
<el-form-item label="门店名称" prop="name"> |
||||
<el-input v-model="form.name" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="门店简介" prop="introduction"> |
||||
<el-input v-model="form.introduction" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="门店手机" prop="phone"> |
||||
<el-input v-model="form.phone" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="门店地址" prop="address"> |
||||
<el-input v-model="form.address" style="width: 370px;" /> |
||||
<el-button :loading="loading" size="medium" type="primary" @click="getL(form.address)">获取经纬度</el-button> |
||||
</el-form-item> |
||||
<el-form-item label="门店logo" prop="image"> |
||||
<MaterialList v-model="form.imageArr" style="width: 370px" type="image" :num="1" :width="150" :height="150" /> |
||||
</el-form-item> |
||||
<el-form-item label="纬度" prop="latitude"> |
||||
<el-input v-model="form.latitude" :disabled="true" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="经度" prop="longitude"> |
||||
<el-input v-model="form.longitude" :disabled="true" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="核销时效" prop="validTime"> |
||||
<el-date-picker |
||||
@change="getTimeT" |
||||
style="width: 370px;" |
||||
v-model="form.validTimeArr" |
||||
type="daterange" |
||||
range-separator="-" |
||||
start-placeholder="开始日期" |
||||
end-placeholder="结束日期"> |
||||
</el-date-picker> |
||||
</el-form-item> |
||||
<el-form-item label="营业时间" prop="dayTime"> |
||||
<el-time-picker |
||||
@change="getTime" |
||||
style="width: 370px;" |
||||
is-range |
||||
v-model="form.dayTimeArr" |
||||
range-separator="-" |
||||
start-placeholder="开始时间" |
||||
end-placeholder="结束时间" |
||||
placeholder="选择时间范围"> |
||||
</el-time-picker> |
||||
</el-form-item> |
||||
<el-form-item label=""> |
||||
<el-button :loading="loading" size="medium" type="primary" @click="doSubmit">保存配置</el-button> |
||||
</el-form-item> |
||||
</el-form> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
|
||||
|
||||
<script> |
||||
import { get, update, getL } from '@/api/yxSystemStore' |
||||
import MaterialList from '@/components/material' |
||||
import { parseTime } from '@/utils/index' |
||||
export default { |
||||
name: 'YxSystemStore', |
||||
components: { MaterialList }, |
||||
data() { |
||||
return { |
||||
loading: false, |
||||
form: { id:null, name: '', introduction: '', phone: '', address: '', detailedAddress: '', image: '' , |
||||
latitude: '', longitude: '', validTime: '', dayTime: '', validTimeStart: null, validTimeEnd: null, |
||||
dayTimeStart: null, dayTimeEnd: null, dayTimeArr: [new Date(),new Date()], validTimeArr: [], imageArr: []}, |
||||
rules: { |
||||
name: [ |
||||
{ required: true, message: '门店名称不能为空', trigger: 'blur' } |
||||
], |
||||
introduction: [ |
||||
{ required: true, message: '简介不能为空', trigger: 'blur' } |
||||
], |
||||
phone: [ |
||||
{ required: true, message: '手机号码不能为空', trigger: 'blur' } |
||||
], |
||||
address: [ |
||||
{ required: true, message: '省市区不能为空', trigger: 'blur' } |
||||
], |
||||
latitude: [ |
||||
{ required: true, message: '纬度不能为空', trigger: 'blur' } |
||||
], |
||||
longitude: [ |
||||
{ required: true, message: '经度不能为空', trigger: 'blur' } |
||||
], |
||||
validTime: [ |
||||
{ required: true, message: '核销有效日期不能为空', trigger: 'blur' } |
||||
], |
||||
dayTime: [ |
||||
{ required: true, message: '每日营业开关时间不能为空', trigger: 'blur' } |
||||
] |
||||
} |
||||
|
||||
} |
||||
}, |
||||
watch: { |
||||
'form.imageArr': function(val) { |
||||
console.log(222) |
||||
if (val) { |
||||
console.log(val) |
||||
this.form.image = val.join(',') |
||||
} |
||||
} |
||||
}, |
||||
created() { |
||||
this.init() |
||||
}, |
||||
methods: { |
||||
init() { |
||||
get().then(res => { |
||||
if(res.content.length > 0){ |
||||
const con = res.content[0] |
||||
this.form = con |
||||
this.form.imageArr = [con.image] |
||||
|
||||
this.form.dayTimeArr = [con.dayTimeStart,con.dayTimeEnd] |
||||
this.form.validTimeArr = [con.validTimeStart,con.validTimeEnd] |
||||
} |
||||
|
||||
}) |
||||
}, |
||||
doSubmit() { |
||||
this.$refs['form'].validate((valid) => { |
||||
if (valid) { |
||||
this.loading = true |
||||
this.form.image = this.form.imageArr.join(',') |
||||
update(this.form).then(res => { |
||||
this.$notify({ |
||||
title: '保存成功', |
||||
type: 'success', |
||||
duration: 2500 |
||||
}) |
||||
this.loading = false |
||||
}).catch(err => { |
||||
this.loading = false |
||||
console.log(err.response.data.message) |
||||
}) |
||||
} else { |
||||
return false |
||||
} |
||||
}) |
||||
}, |
||||
getTime(t) { |
||||
this.form.dayTimeStart = t[0] |
||||
this.form.dayTimeEnd = t[1] |
||||
this.form.dayTime = parseTime(t[0],'{h}:{i}:{s}') + ' - ' + parseTime(t[1],'{h}:{i}:{s}') |
||||
}, |
||||
getTimeT(t) { |
||||
this.form.validTimeStart = t[0] |
||||
this.form.validTimeEnd = t[1] |
||||
this.form.validTime = parseTime(t[0],'{y}-{m}-{d}') + ' - ' + parseTime(t[1],'{y}-{m}-{d}') |
||||
}, |
||||
getL(addr) { |
||||
getL({addr}).then(res => { |
||||
this.form.latitude = res.result.location.lat |
||||
this.form.longitude = res.result.location.lng |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped> |
||||
|
||||
</style> |
@ -0,0 +1,70 @@
|
||||
<template> |
||||
<div class="app-container"> |
||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="150px"> |
||||
<el-form-item label="开启门店自提"> |
||||
<el-radio v-model="form.store_self_mention" :label="1">开启</el-radio> |
||||
<el-radio v-model="form.store_self_mention" :label="2">关闭</el-radio> |
||||
</el-form-item> |
||||
<el-form-item label="腾讯地图KEY"> |
||||
<el-input v-model="form.tengxun_map_key" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label=""> |
||||
<el-button type="primary" @click="doSubmit">提交</el-button> |
||||
</el-form-item> |
||||
|
||||
</el-form> |
||||
|
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import checkPermission from '@/utils/permission' |
||||
import initData from '@/mixins/crud' |
||||
import { del, add, get } from '@/api/yxSystemConfig' |
||||
|
||||
import { Message } from 'element-ui' |
||||
|
||||
export default { |
||||
mixins: [initData], |
||||
data() { |
||||
return { |
||||
delLoading: false, |
||||
form: { |
||||
store_self_mention: 1, |
||||
tengxun_map_key: '' |
||||
}, |
||||
rules: { |
||||
} |
||||
} |
||||
}, |
||||
created() { |
||||
get().then(rese => { |
||||
const that = this |
||||
rese.content.map(function(key, value) { |
||||
const keyName = key.menuName |
||||
const newValue = key.value |
||||
if(keyName in that.form){ |
||||
that.form[keyName] = newValue |
||||
} |
||||
}) |
||||
this.form.store_self_mention = parseInt(this.form.store_self_mention) |
||||
}) |
||||
}, |
||||
methods: { |
||||
checkPermission, |
||||
doSubmit() { |
||||
add(this.form).then(res => { |
||||
Message({ message: '设置成功', type: 'success' }) |
||||
}).catch(err => { |
||||
// this.loading = false |
||||
console.log(err.response.data.message) |
||||
}) |
||||
} |
||||
|
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped> |
||||
|
||||
</style> |
Loading…
Reference in new issue