Commit 896f7da5 by 匡雅琴

订单列表和详情

1 parent 94bdc9b9
import request from './request' import request from './request'
const path = 'scrm.api.renewal.insurance.customer.name.list.' const path = 'scrm.api.renewal.insurance.customer.name.list.'
const defaultPath = 'scrm.api.renewal.order.'
const customerApi = { const customerApi = {
// 客户名单列表查询 // 客户名单列表查询
searchCustomerList(data = {}) { searchCustomerList(data = {}) {
data.method = `${path}get` data.method = `${path}get`
return request(data) return request(data)
}, },
// 客户名单同步 // 客户名单同步
synchroCustomerList(data = {}) { synchroCustomerList(data = {}) {
data.method = `${path}sync` data.method = `${path}sync`
return request(data) return request(data)
}, },
// 客户名单删除 // 客户名单删除
deleteCustomerList(data = {}) { deleteCustomerList(data = {}) {
data.method = `${path}delete` data.method = `${path}delete`
return request(data) return request(data)
}, },
// 客户名单查看-门店信息 // 客户名单查看-门店信息
infoCustomerList(data = {}) { infoCustomerList(data = {}) {
data.method = `${path}merchant.info` data.method = `${path}merchant.info`
return request(data) return request(data)
}, },
// 客户名单列表导出 // 客户名单列表导出
exportCustomerList(data = {}) { exportCustomerList(data = {}) {
data.method = `${path}export` data.method = `${path}export`
return request(data) return request(data)
}, },
// 添加客户名单 // 添加客户名单
addCustomerList(data = {}) { addCustomerList(data = {}) {
data.method = `${path}get` data.method = `${path}get`
return request(data) return request(data)
} },
// 获取订单列表
getOrderList(data = {}) {
data.method = `${defaultPath}list`
return request(data)
},
// 获取订单详情
getOrderDetail(data = {}) {
data.method = `${defaultPath}detail`
return request(data)
}
} }
export { customerApi }
\ No newline at end of file \ No newline at end of file
export { customerApi }
...@@ -2,7 +2,7 @@ import App from './index.vue' ...@@ -2,7 +2,7 @@ import App from './index.vue'
import base from '@/base' import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common' import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then(data => { base.getConfig().then(data => {
const { vue, config } = data
vue.use(GlsxVueCommon, config)
base.render(App)
})
\ No newline at end of file \ No newline at end of file
const { vue, config } = data
vue.use(GlsxVueCommon, config)
base.render(App)
})
...@@ -2,7 +2,7 @@ import App from './index.vue' ...@@ -2,7 +2,7 @@ import App from './index.vue'
import base from '@/base' import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common' import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then(data => { base.getConfig().then(data => {
const { vue, config } = data
vue.use(GlsxVueCommon, config)
base.render(App)
})
\ No newline at end of file \ No newline at end of file
const { vue, config } = data
vue.use(GlsxVueCommon, config)
base.render(App)
})
<!-- --> <!-- -->
<template> <template>
<div> <div class="order-contentbox">
<div> <div>
<el-form :inline="true" :model="searchForm"> <el-form :inline="true" :model="searchForm">
<el-form-item label="订单编号:"> <el-form-item label="订单编号:">
<el-input v-model="searchForm.orderCode" size="small" placeholder="请输入订单编码"></el-input> <el-input v-model="searchForm.orderCode" size="small" placeholder="请输入订单编码" oninput ="value=value.replace(/[\u4e00-\u9fa5/\s+/]|[^a-zA-Z0-9\u4E00-\u9FA5]/g,'')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="客户姓名:"> <el-form-item label="客户姓名:">
<el-input v-model="searchForm.customerName" size="small" placeholder="请输入客户姓名"></el-input> <el-input v-model="searchForm.customerName" size="small" placeholder="请输入客户姓名"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="手机号:"> <el-form-item label="手机号:">
<el-input v-model="searchForm.customerPhone" size="small" placeholder="请输入手机号"></el-input> <el-input v-model="searchForm.customerPhone" size="small" placeholder="请输入手机号" oninput ="value=value.replace(/[^\d]/g,'')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="车牌号:"> <el-form-item label="车牌号:">
<el-input v-model="searchForm.plateNo" size="small" placeholder="请输入车牌号"></el-input> <el-input v-model="searchForm.plateNo" size="small" placeholder="请输入车牌号" oninput ="value=value.replace(/[^a-zA-Z0-9\u4E00-\u9FA5]/g,'')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="所属商户:"> <el-form-item label="所属商户:">
<el-input v-model="searchForm.merchantName" size="small" placeholder="请输入商户名称"></el-input> <el-input v-model="searchForm.merchantName" size="small" placeholder="请输入商户名称"></el-input>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</el-form-item> </el-form-item>
<el-form-item label="订单时间:"> <el-form-item label="订单时间:">
<el-date-picker <el-date-picker
v-model="searchForm.confirmDate" v-model="orderTime"
type="daterange" type="daterange"
size="small" size="small"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
...@@ -43,11 +43,15 @@ ...@@ -43,11 +43,15 @@
</div> </div>
<div> <div>
<d2-table <d2-table
ref="certificationTable" ref="orderTable"
:searchForm="searchForm"
:getListApi="getListApi"
:tableParams="tableParams" :tableParams="tableParams"
:pageConf="pageConf" :pageConf="pageConf"
:tableData="tableData"
> >
<div slot="totalPremium" slot-scope="scope">
¥{{scope.scope.totalPremium}}
</div>
<template slot="auth-button" slot-scope="scope"> <template slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleViewDetail(scope.scope)">查看</el-button> <el-button type="text" @click="handleViewDetail(scope.scope)">查看</el-button>
</template> </template>
...@@ -57,6 +61,7 @@ ...@@ -57,6 +61,7 @@
</template> </template>
<script> <script>
import { customerApi } from '@/api/customer'
export default { export default {
data() { data() {
return { return {
...@@ -66,21 +71,28 @@ export default { ...@@ -66,21 +71,28 @@ export default {
customerPhone: '', customerPhone: '',
plateNo: '', plateNo: '',
merchantName: '', merchantName: '',
confirmDate: '', // 订单开始时间
orderDateBegin: '',
// 订单结束事件
orderDateEnd: '',
businessInstitution: '' businessInstitution: ''
}, },
orderTime: '',
// 表格参数 // 表格参数
tableParams: { tableParams: {
listName: 'data', // btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'data.list',
tableOption: true, tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: '订单编号', label: '订单编号',
prop: 'orderCode' prop: 'orderCode',
width: 200
}, },
{ {
label: '订单时间', label: '订单时间',
prop: 'confirmDate' prop: 'orderDate',
width: 250
}, },
{ {
label: '客户姓名', label: '客户姓名',
...@@ -96,7 +108,9 @@ export default { ...@@ -96,7 +108,9 @@ export default {
}, },
{ {
label: '总保费金额', label: '总保费金额',
prop: 'totalPremium' prop: 'totalPremium',
addHtml: 'totalPremium',
width: 150
}, },
{ {
label: '所属商户', label: '所属商户',
...@@ -111,66 +125,47 @@ export default { ...@@ -111,66 +125,47 @@ export default {
pageConf: { pageConf: {
pageSize: 'pageSize', pageSize: 'pageSize',
pageNum: 'pageNum', pageNum: 'pageNum',
totalCount: 'count' totalCount: 'data.total'
}, },
tableData: [ // 获取订单列表
{ getListApi: customerApi.getOrderList
id: '1',
orderNo: 'xxxxxx',
orderTime: '2022-2-5',
name: 'kyq',
phoneNum: '188585894',
carNum: 'A12345',
price: '¥1000.00',
merchant: '我是商户名称1',
orgnization: '四川分公司'
},
{
id: '2',
orderNo: 'xxxxxx',
orderTime: '2022-8-5',
name: 'hezzzzz',
phoneNum: '188585894',
carNum: 'A12345',
price: '¥1000.00',
merchant: '我是商户名称2',
orgnization: '四川分公司'
}
]
} }
}, },
methods: { methods: {
// 搜索框搜索 // 搜索框搜索
handleSearch() { handleSearch() {
if (this.searchForm.orderTime) { if (this.orderTime) {
this.searchForm.orderTime = this.searchForm.orderDateBegin = this.orderTime[0]
this.searchForm.orderTime[0] + '-' + this.searchForm.orderTime[1] this.searchForm.orderDateEnd = this.orderTime[1]
} }
console.log(this.searchForm) console.log(this.searchForm)
this.$refs.orderTable.refreshTable()
}, },
// 重置搜索框搜索 // 重置搜索框搜索
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
orderNo: '', orderCode: '',
name: '', customerName: '',
phoneNum: '', customerPhone: '',
carNum: '', plateNo: '',
merchantName: '', merchantName: '',
orderTime: '', orderDateBegin: '',
orgnization: '' orderDateEnd: '',
businessInstitution: ''
} }
this.handleSearch() this.orderTime = ''
this.$nextTick(() => {
this.$refs.orderTable.refreshTable()
})
}, },
// 跳转查看详情 // 跳转查看详情
handleViewDetail() { handleViewDetail(scope) {
this.$root.to([ console.log(scope)
'ubi续保', this.$root.to(
'续保', ['ubi续保', '续保', '保险渠道管理', '订单管理', '*订单管理详情'],
'保险渠道管理', scope.id
'订单管理', )
'*订单管理详情'
])
}, },
// 导出 // 导出
handlerOutput() {} handlerOutput() {}
...@@ -178,6 +173,9 @@ export default { ...@@ -178,6 +173,9 @@ export default {
} }
</script> </script>
<style scoped> <style scoped>
.order-contentbox {
margin: 16px;
}
.table-top { .table-top {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
......
...@@ -7,29 +7,25 @@ ...@@ -7,29 +7,25 @@
<div class="orderinfo-left"> <div class="orderinfo-left">
<div> <div>
<div class="customer-info-title">客户名称:</div> <div class="customer-info-title">客户名称:</div>
<span>xxxxxx</span> <span>{{orderInfo.customerName}}</span>
</div> </div>
<div> <div>
<div class="customer-info-title">服务关联手机号:</div> <div class="customer-info-title">身份证号:</div>
<span>xxxxxx</span> <span>{{orderInfo.customerIdCard}}</span>
</div> </div>
<div> <div>
<div class="customer-info-title">客户地址:</div> <div class="customer-info-title">客户地址:</div>
<span>xxxxxx</span> <span>{{orderInfo.applicantAddress}}</span>
</div> </div>
</div> </div>
<div class="orderinfo-right"> <div class="orderinfo-right">
<div> <div>
<div class="customer-info-title">手机号:</div> <div class="customer-info-title">手机号:</div>
<span>xxxxxx</span> <span>{{orderInfo.customerPhone}}</span>
</div>
<div>
<div class="customer-info-title">身份证号:</div>
<span>xxxxxx</span>
</div> </div>
<div> <div>
<div class="customer-info-title">所属商户:</div> <div class="customer-info-title">所属商户:</div>
<span>xxxxxx</span> <span>{{orderInfo.merchantName}}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -40,13 +36,13 @@ ...@@ -40,13 +36,13 @@
<div class="orderinfo-left"> <div class="orderinfo-left">
<div> <div>
<div class="customer-info-title">车牌号:</div> <div class="customer-info-title">车牌号:</div>
<span>xxxxxx</span> <span>{{orderInfo.plateNo}}</span>
</div> </div>
</div> </div>
<div class="orderinfo-right"> <div class="orderinfo-right">
<div> <div>
<div class="customer-info-title">车架号:</div> <div class="customer-info-title">车架号:</div>
<span>xxxxxx</span> <span>{{orderInfo.carVin}}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -57,49 +53,49 @@ ...@@ -57,49 +53,49 @@
<div class="orderinfo-box"> <div class="orderinfo-box">
<div class="orderinfo-left"> <div class="orderinfo-left">
<div class="customer-info-title">商业险保单号:</div> <div class="customer-info-title">商业险保单号:</div>
<span>xxxxx</span> <span>{{orderInfo.biPolicyNo}}</span>
</div> </div>
<div class="orderinfo-left"> <div class="orderinfo-left">
<div class="customer-info-title">商业险保费:</div> <div class="customer-info-title">商业险保费:</div>
<span>xxxxx</span> <span>{{orderInfo.biPremium}}</span>
</div> </div>
</div> </div>
<div class="orderinfo-box"> <div class="orderinfo-box">
<div class="orderinfo-left"> <div class="orderinfo-left">
<div class="customer-info-title">商业险起保日期:</div> <div class="customer-info-title">商业险起保日期:</div>
<span>xxxxx</span> <span>{{orderInfo.biStartDate}}</span>
</div> </div>
</div> </div>
<div class="orderinfo-box"> <div class="orderinfo-box">
<div class="orderinfo-left"> <div class="orderinfo-left">
<div class="customer-info-title">交强险保单号:</div> <div class="customer-info-title">交强险保单号:</div>
<span>xxxxx</span> <span>{{orderInfo.ciPolicyNo}}</span>
</div> </div>
<div class="orderinfo-left"> <div class="orderinfo-left">
<div class="customer-info-title">交强险保费:</div> <div class="customer-info-title">交强险保费:</div>
<span>xxxxx</span> <span>{{orderInfo.ciPremium}}</span>
</div> </div>
</div> </div>
<div class="orderinfo-box"> <div class="orderinfo-box">
<div class="orderinfo-left"> <div class="orderinfo-left">
<div class="customer-info-title">交强险起保日期:</div> <div class="customer-info-title">交强险起保日期:</div>
<span>xxxxx</span> <span>{{orderInfo.ciStartDate}}</span>
</div> </div>
</div> </div>
<div class="orderinfo-box"> <div class="orderinfo-box">
<div class="orderinfo-left"> <div class="orderinfo-left">
<div class="customer-info-title">非车险保单号:</div> <div class="customer-info-title">非车险保单号:</div>
<span>xxxxx</span> <span>{{orderInfo.nonPolicyNo}}</span>
</div> </div>
<div class="orderinfo-left"> <div class="orderinfo-left">
<div class="customer-info-title">非车险保费:</div> <div class="customer-info-title">非车险保费:</div>
<span>xxxxx</span> <span>{{orderInfo.nonPremium}}</span>
</div> </div>
</div> </div>
<div class="orderinfo-box"> <div class="orderinfo-box">
<div class="orderinfo-left"> <div class="orderinfo-left">
<div class="customer-info-title">总保费:</div> <div class="customer-info-title">总保费:</div>
<span>xxxxx</span> <span>{{orderInfo.totalPremium}}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -111,24 +107,19 @@ ...@@ -111,24 +107,19 @@
<thead class="table-head"> <thead class="table-head">
<td>服务名称</td> <td>服务名称</td>
<td>服务代码</td> <td>服务代码</td>
<td>服务关联手机号</td>
<td>服务单价</td> <td>服务单价</td>
<td>服务数量</td> <td>服务数量</td>
<td>服务总价</td> <td>服务总价</td>
</thead> </thead>
<tbody> <tbody>
<tr> <tr v-for="item in orderInfo.orderServices" :key="item.serviceCode">
<td class="table-head">健康咨询</td> <td class="table-head">{{item.serviceName}}</td>
<td>xxx</td> <td>{{item.serviceCode}}</td>
<td>xxx</td> <td>{{item.serviceMobile}}</td>
<td>xxx</td> <td>¥{{item.servicePrice}}</td>
<td>xxx</td> <td>{{item.serviceQuantity}}</td>
</tr> <td>¥{{item.totalPrice}}</td>
<tr>
<td class="table-head">无忧服务</td>
<td>xxx</td>
<td>xxx</td>
<td>xxx</td>
<td>xxx</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
...@@ -139,17 +130,17 @@ ...@@ -139,17 +130,17 @@
<div class="orderinfo-box"> <div class="orderinfo-box">
<div class="orderinfo-left"> <div class="orderinfo-left">
<div class="customer-info-title">订单编号:</div> <div class="customer-info-title">订单编号:</div>
<span>xxxxx</span> <span>{{orderInfo.orderCode}}</span>
</div> </div>
<div class="orderinfo-left"> <div class="orderinfo-left">
<div class="customer-info-title">订单时间:</div> <div class="customer-info-title">订单时间:</div>
<span>xxxxx</span> <span>{{orderInfo.orderDate}}</span>
</div> </div>
</div> </div>
<div class="orderinfo-box"> <div class="orderinfo-box">
<div class="orderinfo-left"> <div class="orderinfo-left">
<div class="customer-info-title">业务归属机构:</div> <div class="customer-info-title">业务归属机构:</div>
<span>xxxxx</span> <span>{{orderInfo.businessInstitution}}</span>
</div> </div>
</div> </div>
<div class="btn-class"> <div class="btn-class">
...@@ -159,6 +150,7 @@ ...@@ -159,6 +150,7 @@
</template> </template>
<script> <script>
import { customerApi } from '@/api/customer'
export default { export default {
data() { data() {
return { return {
...@@ -168,12 +160,27 @@ export default { ...@@ -168,12 +160,27 @@ export default {
}, },
mounted() { mounted() {
this.getOrderInfo() this.$root.eventBus.$on('params', params => {
this.getOrderInfo(params)
})
}, },
methods: { methods: {
// 获取订单详情 // 获取订单详情
getOrderInfo() {}, getOrderInfo(id) {
let params = { id }
customerApi.getOrderDetail(params).then(res => {
console.log(res)
if (res.code != 0) {
this.$message({
type: 'error',
message: '获取客户信息失败!'
})
return
}
this.orderInfo = res.data
})
},
// 返回 // 返回
back() { back() {
this.$root.to([ this.$root.to([
...@@ -247,6 +254,7 @@ td { ...@@ -247,6 +254,7 @@ td {
td, td,
th { th {
padding: 8px 60px; padding: 8px 60px;
min-width: 240px;
} }
.table-head { .table-head {
background: #f7f8fa; background: #f7f8fa;
......
<template> <template>
<div> <div class="certificate-box">
<div> <div>
<el-form :inline="true" :model="searchForm"> <el-form :inline="true" :model="searchForm">
<el-form-item label="客户姓名:"> <el-form-item label="客户姓名:">
...@@ -292,6 +292,9 @@ export default { ...@@ -292,6 +292,9 @@ export default {
</script> </script>
<style scoped> <style scoped>
.certificate-box {
margin: 16px;
}
.integral-box { .integral-box {
display: flex; display: flex;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!