Commit eefaa5bd by 张权

核赔列表页接口联调

1 parent 3d7c2c89
import { http, http_brand } from '@/main'
const defaultPath = 'scrm.api.equity.service.package.'
const orderPath = 'scrm.api.equity.service.order.'
/*获取核赔列表*/
const getclaimsList = params => {
params.method = 'scrm.api.equity.service.claims.operate.list'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params
})
}
// 核赔订单状态统计
const getclaimsCount = params => {
params.method = 'scrm.api.equity.service.claims.operate.list.count'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params
})
}
//重新提交核赔订单
const resubmitOrder = params => {
params.method = 'scrm.api.equity.service.claims.operate.resubmit'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params
})
}
// 核赔订单提交或草稿
const commitClaimsOrder = params => {
params.method = 'scrm.api.equity.service.claims.operate.draft.or.commit'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params
})
}
// 获取核赔订单详情
const getClaimsDetail = params => {
params.method = 'scrm.api.equity.service.claims.detail'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params
})
}
// 导出核赔列表
const exportClaimsData = params => {
params.method = 'scrm.api.equity.service.claims.operate.list.export'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
returnAll: true
})
}
export default { getclaimsList, getclaimsCount, resubmitOrder, commitClaimsOrder, getClaimsDetail, exportClaimsData }
...@@ -7,39 +7,45 @@ ...@@ -7,39 +7,45 @@
<div class="header_info_widget"> <div class="header_info_widget">
<span class="el-icon-warning"></span> <span class="el-icon-warning"></span>
请注意:订单列表还有 请注意:订单列表还有
<span class="count_num">0</span> <span class="count_num">{{ orderCount.toBeCommitCount }}</span>
单待提交国任, 单待提交国任,
<span class="count_num">0</span> <span class="count_num">{{ orderCount.noPassCount }}</span>
单校验不通过退回处理,为保障客户权益,请尽快处理哦! 单校验不通过退回处理,为保障客户权益,请尽快处理哦!
</div> </div>
<div class="search_container"> <div class="search_container">
<GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleOkFn" @handleRest="handleRestFn" :beforeSearchFn="beforeSearchFn"></GLCombiForm> <glsx-combi-form ref="showSearch" labelWidth="112px" defaultWidth="200px" :formObj="searchForm" :formData="searchFormData">
<div slot="footer" class="footer-btns" style="float:right;">
<el-button size="small" @click="handleRestFn()">重置</el-button>
<el-button size="small" type="primary" @click="handleOkFn">查询</el-button>
</div>
</glsx-combi-form>
</div> </div>
<div class="table_widget"> <div class="table_widget">
<el-button style="float:right;margin-bottom:10px;" size="small" type="primary" plain>导出excel</el-button> <el-button style="float:right;margin-bottom:10px;" size="small" type="primary" @click="exportList" plain>导出excel</el-button>
<GLTable ref="equityRef" :tableData="tableData" :tableTotal="tableTotal" :pageSizes="sizeList" :searchForm="searchParams" :tableParams="tableParams" :pageConf="pageConf"> <GLTable ref="equityRef" :pageSizes="sizeList" :getListApi="getListApi" :searchForm="searchParams" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" :pageConf="batchPageConf">
<div class="table-btns" slot="table-btns" slot-scope="scope"> <div class="table-btns" slot="table-btns" slot-scope="scope">
<GLButton v-if="[0].includes(scope.scope.serviceStatus)" fn="去处理" type="text" @click="handleEdit(4, scope.scope)">去处理</GLButton> <GLButton v-if="[0].includes(scope.scope.status)" fn="去处理" type="text" @click="handleEdit(4, scope.scope)">去处理</GLButton>
<GLButton v-if="[2, 3, 4].includes(scope.scope.serviceStatus)" fn="查看" type="text" @click="handleEdit(2, scope.scope)">查看</GLButton> <GLButton v-if="[2, 3, 4].includes(scope.scope.status)" fn="查看" type="text" @click="handleEdit(2, scope.scope)">查看</GLButton>
<GLButton v-if="[1].includes(scope.scope.serviceStatus)" fn="重新提交" type="text" @click="handleEdit(3, scope.scope)">重新提交</GLButton> <GLButton v-if="[1].includes(scope.scope.status)" fn="重新提交" type="text" @click="handleEdit(3, scope.scope)">重新提交</GLButton>
</div> </div>
</GLTable> </GLTable>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import glsxCombiForm from '@/components/glsx-combi-form'
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
const serviceStatusType = [ const statusList = [
{ {
confId: 0, confId: 0,
confName: '待提交国任' confName: '待提交国任'
}, },
{ {
confId: 1, confId: 2,
confName: '校验失败' confName: '校验不通过'
}, },
{ {
confId: 2, confId: 1,
confName: '待支付' confName: '待支付'
}, },
{ {
...@@ -55,29 +61,31 @@ export default { ...@@ -55,29 +61,31 @@ export default {
name: 'index', name: 'index',
data() { data() {
return { return {
orderCount: {},
getListApi: this.$apis.claims.getclaimsList,
sizeList: [5, 10, 20, 30, 40], sizeList: [5, 10, 20, 30, 40],
pageConf: { pageSize: 'pageCount', pageNum: 'pageSize', totalCount: 'total' }, pageConf: { pageSize: 'pageCount', pageNum: 'pageNum', totalCount: 'total' },
batchPageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
searchForm: { searchForm: {
searchText: '', searchText: '',
serviceStatus: '', status: '',
commitDate: '' commitDate: ''
}, },
searchParams: {}, searchParams: {},
searchFormData: [ searchFormData: [
{ {
label: '搜索内容',
name: 'searchText', name: 'searchText',
type: 'input', type: 'input',
placeholder: '请输入客户名、核销码、合同号、报案号', placeholder: '请输入客户名|核销码|合同号|报案号',
isClear: true isClear: true
// isHide: true // isHide: true
}, },
{ {
label: '服务状态', label: '服务状态',
name: 'serviceStatus', name: 'status',
type: 'select', type: 'select',
isClear: true, isClear: true,
optionList: serviceStatusType, optionList: statusList,
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName' optionLabel: 'confName'
}, },
...@@ -85,7 +93,7 @@ export default { ...@@ -85,7 +93,7 @@ export default {
label: '提交国任日期', label: '提交国任日期',
name: 'commitDate', name: 'commitDate',
type: 'datePicker', type: 'datePicker',
valueFormat: 'yyyy-MM-dd', pickerOptions: 'beforeRangePickerOptions',
isClear: true isClear: true
} }
], ],
...@@ -103,16 +111,19 @@ export default { ...@@ -103,16 +111,19 @@ export default {
}, },
{ {
label: '报案号', label: '报案号',
prop: 'reportNo', prop: 'registNo',
width: '200px', width: '200px',
formatter: cellValue => { formatter: cellValue => {
return cellValue.reportNo || '-' return cellValue.registNo || '-'
} }
}, },
{ {
label: '客户名称', label: '客户名称',
prop: 'customerName', prop: 'merchantName',
width: '160px' width: '160px',
formatter: cellValue => {
return cellValue.merchantName || '-'
}
}, },
{ {
label: '合同号', label: '合同号',
...@@ -124,62 +135,72 @@ export default { ...@@ -124,62 +135,72 @@ export default {
}, },
{ {
label: '价格区间', label: '价格区间',
prop: 'pricePeriod', prop: 'priceSection',
width: '200px', width: '200px',
formatter: cellValue => { formatter: cellValue => {
return cellValue.pricePeriod || '-' return cellValue.priceSection || '-'
} }
}, },
{ {
label: '门店提交时间', label: '门店提交时间',
prop: 'shopCreateDate', prop: 'commitTime',
width: '160px', width: '160px',
formatter: cellValue => { formatter: cellValue => {
return cellValue.shopCreateDate ? dayjs(cellValue.shopCreateDate).format('YYYY-MM-DD HH:mm:ss') : '-' return cellValue.commitTime ? dayjs(cellValue.commitTime).format('YYYY-MM-DD HH:mm:ss') : '-'
} }
}, },
{ {
label: '提交国任时间', label: '提交国任时间',
prop: 'reportCreateDate', prop: 'commitGuoRenDate',
width: '200px', width: '200px',
formatter: cellValue => { formatter: cellValue => {
return cellValue.reportCreateDate ? dayjs(cellValue.reportCreateDate).format('YYYY-MM-DD HH:mm:ss') : '-' return cellValue.commitGuoRenDate ? dayjs(cellValue.commitGuoRenDate).format('YYYY-MM-DD HH:mm:ss') : '-'
} }
}, },
{ {
label: '服务名称', label: '服务名称',
prop: 'serviceName', prop: 'serviceName',
width: '300px' width: '300px',
formatter: cellValue => {
return cellValue.serviceName || '-'
}
}, },
{ {
label: '服务状态', label: '服务状态',
prop: 'serviceStatus', prop: 'status',
width: '160px', width: '160px',
formatter: cellValue => { formatter: cellValue => {
return serviceStatusType.map(item => item.confId).includes(cellValue.serviceStatus) ? serviceStatusType.find(item => item.confId == cellValue.serviceStatus).confName : '-' return statusList.map(item => item.confId).includes(cellValue.status) ? statusList.find(item => item.confId == cellValue.status).confName : '-'
} }
}, },
{ {
label: '状态描述', label: '状态描述',
prop: 'desc', prop: 'statusDesc',
width: '200px', width: '200px',
formatter: cellValue => { formatter: cellValue => {
return cellValue.desc || '-' return cellValue.statusDesc || '-'
} }
}, },
{ {
label: '批准金额', label: '批准金额',
prop: 'money', prop: 'approvalAmount',
width: '160px', width: '160px',
formatter: cellValue => { formatter: cellValue => {
return cellValue.money ? (cellValue.money / 100).toFixed(2) : '-' return cellValue.approvalAmount ? (cellValue.approvalAmount / 100).toFixed(2) : '-'
} }
}, },
{ {
label: '支付金额', label: '支付金额',
prop: 'payMoney', prop: 'paymentAmount',
formatter: cellValue => { formatter: cellValue => {
return cellValue.payMoney ? (cellValue.payMoney / 100).toFixed(2) : '-' return cellValue.paymentAmount ? (cellValue.paymentAmount / 100).toFixed(2) : '-'
}
},
{
label: '操作人',
prop: 'reporterName',
formatter: cellValue => {
return cellValue.reporterName || '-'
} }
}, },
{ {
...@@ -190,36 +211,26 @@ export default { ...@@ -190,36 +211,26 @@ export default {
addHtml: 'table-btns' addHtml: 'table-btns'
} }
] ]
},
tableData: []
} }
}
},
components: {
glsxCombiForm
}, },
created() { created() {
this.diffHost() this.diffHost()
this.tableData = [] this.getClaimsCount()
for (let i = 0; i < 5; i++) {
let obj = {
contractNo: '511013594067116032',
reportNo: '511013594067116032',
customerName: '王老吉',
pricePeriod: '20万-80万',
shopCreateDate: 1648708356000,
reportCreateDate: 1648708356000,
serviceName: '钥匙及车牌重置服务+车辆置换补偿服务',
serviceStatus: i,
desc: '处理成功',
money: 2000,
payMoney: 2000,
writeOffCode: '12345678'
}
this.tableData.push(obj)
}
this.tableTotal = this.tableData.length
}, },
mounted() { mounted() {
// this.handleUploadBefore() // this.handleUploadBefore()
}, },
methods: { methods: {
getClaimsCount() {
this.$apis.claims.getclaimsCount({}).then(res => {
this.orderCount = res
})
},
// 从域名判断是不是广汇的 // 从域名判断是不是广汇的
diffHost() { diffHost() {
let href = window.location.host let href = window.location.host
...@@ -227,7 +238,7 @@ export default { ...@@ -227,7 +238,7 @@ export default {
this.showGh = true this.showGh = true
} else { } else {
this.showGh = false this.showGh = false
this.searchFormData[0].placeholder = '请输入客户名、合同号、报案号' this.searchFormData[0].placeholder = '请输入客户名 | 合同号 | 报案号'
} }
}, },
// 1.新增 2.查看 3.重新提交 4.去处理 // 1.新增 2.查看 3.重新提交 4.去处理
...@@ -253,28 +264,43 @@ export default { ...@@ -253,28 +264,43 @@ export default {
handleRestFn() { handleRestFn() {
this.searchForm = { this.searchForm = {
searchText: '', searchText: '',
serviceStatus: '', status: '',
commitDate: '' commitDate: ''
} }
this.getTableData() this.getTableData()
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.getParams() this.searchParams = { ...this.getParams() }
resolve() resolve()
}) })
}, },
getParams() { getParams() {
let params = JSON.parse(JSON.stringify(this.searchForm)) let params = JSON.parse(JSON.stringify(this.searchForm))
if (Array.isArray(params.commitDate) && params.commitDate.length > 0) { if (Array.isArray(params.commitDate) && params.commitDate.length > 0) {
params.startTime = params.commitDate[0] + ' 00:00:00' params.commitTimeStart = dayjs(params.commitDate[0]).format('YYYY-MM-DD') + ' 00:00:00'
params.endTime = params.commitDate[1] + ' 23:59:59' params.commitTimeEnd = dayjs(params.commitDate[1]).format('YYYY-MM-DD') + ' 23:59:59'
} }
delete params.commitDate delete params.commitDate
this.searchParams = { ...params } return params
}, },
getTableData() { getTableData() {
this.$refs.equityRef.refreshTable() this.$refs.equityRef.refreshTable()
},
exportList() {
const parmas = { ...this.getParams() }
this.$apis.claims.exportClaimsData(parmas).then(({ code, data, message }) => {
if (code == 0) {
var a = document.createElement('a')
a.setAttribute('id', 'exportToExport')
a.setAttribute('href', data)
a.setAttribute('target', '_blank')
document.body.appendChild(a)
a.click()
} else {
this.$message.error(message)
}
})
} }
} }
} }
...@@ -317,4 +343,15 @@ export default { ...@@ -317,4 +343,15 @@ export default {
background: #ffffff; background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
} }
/deep/ .el-form {
.el-form-item {
margin-right: 12px !important;
&:first-child {
.el-input {
width: 312px !important;
}
}
}
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!