Merge branch 'master' of http://122.51.230.86:3000/dianliang/lanan-system-vue
# Conflicts: # src/views/login.vue
This commit is contained in:
commit
f88095f2f0
53
src/api/base/coupon/index.js
Normal file
53
src/api/base/coupon/index.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 卡券核销
|
||||
export function couponVerification(data) {
|
||||
return request({
|
||||
url: '/base/customer-coupon/couponVerification',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新用户卡券
|
||||
export function updateCustomerCoupon(data) {
|
||||
return request({
|
||||
url: '/base/customer-coupon/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除用户卡券
|
||||
export function deleteCustomerCoupon(id) {
|
||||
return request({
|
||||
url: '/base/customer-coupon/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得用户卡券
|
||||
export function getCustomerCoupon(id) {
|
||||
return request({
|
||||
url: '/base/customer-coupon/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得用户卡券分页
|
||||
export function getCustomerCouponPage(params) {
|
||||
return request({
|
||||
url: '/base/customer-coupon/page',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 导出用户卡券 Excel
|
||||
export function exportCustomerCouponExcel(params) {
|
||||
return request({
|
||||
url: '/base/customer-coupon/export-excel',
|
||||
method: 'get',
|
||||
params,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
@ -18,6 +18,15 @@ export function attendActive(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 获得营销活动分页
|
||||
export function joinActive(params) {
|
||||
return request({
|
||||
url: '/base/customer-active/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 更新营销活动
|
||||
export function updateActiveMain(data) {
|
||||
return request({
|
||||
|
@ -1,53 +1,63 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建维修模块 订单
|
||||
export function createOrderInfo(data) {
|
||||
return request({
|
||||
url: '/repair/order-info/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新维修模块 订单
|
||||
export function updateOrderInfo(data) {
|
||||
return request({
|
||||
url: '/repair/order-info/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除维修模块 订单
|
||||
export function deleteOrderInfo(id) {
|
||||
return request({
|
||||
url: '/repair/order-info/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得维修模块 订单
|
||||
export function getOrderInfo(id) {
|
||||
return request({
|
||||
url: '/repair/order-info/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得维修模块 订单分页
|
||||
export function getOrderInfoPage(params) {
|
||||
return request({
|
||||
url: '/repair/order-info/page',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 导出维修模块 订单 Excel
|
||||
export function exportOrderInfoExcel(params) {
|
||||
return request({
|
||||
url: '/repair/order-info/export-excel',
|
||||
method: 'get',
|
||||
params,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建维修模块 订单
|
||||
export function createOrderInfo(data) {
|
||||
return request({
|
||||
url: '/repair/order-info/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新维修模块 订单
|
||||
export function updateOrderInfo(data) {
|
||||
return request({
|
||||
url: '/repair/order-info/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除维修模块 订单
|
||||
export function deleteOrderInfo(id) {
|
||||
return request({
|
||||
url: '/repair/order-info/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得维修模块 订单
|
||||
export function getOrderInfo(id) {
|
||||
return request({
|
||||
url: '/repair/order-info/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得维修模块 订单分页
|
||||
export function getOrderInfoPage(params) {
|
||||
return request({
|
||||
url: '/repair/order-info/page',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 导出维修模块 订单 Excel
|
||||
export function exportOrderInfoExcel(params) {
|
||||
return request({
|
||||
url: '/repair/order-info/export-excel',
|
||||
method: 'get',
|
||||
params,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function toPay(params) {
|
||||
return request({
|
||||
url: '/admin-api/pay/toPay',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
@ -5,7 +5,6 @@
|
||||
:options="options"
|
||||
v-model="selectedValues"
|
||||
filterable
|
||||
:props="{checkStrictly:true}"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
@ -59,7 +59,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="车标图片" align="center" prop="logoImg" >
|
||||
<template v-slot="scope">
|
||||
<el-image style="width: 4rem; height: 4rem" :preview-src-list="[scope.row.logoImg]" :src="scope.row.logoImg" />
|
||||
<el-image style="width: 4rem; height: 4rem" :preview-src-list="[viewFileUrl+scope.row.logoImg]" :src="viewFileUrl+scope.row.logoImg" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="品牌名称" align="center" prop="brandName">
|
||||
@ -127,6 +127,7 @@ export default {
|
||||
refreshTable: true,
|
||||
// 选中行
|
||||
currentRow: {},
|
||||
viewFileUrl: process.env.VUE_APP_FILE_API,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
@ -164,8 +165,8 @@ export default {
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
routeToData() {
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
|
@ -3,7 +3,7 @@
|
||||
<!-- 会员信息 -->
|
||||
<el-row>
|
||||
<el-col :span="18">
|
||||
<el-card style="height: 165px; overflow: hidden;" >
|
||||
<el-card style="height: 170px; overflow: hidden;" >
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-weight: bold; font-size: 16px;">{{ formData.levelName }}</span>
|
||||
</div>
|
||||
@ -77,9 +77,10 @@
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-card style="height: 165px; overflow: hidden;" >
|
||||
<el-card style="height: 170px; overflow: hidden;" >
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-weight: bold; font-size: 16px;">余额/积分</span>
|
||||
<el-button style="float: right; padding: 3px 0" @click="rechAmount" type="text">充值</el-button>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<span class="balance-label">余额:</span>
|
||||
@ -105,14 +106,19 @@
|
||||
size="mini"
|
||||
height="200"
|
||||
style="width: 100%">
|
||||
<el-table-column show-overflow-tooltip prop="couponName" label="卡券名称" >
|
||||
<el-table-column prop="couponName" label="卡券名称" >
|
||||
</el-table-column>
|
||||
<el-table-column label="卡券类型" width="80" align="left" prop="couponType">
|
||||
<el-table-column label="卡券类型" width="80" align="center" prop="couponType">
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.MEMBER_COUPON_TYPE" :value="scope.row.couponType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="适用车型" width="130" align="center" prop="carModel">
|
||||
<el-table-column label="剩余金额/次数" width="120" align="right" prop="balance">
|
||||
<template v-slot="scope">
|
||||
{{scope.row.balance}}{{scope.row.outRule == 'mehx'?'元':'次'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="适用车型" width="80" align="center" prop="carModel">
|
||||
<template v-slot="scope">
|
||||
<span v-if="scope.row.carModel == null">不限</span>
|
||||
<dict-tag :type="DICT_TYPE.MEMBER_CAR" :value="scope.row.carModel"/>
|
||||
@ -133,14 +139,11 @@
|
||||
<span>{{ parseTime(scope.row.endTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领取时间" align="center" prop="createTime" width="150">
|
||||
|
||||
<el-table-column fixed="right" label="操作" width="130" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="操作" width="110" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-goods" @click="openChildForm(scope.row.id)">核销</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-goods" @click="couponVerification(scope.row)">核销</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -179,18 +182,28 @@
|
||||
<span>{{ parseTime(scope.row.endTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否可重复参与" align="center" prop="endTime" width="150">
|
||||
<template v-slot="scope">
|
||||
<span v-if="scope.row.isParticipate == '1'">可重复参与</span>
|
||||
<span v-else>不可重复参与</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="参与情况" align="center" prop="endTime" width="150">
|
||||
<template v-slot="scope">
|
||||
<span v-if="scope.row.isJoin == '1'">已参与</span>
|
||||
<span v-else>未参与</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100" label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-present" @click="openActive(scope.row)">参与活动</el-button>
|
||||
<el-button :disabled="scope.row.isParticipate != '1' && scope.row.isJoin == '1'" size="mini" type="text" icon="el-icon-present" @click="openActive(scope.row)">参与活动</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getActiveList"/>
|
||||
|
||||
</el-card>
|
||||
<ReceiveCouponForm @success="getById(param.id)" ref="receiveCouponForm"/>
|
||||
<RuchForm @success="getById(param.id)" ref="RuchFormRef"/>
|
||||
<ReceiveCouponForm @success="successCallback()" ref="receiveCouponForm"/>
|
||||
<RuchForm @success="successCallback()" ref="RuchFormRef"/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
@ -198,6 +211,7 @@
|
||||
<script>
|
||||
import * as CustomerMainApi from '@/api/base/customer';
|
||||
import * as ActiveMainApi from '@/api/member/active';
|
||||
import * as CustomerCouponApi from '@/api/base/coupon';
|
||||
import ReceiveCouponForm from '@/views/base/customer/ReceiveCouponForm.vue'
|
||||
import RuchForm from '@/views/base/customer/RuchForm.vue'
|
||||
export default {
|
||||
@ -217,15 +231,15 @@ export default {
|
||||
total: 0,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
isNow:'1'
|
||||
isNow:'1',
|
||||
cusId:'',
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
const row = this.$route.query.row
|
||||
this.param = row
|
||||
this.queryParams.cusId = row.id
|
||||
this.getById(row.id)
|
||||
this.getActiveList()
|
||||
|
||||
@ -240,13 +254,17 @@ export default {
|
||||
async getActiveList() {
|
||||
try {
|
||||
this.loading = true;
|
||||
const res = await ActiveMainApi.getActiveMainPage(this.queryParams);
|
||||
this.list = res.data.records;
|
||||
this.total = res.data.total;
|
||||
const res = await ActiveMainApi.joinActive(this.queryParams);
|
||||
this.list = res.data;
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
|
||||
successCallback(){
|
||||
this.getById(this.param.id)
|
||||
this.getActiveList()
|
||||
},
|
||||
/**参与活动*/
|
||||
async openActive(row){
|
||||
if (row.isCoupon == '1' && row.isRechRule == '0'){
|
||||
@ -255,7 +273,46 @@ export default {
|
||||
if (row.isRechRule == '1'){
|
||||
this.$refs["RuchFormRef"].open(row.id,this.param);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**充值暂时写死id后端接口未调整*/
|
||||
rechAmount(activeId){
|
||||
this.$refs["RuchFormRef"].open('cc2d04a5d8d2f1e273219f5c93b8ad17',this.param);
|
||||
|
||||
},
|
||||
|
||||
|
||||
/**删除用户*/
|
||||
async handleDelete(row) {
|
||||
const id = row.id;
|
||||
await this.$modal.confirm('是否确认删除客户卡券"'+row.couponName+"\"" )
|
||||
try {
|
||||
await CustomerCouponApi.deleteCustomerCoupon(id);
|
||||
this.getById(this.param.id)
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
} catch {
|
||||
}
|
||||
},
|
||||
|
||||
/**卡券核销*/
|
||||
async couponVerification(row) {
|
||||
console.log(row)
|
||||
const id = row.id;
|
||||
if (row.outRule == 'ycxhx'){
|
||||
await this.$modal.confirm("本卡券为核销规则为一次性核销,核销后卡券将不再有效" )
|
||||
} else if(row.outRule == 'jche'){
|
||||
await this.$modal.confirm("本卡券为核销规则为计次核销,本次核销一次" )
|
||||
} else {
|
||||
await this.$modal.confirm("本卡券为核销规则为金额核销,本次核销"+row.unitPrice+'元' )
|
||||
}
|
||||
try {
|
||||
await CustomerCouponApi.couponVerification(row);
|
||||
this.getById(this.param.id)
|
||||
this.$modal.msgSuccess("核销成功");
|
||||
} catch {
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -2,10 +2,16 @@
|
||||
<div class="app-container">
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="60%" v-dialogDrag append-to-body>
|
||||
<span style="color: red">请输入充值金额:</span><el-input-number v-model="topUpAmount" :precision="2" ></el-input-number>
|
||||
<span style="color: red">请输入充值金额:</span>
|
||||
<el-input-number v-model="topUpAmount" :precision="2"></el-input-number>
|
||||
<span style="color: red">请选择充值类型:</span>
|
||||
<el-select v-model="accountType" class="item__input" >
|
||||
<el-option v-for="item in getDictDatas(DICT_TYPE.REPAIR_PAY_TYPE)" :key="item.value" :label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-collapse v-model="activeNames">
|
||||
<!-- 供应商基本信息 -->
|
||||
<el-collapse-item name="1">
|
||||
<el-collapse-item name="1">
|
||||
<template slot="title">
|
||||
<div style="font-weight: bold">活动内容</div>
|
||||
</template>
|
||||
@ -28,21 +34,21 @@
|
||||
<template slot="label">
|
||||
开始时间
|
||||
</template>
|
||||
{{parseTime(formData.beginTime)}}
|
||||
{{ parseTime(formData.beginTime) }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
结束时间
|
||||
</template>
|
||||
{{parseTime(formData.endTime)}}
|
||||
{{ parseTime(formData.endTime) }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
活动内容
|
||||
</template>
|
||||
{{formData.remark}}
|
||||
{{ formData.remark }}
|
||||
</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
@ -83,7 +89,8 @@ export default {
|
||||
formLoading: false,
|
||||
//折叠面板默认展开
|
||||
activeNames: ['1', '2'],
|
||||
topUpAmount:0.00,
|
||||
topUpAmount: 0.00,
|
||||
accountType: '01',
|
||||
// 表单参数
|
||||
formData: {
|
||||
id: undefined,
|
||||
@ -93,20 +100,20 @@ export default {
|
||||
endTime: undefined,
|
||||
remark: undefined,
|
||||
ruleList: [{
|
||||
name:'',
|
||||
name: '',
|
||||
rechAmount: '',
|
||||
giveAmount: '',
|
||||
}],
|
||||
},
|
||||
//客户数据
|
||||
cusRow:{},
|
||||
cusRow: {},
|
||||
// 表单校验
|
||||
formRules: {},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
/** 打开弹窗 */
|
||||
async open(id,cusRow) {
|
||||
async open(id, cusRow) {
|
||||
this.dialogVisible = true;
|
||||
this.cusRow = cusRow
|
||||
this.reset();
|
||||
@ -129,9 +136,10 @@ export default {
|
||||
this.formLoading = true;
|
||||
try {
|
||||
const data = {
|
||||
cusId:this.cusRow.id,
|
||||
activeId:this.formData.id,
|
||||
topUpAmount:this.topUpAmount
|
||||
cusId: this.cusRow.id,
|
||||
activeId: this.formData.id,
|
||||
topUpAmount: this.topUpAmount,
|
||||
accountType: this.accountType
|
||||
}
|
||||
await ActiveMainApi.attendActive(data);
|
||||
this.$modal.msgSuccess("参与成功");
|
||||
@ -143,9 +151,6 @@ export default {
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** 表单重置 */
|
||||
reset() {
|
||||
this.formData = {
|
||||
@ -155,8 +160,10 @@ export default {
|
||||
beginTime: undefined,
|
||||
endTime: undefined,
|
||||
remark: undefined,
|
||||
topUpAmount: 0.00,
|
||||
accountType: '01',
|
||||
ruleList: [{
|
||||
name:'',
|
||||
name: '',
|
||||
rechAmount: '',
|
||||
giveAmount: '',
|
||||
}],
|
||||
|
@ -11,7 +11,6 @@
|
||||
<CorpCustomer :typeCode="activeName" ref="corpRef" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -232,7 +232,7 @@ export default {
|
||||
fileSize: fileInfo.size
|
||||
};
|
||||
save(data).then(res => {
|
||||
if (res.code === 200) {
|
||||
if (res.code === 0) {
|
||||
this.folder = false;
|
||||
this.form = {};
|
||||
} else {
|
||||
|
@ -43,7 +43,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="适用车型" width="130" align="center" prop="carModel">
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.MEMBER_CAR" :value="scope.row.carModel"/>
|
||||
<dict-tag v-if="scope.row.carModel != null" :type="DICT_TYPE.MEMBER_CAR" :value="scope.row.carModel"/>
|
||||
<span v-else>不限</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="核销规则" width="100" align="center" prop="outRule">
|
||||
|
@ -471,7 +471,7 @@
|
||||
|
||||
settleAccounts(id){
|
||||
settleAccounts(id).then(res=>{
|
||||
if (res.code == 200){
|
||||
if (res.code == 0){
|
||||
this.$message.success("清算成功")
|
||||
this.getList()
|
||||
}
|
||||
|
@ -566,7 +566,7 @@
|
||||
})
|
||||
|
||||
editSkuPrice(reqData).then(res=>{
|
||||
if(res.code == 200){
|
||||
if(res.code == 0){
|
||||
this.$message.success("成功");
|
||||
this.editPriceFlag = false
|
||||
}
|
||||
|
@ -543,7 +543,7 @@
|
||||
|
||||
settleAccounts(id){
|
||||
settleAccounts(id).then(res=>{
|
||||
if (res.code == 200){
|
||||
if (res.code == 0){
|
||||
this.$message.success("清算成功")
|
||||
this.getList()
|
||||
}
|
||||
|
@ -8,14 +8,23 @@
|
||||
<el-form-item label="服务名称" prop="goodsTitle">
|
||||
<el-input v-model="queryParams.goodsTitle" placeholder="请输入服务名称" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户姓名" prop="cusName">
|
||||
<el-input v-model="queryParams.cusName" placeholder="请输入服务名称" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付方式" prop="payType">
|
||||
<el-select v-model="queryParams.payType" placeholder="请选择支付方式" clearable size="small">
|
||||
<el-option label="请选择字典生成" value=""/>
|
||||
<el-select v-model="queryParams.payType" placeholder="请选择支付方式">
|
||||
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.REPAIR_PAY_TYPE)"
|
||||
:key="dict.value" :label="dict.label" :value="dict.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-select v-model="queryParams.orderStatus" placeholder="请选择订单状态" clearable size="small">
|
||||
<el-option label="请选择字典生成" value=""/>
|
||||
<el-select v-model="queryParams.orderStatus" placeholder="请选择订单状态">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -26,19 +35,18 @@
|
||||
|
||||
<!-- 操作工具栏 -->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['repair:order-info:export']">导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"/>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="订单号" align="center" prop="orderNo"/>
|
||||
<el-table-column label="服务名称" align="center" prop="goodsTitle"/>
|
||||
<el-table-column label="消费类型" align="center" prop="goodsType"/>
|
||||
<el-table-column label="消费类型" align="center" prop="goodsType">
|
||||
<template v-slot="scope">
|
||||
<span v-if="scope.row.goodsType == '1'">会员充值</span>
|
||||
<span v-if="scope.row.goodsType == '2'">维修服务</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户姓名" align="center" prop="cusName"/>
|
||||
<el-table-column label="客户手机号" align="center" prop="cusPhone"/>
|
||||
<el-table-column label="商品原价(元)" align="center" prop="goodsPrice"/>
|
||||
@ -48,51 +56,41 @@
|
||||
<span>{{ parseTime(scope.row.orderTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="会员优惠金额" align="center" prop="reduceMoney"/>
|
||||
<el-table-column label="使用会员储值卡的金额" align="center" prop="balance"/>
|
||||
<el-table-column label="支付时间" align="center" prop="payTime" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.payTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="支付方式" align="center" prop="payType"/>
|
||||
<el-table-column label="支付信息备注" align="center" prop="payRemark"/>
|
||||
<el-table-column label="线上或者线下" align="center" prop="isOnline"/>
|
||||
<el-table-column label="收款账号" align="center" prop="receivablesAccount"/>
|
||||
<el-table-column label="订单状态" align="center" prop="orderStatus"/>
|
||||
<el-table-column label="评价详情" align="center" prop="commentDesc"/>
|
||||
<el-table-column label="星级" align="center" prop="commentStar"/>
|
||||
<el-table-column label="评论时间" align="center" prop="commentTime" width="180">
|
||||
<el-table-column label="支付方式" align="center" prop="payType">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.commentTime) }}</span>
|
||||
<dict-tag :type="DICT_TYPE.REPAIR_PAY_TYPE" :value="scope.row.payType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="核销码" align="center" prop="accessCode"/>
|
||||
<el-table-column label="核销时间" align="center" prop="validationTime" width="180">
|
||||
<el-table-column label="订单状态" align="center" prop="orderStatus">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.validationTime) }}</span>
|
||||
<el-tag type="warning" v-if="scope.row.orderStatus === '0'">待支付</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.orderStatus === '1'">已支付</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="核销人" align="center" prop="validationRealName"/>
|
||||
<el-table-column label="是否使用优惠券" align="center" prop="isCoupon"/>
|
||||
<el-table-column label="优惠券代码" align="center" prop="couponCode"/>
|
||||
<el-table-column label="优惠金额" align="center" prop="couponDiscount"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<el-table-column label="操作" width="150" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['repair:order-info:update']">修改
|
||||
<el-button v-if="scope.row.orderStatus === '0'" size="mini" type="text" icon="el-icon-edit" @click="toPay(scope.row)"
|
||||
v-hasPermi="['repair:order-info:update']">支付
|
||||
</el-button>
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"-->
|
||||
<!-- v-hasPermi="['repair:order-info:update']">修改-->
|
||||
<!-- </el-button>-->
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['repair:order-info:delete']">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 展示形式:二维码 URL -->
|
||||
<el-dialog title="微信扫一扫" :visible.sync="qrCode.visible" width="700px" append-to-body
|
||||
:close-on-press-escape="false">
|
||||
<qrcode-vue :value="qrCode.url" size="500" level="L" />
|
||||
</el-dialog>
|
||||
<!-- 分页组件 -->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"/>
|
||||
@ -104,14 +102,27 @@
|
||||
<script>
|
||||
import * as OrderInfoApi from '@/api/repair/orderinfo';
|
||||
import OrderInfoForm from './OrderInfoForm.vue';
|
||||
|
||||
import QrcodeVue from 'qrcode.vue'
|
||||
export default {
|
||||
name: "OrderInfo",
|
||||
components: {
|
||||
OrderInfoForm,
|
||||
QrcodeVue
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
qrCode: { // 展示形式:二维码
|
||||
url: '',
|
||||
title: '',
|
||||
visible: false,
|
||||
},
|
||||
options:[{
|
||||
value:'0',
|
||||
label:'待支付'
|
||||
},{
|
||||
value:'1',
|
||||
label:'已支付'
|
||||
}],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
@ -135,35 +146,9 @@ export default {
|
||||
orderNo: null,
|
||||
goodsTitle: null,
|
||||
goodsType: null,
|
||||
userId: null,
|
||||
cusId: null,
|
||||
cusName: null,
|
||||
cusPhone: null,
|
||||
goodsPrice: null,
|
||||
payMoney: null,
|
||||
orderTime: [],
|
||||
reduceMoney: null,
|
||||
balance: null,
|
||||
payTime: [],
|
||||
payType: null,
|
||||
payRemark: null,
|
||||
isOnline: null,
|
||||
receivablesAccount: null,
|
||||
orderStatus: null,
|
||||
commentDesc: null,
|
||||
commentStar: null,
|
||||
commentTime: [],
|
||||
accessCode: null,
|
||||
validationTime: [],
|
||||
validationRealName: null,
|
||||
validationUserId: null,
|
||||
isCoupon: null,
|
||||
couponId: null,
|
||||
couponCode: null,
|
||||
couponDiscount: null,
|
||||
deptId: null,
|
||||
createTime: [],
|
||||
goodsId: null,
|
||||
orderStatus:null
|
||||
},
|
||||
};
|
||||
},
|
||||
@ -176,7 +161,7 @@ export default {
|
||||
try {
|
||||
this.loading = true;
|
||||
const res = await OrderInfoApi.getOrderInfoPage(this.queryParams);
|
||||
this.list = res.data.list;
|
||||
this.list = res.data.records;
|
||||
this.total = res.data.total;
|
||||
} finally {
|
||||
this.loading = false;
|
||||
@ -192,6 +177,29 @@ export default {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
async toPay(row){
|
||||
if (row.payType == '01'){
|
||||
const orderId = row.id
|
||||
let data = {
|
||||
orderId:orderId
|
||||
}
|
||||
const res = await OrderInfoApi.toPay(data);
|
||||
console.log(res,208)
|
||||
this.qrCode = {
|
||||
url: res.data.code_url,
|
||||
visible: true
|
||||
}
|
||||
} else{
|
||||
await this.$modal.confirm('本订单为线下支付订单或挂账订单,点击确定前请确认客户是否已支付')
|
||||
let data = {
|
||||
orderNo:row.orderNo,
|
||||
}
|
||||
await OrderInfoApi.updateOrderInfo(data);
|
||||
this.$modal.msgSuccess("支付成功");
|
||||
this.getList()
|
||||
}
|
||||
|
||||
},
|
||||
/** 添加/修改操作 */
|
||||
openForm(id) {
|
||||
this.$refs["formRef"].open(id);
|
||||
@ -199,7 +207,7 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
async handleDelete(row) {
|
||||
const id = row.id;
|
||||
await this.$modal.confirm('是否确认删除维修模块 订单编号为"' + id + '"的数据项?')
|
||||
await this.$modal.confirm('是否确认删除维修模块 订单编号为"' + row.orderNo + '"的数据项?')
|
||||
try {
|
||||
await OrderInfoApi.deleteOrderInfo(id);
|
||||
await this.getList();
|
||||
|
@ -6,12 +6,6 @@
|
||||
<el-input v-model="queryParams.name" placeholder="请输入名称" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="分类" prop="type">
|
||||
<el-select v-model="queryParams.type" placeholder="请选择分类" clearable size="small">
|
||||
<el-option label="请选择字典生成" value=""/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
|
Loading…
Reference in New Issue
Block a user