更新代码
This commit is contained in:
parent
dd35097c2e
commit
379d1d83bc
@ -61,3 +61,10 @@ export function toPay(params) {
|
|||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getOrderCensus(){
|
||||||
|
return request({
|
||||||
|
url: "/repair/order-info/census",
|
||||||
|
method: "get"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -6,10 +6,12 @@
|
|||||||
<el-input v-model="queryParams.orderNo" placeholder="请输入订单号" clearable @keyup.enter.native="handleQuery"/>
|
<el-input v-model="queryParams.orderNo" placeholder="请输入订单号" clearable @keyup.enter.native="handleQuery"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<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-form-item label="客户姓名" prop="cusName">
|
||||||
<el-input v-model="queryParams.cusName" placeholder="请输入服务名称" clearable @keyup.enter.native="handleQuery"/>
|
<el-input v-model="queryParams.cusName" placeholder="请输入服务名称" clearable
|
||||||
|
@keyup.enter.native="handleQuery"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="支付方式" prop="payType">
|
<el-form-item label="支付方式" prop="payType">
|
||||||
<el-select v-model="queryParams.payType" placeholder="请选择支付方式">
|
<el-select v-model="queryParams.payType" placeholder="请选择支付方式">
|
||||||
@ -37,7 +39,13 @@
|
|||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"/>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"/>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<div class="census">
|
||||||
|
<span class="credited">已入账 : {{ census?.credited || 0 }}元</span>
|
||||||
|
<span class="notCredited">待入账 : {{ census?.notCredited || 0 }}元</span>
|
||||||
|
<span class="onlinePay">线上支付 : {{ census?.onlinePay || 0 }}元</span>
|
||||||
|
<span class="cashPay">线下支付 : {{ census?.cashPay || 0 }}元</span>
|
||||||
|
<span class="signedPay">签单/挂账 : {{ census?.signedPay || 0 }}元</span>
|
||||||
|
</div>
|
||||||
<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"/>
|
||||||
@ -64,7 +72,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="支付方式" align="center" prop="payType">
|
<el-table-column label="支付方式" align="center" prop="payType">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<dict-tag :type="DICT_TYPE.REPAIR_PAY_TYPE" :value="scope.row.payType" />
|
<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="orderStatus">
|
<el-table-column label="订单状态" align="center" prop="orderStatus">
|
||||||
@ -75,12 +83,13 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="150" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" width="150" align="center" class-name="small-padding fixed-width">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button v-if="scope.row.orderStatus === '0'" size="mini" type="text" icon="el-icon-edit" @click="toPay(scope.row)"
|
<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']">支付
|
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)"-->
|
<!-- <el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"-->
|
||||||
<!-- v-hasPermi="['repair:order-info:update']">修改-->
|
<!-- v-hasPermi="['repair:order-info:update']">修改-->
|
||||||
<!-- </el-button>-->
|
<!-- </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>
|
||||||
@ -90,7 +99,7 @@
|
|||||||
<!-- 展示形式:二维码 URL -->
|
<!-- 展示形式:二维码 URL -->
|
||||||
<el-dialog title="微信扫一扫" :visible.sync="qrCode.visible" width="700px" append-to-body
|
<el-dialog title="微信扫一扫" :visible.sync="qrCode.visible" width="700px" append-to-body
|
||||||
:close-on-press-escape="false">
|
:close-on-press-escape="false">
|
||||||
<qrcode-vue :value="qrCode.url" size="500" level="L" />
|
<qrcode-vue :value="qrCode.url" size="500" level="L"/>
|
||||||
</el-dialog>
|
</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"
|
||||||
@ -104,6 +113,8 @@
|
|||||||
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'
|
import QrcodeVue from 'qrcode.vue'
|
||||||
|
import {getOrderCensus} from "@/api/repair/orderinfo";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "OrderInfo",
|
name: "OrderInfo",
|
||||||
components: {
|
components: {
|
||||||
@ -117,12 +128,12 @@ export default {
|
|||||||
title: '',
|
title: '',
|
||||||
visible: false,
|
visible: false,
|
||||||
},
|
},
|
||||||
options:[{
|
options: [{
|
||||||
value:'0',
|
value: '0',
|
||||||
label:'待支付'
|
label: '待支付'
|
||||||
},{
|
}, {
|
||||||
value:'1',
|
value: '1',
|
||||||
label:'已支付'
|
label: '已支付'
|
||||||
}],
|
}],
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
@ -149,12 +160,20 @@ export default {
|
|||||||
goodsType: null,
|
goodsType: null,
|
||||||
cusName: null,
|
cusName: null,
|
||||||
payType: null,
|
payType: null,
|
||||||
orderStatus:null
|
orderStatus: null
|
||||||
},
|
},
|
||||||
|
census: {
|
||||||
|
credited: null,
|
||||||
|
notCredited: null,
|
||||||
|
onlinePay: null,
|
||||||
|
cashPay: null,
|
||||||
|
signedPay: null
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.getCensus()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
@ -178,22 +197,22 @@ export default {
|
|||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
async toPay(row){
|
async toPay(row) {
|
||||||
if (row.payType == '01'){
|
if (row.payType == '01') {
|
||||||
const orderId = row.id
|
const orderId = row.id
|
||||||
let data = {
|
let data = {
|
||||||
orderId:orderId
|
orderId: orderId
|
||||||
}
|
}
|
||||||
const res = await OrderInfoApi.toPay(data);
|
const res = await OrderInfoApi.toPay(data);
|
||||||
console.log(res,208)
|
console.log(res, 208)
|
||||||
this.qrCode = {
|
this.qrCode = {
|
||||||
url: res.data.code_url,
|
url: res.data.code_url,
|
||||||
visible: true
|
visible: true
|
||||||
}
|
}
|
||||||
} else{
|
} else {
|
||||||
await this.$modal.confirm('本订单为线下支付订单或挂账订单,点击确定前请确认客户是否已支付')
|
await this.$modal.confirm('本订单为线下支付订单或挂账订单,点击确定前请确认客户是否已支付')
|
||||||
let data = {
|
let data = {
|
||||||
orderNo:row.orderNo,
|
orderNo: row.orderNo,
|
||||||
}
|
}
|
||||||
await OrderInfoApi.updateOrderInfo(data);
|
await OrderInfoApi.updateOrderInfo(data);
|
||||||
this.$modal.msgSuccess("支付成功");
|
this.$modal.msgSuccess("支付成功");
|
||||||
@ -228,6 +247,44 @@ export default {
|
|||||||
this.exportLoading = false;
|
this.exportLoading = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async getCensus() {
|
||||||
|
const res = await getOrderCensus()
|
||||||
|
console.log(res.data)
|
||||||
|
this.census = res.data
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.census {
|
||||||
|
display: flex;
|
||||||
|
justify-content: right;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 16px;
|
||||||
|
margin: 1rem 1rem 1rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.census > span {
|
||||||
|
padding-left: 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.credited {
|
||||||
|
color: green;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notCredited {
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.onlinePay {
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cashPay {
|
||||||
|
color: goldenrod;
|
||||||
|
}
|
||||||
|
|
||||||
|
.signedPay {
|
||||||
|
color: orange;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user