# Conflicts:
#	src/views/login.vue
This commit is contained in:
xiao-fajia 2024-09-24 20:54:01 +08:00
commit f88095f2f0
15 changed files with 316 additions and 178 deletions

View 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'
})
}

View File

@ -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) { export function updateActiveMain(data) {
return request({ return request({

View File

@ -51,3 +51,13 @@ export function exportOrderInfoExcel(params) {
responseType: 'blob' responseType: 'blob'
}) })
} }
export function toPay(params) {
return request({
url: '/admin-api/pay/toPay',
method: 'get',
params
})
}

View File

@ -5,7 +5,6 @@
:options="options" :options="options"
v-model="selectedValues" v-model="selectedValues"
filterable filterable
:props="{checkStrictly:true}"
/> />
</div> </div>

View File

@ -59,7 +59,7 @@
</el-table-column> </el-table-column>
<el-table-column label="车标图片" align="center" prop="logoImg" > <el-table-column label="车标图片" align="center" prop="logoImg" >
<template v-slot="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="品牌名称" align="center" prop="brandName"> <el-table-column label="品牌名称" align="center" prop="brandName">
@ -127,6 +127,7 @@ export default {
refreshTable: true, refreshTable: true,
// //
currentRow: {}, currentRow: {},
viewFileUrl: process.env.VUE_APP_FILE_API,
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,

View File

@ -3,7 +3,7 @@
<!-- 会员信息 --> <!-- 会员信息 -->
<el-row> <el-row>
<el-col :span="18"> <el-col :span="18">
<el-card style="height: 165px; overflow: hidden;" > <el-card style="height: 170px; overflow: hidden;" >
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span style="font-weight: bold; font-size: 16px;">{{ formData.levelName }}</span> <span style="font-weight: bold; font-size: 16px;">{{ formData.levelName }}</span>
</div> </div>
@ -77,9 +77,10 @@
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-card style="height: 165px; overflow: hidden;" > <el-card style="height: 170px; overflow: hidden;" >
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span style="font-weight: bold; font-size: 16px;">余额/积分</span> <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>
<div class="card-content"> <div class="card-content">
<span class="balance-label">余额</span> <span class="balance-label">余额</span>
@ -105,14 +106,19 @@
size="mini" size="mini"
height="200" height="200"
style="width: 100%"> style="width: 100%">
<el-table-column show-overflow-tooltip prop="couponName" label="卡券名称" > <el-table-column prop="couponName" label="卡券名称" >
</el-table-column> </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"> <template v-slot="scope">
<dict-tag :type="DICT_TYPE.MEMBER_COUPON_TYPE" :value="scope.row.couponType"/> <dict-tag :type="DICT_TYPE.MEMBER_COUPON_TYPE" :value="scope.row.couponType"/>
</template> </template>
</el-table-column> </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"> <template v-slot="scope">
<span v-if="scope.row.carModel == null">不限</span> <span v-if="scope.row.carModel == null">不限</span>
<dict-tag :type="DICT_TYPE.MEMBER_CAR" :value="scope.row.carModel"/> <dict-tag :type="DICT_TYPE.MEMBER_CAR" :value="scope.row.carModel"/>
@ -133,14 +139,11 @@
<span>{{ parseTime(scope.row.endTime) }}</span> <span>{{ parseTime(scope.row.endTime) }}</span>
</template> </template>
</el-table-column> </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"> <template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <el-button size="mini" type="text" icon="el-icon-goods" @click="couponVerification(scope.row)">核销</el-button>
</template> <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
</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>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -179,18 +182,28 @@
<span>{{ parseTime(scope.row.endTime) }}</span> <span>{{ parseTime(scope.row.endTime) }}</span>
</template> </template>
</el-table-column> </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"> <el-table-column width="100" label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope"> <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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getActiveList"/>
</el-card> </el-card>
<ReceiveCouponForm @success="getById(param.id)" ref="receiveCouponForm"/> <ReceiveCouponForm @success="successCallback()" ref="receiveCouponForm"/>
<RuchForm @success="getById(param.id)" ref="RuchFormRef"/> <RuchForm @success="successCallback()" ref="RuchFormRef"/>
</div> </div>
</template> </template>
@ -198,6 +211,7 @@
<script> <script>
import * as CustomerMainApi from '@/api/base/customer'; import * as CustomerMainApi from '@/api/base/customer';
import * as ActiveMainApi from '@/api/member/active'; import * as ActiveMainApi from '@/api/member/active';
import * as CustomerCouponApi from '@/api/base/coupon';
import ReceiveCouponForm from '@/views/base/customer/ReceiveCouponForm.vue' import ReceiveCouponForm from '@/views/base/customer/ReceiveCouponForm.vue'
import RuchForm from '@/views/base/customer/RuchForm.vue' import RuchForm from '@/views/base/customer/RuchForm.vue'
export default { export default {
@ -217,15 +231,15 @@ export default {
total: 0, total: 0,
// //
queryParams: { queryParams: {
pageNo: 1, isNow:'1',
pageSize: 10, cusId:'',
isNow:'1'
}, },
}; };
}, },
created() { created() {
const row = this.$route.query.row const row = this.$route.query.row
this.param = row this.param = row
this.queryParams.cusId = row.id
this.getById(row.id) this.getById(row.id)
this.getActiveList() this.getActiveList()
@ -240,13 +254,17 @@ export default {
async getActiveList() { async getActiveList() {
try { try {
this.loading = true; this.loading = true;
const res = await ActiveMainApi.getActiveMainPage(this.queryParams); const res = await ActiveMainApi.joinActive(this.queryParams);
this.list = res.data.records; this.list = res.data;
this.total = res.data.total;
} finally { } finally {
this.loading = false; this.loading = false;
} }
}, },
successCallback(){
this.getById(this.param.id)
this.getActiveList()
},
/**参与活动*/ /**参与活动*/
async openActive(row){ async openActive(row){
if (row.isCoupon == '1' && row.isRechRule == '0'){ if (row.isCoupon == '1' && row.isRechRule == '0'){
@ -255,7 +273,46 @@ export default {
if (row.isRechRule == '1'){ if (row.isRechRule == '1'){
this.$refs["RuchFormRef"].open(row.id,this.param); 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 {
}
},
} }
} }

View File

@ -2,7 +2,13 @@
<div class="app-container"> <div class="app-container">
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="60%" v-dialogDrag append-to-body> <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 v-model="activeNames">
<!-- 供应商基本信息 --> <!-- 供应商基本信息 -->
<el-collapse-item name="1"> <el-collapse-item name="1">
@ -28,21 +34,21 @@
<template slot="label"> <template slot="label">
开始时间 开始时间
</template> </template>
{{parseTime(formData.beginTime)}} {{ parseTime(formData.beginTime) }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
结束时间 结束时间
</template> </template>
{{parseTime(formData.endTime)}} {{ parseTime(formData.endTime) }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
活动内容 活动内容
</template> </template>
{{formData.remark}} {{ formData.remark }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
@ -83,7 +89,8 @@ export default {
formLoading: false, formLoading: false,
// //
activeNames: ['1', '2'], activeNames: ['1', '2'],
topUpAmount:0.00, topUpAmount: 0.00,
accountType: '01',
// //
formData: { formData: {
id: undefined, id: undefined,
@ -93,20 +100,20 @@ export default {
endTime: undefined, endTime: undefined,
remark: undefined, remark: undefined,
ruleList: [{ ruleList: [{
name:'', name: '',
rechAmount: '', rechAmount: '',
giveAmount: '', giveAmount: '',
}], }],
}, },
// //
cusRow:{}, cusRow: {},
// //
formRules: {}, formRules: {},
}; };
}, },
methods: { methods: {
/** 打开弹窗 */ /** 打开弹窗 */
async open(id,cusRow) { async open(id, cusRow) {
this.dialogVisible = true; this.dialogVisible = true;
this.cusRow = cusRow this.cusRow = cusRow
this.reset(); this.reset();
@ -129,9 +136,10 @@ export default {
this.formLoading = true; this.formLoading = true;
try { try {
const data = { const data = {
cusId:this.cusRow.id, cusId: this.cusRow.id,
activeId:this.formData.id, activeId: this.formData.id,
topUpAmount:this.topUpAmount topUpAmount: this.topUpAmount,
accountType: this.accountType
} }
await ActiveMainApi.attendActive(data); await ActiveMainApi.attendActive(data);
this.$modal.msgSuccess("参与成功"); this.$modal.msgSuccess("参与成功");
@ -143,9 +151,6 @@ export default {
}, },
/** 表单重置 */ /** 表单重置 */
reset() { reset() {
this.formData = { this.formData = {
@ -155,8 +160,10 @@ export default {
beginTime: undefined, beginTime: undefined,
endTime: undefined, endTime: undefined,
remark: undefined, remark: undefined,
topUpAmount: 0.00,
accountType: '01',
ruleList: [{ ruleList: [{
name:'', name: '',
rechAmount: '', rechAmount: '',
giveAmount: '', giveAmount: '',
}], }],

View File

@ -11,7 +11,6 @@
<CorpCustomer :typeCode="activeName" ref="corpRef" /> <CorpCustomer :typeCode="activeName" ref="corpRef" />
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</template> </template>

View File

@ -232,7 +232,7 @@ export default {
fileSize: fileInfo.size fileSize: fileInfo.size
}; };
save(data).then(res => { save(data).then(res => {
if (res.code === 200) { if (res.code === 0) {
this.folder = false; this.folder = false;
this.form = {}; this.form = {};
} else { } else {

View File

@ -43,7 +43,8 @@
</el-table-column> </el-table-column>
<el-table-column label="适用车型" width="130" align="center" prop="carModel"> <el-table-column label="适用车型" width="130" align="center" prop="carModel">
<template v-slot="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="核销规则" width="100" align="center" prop="outRule"> <el-table-column label="核销规则" width="100" align="center" prop="outRule">

View File

@ -471,7 +471,7 @@
settleAccounts(id){ settleAccounts(id){
settleAccounts(id).then(res=>{ settleAccounts(id).then(res=>{
if (res.code == 200){ if (res.code == 0){
this.$message.success("清算成功") this.$message.success("清算成功")
this.getList() this.getList()
} }

View File

@ -566,7 +566,7 @@
}) })
editSkuPrice(reqData).then(res=>{ editSkuPrice(reqData).then(res=>{
if(res.code == 200){ if(res.code == 0){
this.$message.success("成功"); this.$message.success("成功");
this.editPriceFlag = false this.editPriceFlag = false
} }

View File

@ -543,7 +543,7 @@
settleAccounts(id){ settleAccounts(id){
settleAccounts(id).then(res=>{ settleAccounts(id).then(res=>{
if (res.code == 200){ if (res.code == 0){
this.$message.success("清算成功") this.$message.success("清算成功")
this.getList() this.getList()
} }

View File

@ -8,14 +8,23 @@
<el-form-item label="服务名称" prop="goodsTitle"> <el-form-item label="服务名称" prop="goodsTitle">
<el-input v-model="queryParams.goodsTitle" placeholder="请输入服务名称" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.goodsTitle" placeholder="请输入服务名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </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-form-item label="支付方式" prop="payType">
<el-select v-model="queryParams.payType" placeholder="请选择支付方式" clearable size="small"> <el-select v-model="queryParams.payType" placeholder="请选择支付方式">
<el-option label="请选择字典生成" value=""/> <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-select>
</el-form-item> </el-form-item>
<el-form-item label="订单状态" prop="orderStatus"> <el-form-item label="订单状态" prop="orderStatus">
<el-select v-model="queryParams.orderStatus" placeholder="请选择订单状态" clearable size="small"> <el-select v-model="queryParams.orderStatus" placeholder="请选择订单状态">
<el-option label="请选择字典生成" value=""/> <el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -26,19 +35,18 @@
<!-- 操作工具栏 --> <!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"/>
<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>
</el-row> </el-row>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true"> <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="orderNo"/>
<el-table-column label="服务名称" align="center" prop="goodsTitle"/> <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="cusName"/>
<el-table-column label="客户手机号" align="center" prop="cusPhone"/> <el-table-column label="客户手机号" align="center" prop="cusPhone"/>
<el-table-column label="商品原价(元)" align="center" prop="goodsPrice"/> <el-table-column label="商品原价(元)" align="center" prop="goodsPrice"/>
@ -48,51 +56,41 @@
<span>{{ parseTime(scope.row.orderTime) }}</span> <span>{{ parseTime(scope.row.orderTime) }}</span>
</template> </template>
</el-table-column> </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"> <el-table-column label="支付时间" align="center" prop="payTime" width="180">
<template v-slot="scope"> <template v-slot="scope">
<span>{{ parseTime(scope.row.payTime) }}</span> <span>{{ parseTime(scope.row.payTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="支付方式" align="center" prop="payType"/> <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">
<template v-slot="scope"> <template v-slot="scope">
<span>{{ parseTime(scope.row.commentTime) }}</span> <dict-tag :type="DICT_TYPE.REPAIR_PAY_TYPE" :value="scope.row.payType" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="核销码" align="center" prop="accessCode"/> <el-table-column label="订单状态" align="center" prop="orderStatus">
<el-table-column label="核销时间" align="center" prop="validationTime" width="180">
<template v-slot="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="核销人" align="center" prop="validationRealName"/> <el-table-column label="操作" width="150" align="center" class-name="small-padding fixed-width">
<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">
<template v-slot="scope"> <template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <el-button v-if="scope.row.orderStatus === '0'" size="mini" type="text" icon="el-icon-edit" @click="toPay(scope.row)"
</template> v-hasPermi="['repair:order-info:update']">支付
</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> </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)" <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['repair:order-info:delete']">删除 v-hasPermi="['repair:order-info:delete']">删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </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 v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/> @pagination="getList"/>
@ -104,14 +102,27 @@
<script> <script>
import * as OrderInfoApi from '@/api/repair/orderinfo'; import * as OrderInfoApi from '@/api/repair/orderinfo';
import OrderInfoForm from './OrderInfoForm.vue'; import OrderInfoForm from './OrderInfoForm.vue';
import QrcodeVue from 'qrcode.vue'
export default { export default {
name: "OrderInfo", name: "OrderInfo",
components: { components: {
OrderInfoForm, OrderInfoForm,
QrcodeVue
}, },
data() { data() {
return { return {
qrCode: { //
url: '',
title: '',
visible: false,
},
options:[{
value:'0',
label:'待支付'
},{
value:'1',
label:'已支付'
}],
// //
loading: true, loading: true,
// //
@ -135,35 +146,9 @@ export default {
orderNo: null, orderNo: null,
goodsTitle: null, goodsTitle: null,
goodsType: null, goodsType: null,
userId: null,
cusId: null,
cusName: null, cusName: null,
cusPhone: null,
goodsPrice: null,
payMoney: null,
orderTime: [],
reduceMoney: null,
balance: null,
payTime: [],
payType: null, payType: null,
payRemark: null, orderStatus: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,
}, },
}; };
}, },
@ -176,7 +161,7 @@ export default {
try { try {
this.loading = true; this.loading = true;
const res = await OrderInfoApi.getOrderInfoPage(this.queryParams); const res = await OrderInfoApi.getOrderInfoPage(this.queryParams);
this.list = res.data.list; this.list = res.data.records;
this.total = res.data.total; this.total = res.data.total;
} finally { } finally {
this.loading = false; this.loading = false;
@ -192,6 +177,29 @@ export default {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); 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) { openForm(id) {
this.$refs["formRef"].open(id); this.$refs["formRef"].open(id);
@ -199,7 +207,7 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
async handleDelete(row) { async handleDelete(row) {
const id = row.id; const id = row.id;
await this.$modal.confirm('是否确认删除维修模块 订单编号为"' + id + '"的数据项?') await this.$modal.confirm('是否确认删除维修模块 订单编号为"' + row.orderNo + '"的数据项?')
try { try {
await OrderInfoApi.deleteOrderInfo(id); await OrderInfoApi.deleteOrderInfo(id);
await this.getList(); await this.getList();

View File

@ -6,12 +6,6 @@
<el-input v-model="queryParams.name" placeholder="请输入名称" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.name" placeholder="请输入名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </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-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>