Commit ac957dc7 by 张立顺

新增字段

1 parent 05228015
...@@ -2,39 +2,24 @@ ...@@ -2,39 +2,24 @@
<template> <template>
<div class="purchase"> <div class="purchase">
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch"
:rowNumber="1" @handleRest="handleReset"></GLCombiForm>
:formObj="searchForm"
:formData="showFormData"
@handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<div class="table-header"> <div class="table-header">
<el-button type="primary" <el-button type="primary" class="btn" size="small" @click="exportExcel">导出</el-button>
class="btn"
size="small"
@click="exportExcel">导出</el-button>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="orderRef" <GLTable ref="orderRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm"
:getListApi="getListApi" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"
:noDataImg="url" @setTableFinishFun="setTableFinishFun">
:searchForm="tableSearchForm" <div class="table-btns" slot="auth-button" slot-scope="scope">
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<div class="table-btns"
slot="auth-button"
slot-scope="scope">
<el-button type="text" <el-button type="text"
v-if="[1, 2, 3, -1, 5].includes(scope.scope.orderStatus) || [2].includes(scope.scope.equityOrderStatus)" v-if="[1, 2, 3, -1, 5].includes(scope.scope.orderStatus) || [2].includes(scope.scope.equityOrderStatus)"
@click="handlePrint(scope.scope)">打印</el-button> @click="handlePrint(scope.scope)">打印</el-button>
<el-button type="text" <el-button type="text"
v-if="[2].includes(scope.scope.equityOrderStatus) && [3, 5].includes(scope.scope.orderStatus)" v-if="[2].includes(scope.scope.equityOrderStatus) && [3, 5].includes(scope.scope.orderStatus)"
@click="handlePrintContract(scope.scope)">打印合同</el-button> @click="handlePrintContract(scope.scope)">打印合同</el-button>
<el-button type="text" <el-button type="text" @click="handleDetail(scope.scope)">详情</el-button>
@click="handleDetail(scope.scope)">详情</el-button>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -49,63 +34,69 @@ import { Util, downLoadFile } from '@/common/util' ...@@ -49,63 +34,69 @@ import { Util, downLoadFile } from '@/common/util'
import { manageTypeList } from '@/common/constant.js' import { manageTypeList } from '@/common/constant.js'
export default { export default {
name: 'CarDamage', name: 'CarDamage',
components: { components: {},
},
data() { data() {
return { return {
sessionInfo: this.$globalState.session, sessionInfo: this.$globalState.session,
size: 'small', size: 'small',
url: url, url: url,
searchForm: { searchForm: {
orderStatus: "", orderStatus: '',
merchantName: "", merchantName: '',
goodsName: "", goodsName: '',
createTime: "" createTime: '',
tradeNo: ''
}, },
showFormData: [ showFormData: [
{ {
label: "客户姓名", label: '交易参考号',
name: "customerName", name: 'tradeNo',
type: "input", type: 'input',
isClear: true isClear: true
// keyFn: this.keyDowmGetList
}, },
{ {
label: "服务状态", label: '客户姓名',
name: "orderStatus", name: 'customerName',
type: "select", type: 'input',
isClear: true
},
{
label: '服务状态',
name: 'orderStatus',
type: 'select',
optionList: [], optionList: [],
optionId: "severType", optionId: 'severType',
optionLabel: "severName", optionLabel: 'severName',
optionsName: "severTypeList" optionsName: 'severTypeList'
}, },
{ {
label: "商户名称", label: '商户名称',
name: "merchantName", name: 'merchantName',
type: "input", type: 'input',
maxlength: "20", maxlength: '20',
isClear: true isClear: true
}, },
{ {
label: "商品名称", label: '商品名称',
name: "goodsName", name: 'goodsName',
type: "input", type: 'input',
maxlength: "20", maxlength: '20',
isClear: true isClear: true
}, },
{ {
label: "车架号", label: '车架号',
name: "carVin", name: 'carVin',
type: "input", type: 'input',
isClear: true isClear: true
}, },
{ {
label: "创建时间", label: '创建时间',
name: "createTime", name: 'createTime',
type: "datePicker", type: 'datePicker',
isClear: true, isClear: true,
pickerOptions: 'beforeRangePickerOptions' pickerOptions: 'beforeRangePickerOptions'
}, }
], ],
tableSearchForm: {}, tableSearchForm: {},
// 表格 // 表格
...@@ -115,70 +106,69 @@ export default { ...@@ -115,70 +106,69 @@ export default {
tableOption: true, tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: "报价单号", label: '报价单号',
prop: "orderId", prop: 'orderId',
minWidth: "200" minWidth: '200'
},
{
label: '交易参考号',
prop: 'tradeNo',
minWidth: '200'
}, },
{ {
label: "客户姓名", label: '客户姓名',
prop: "customerName", prop: 'customerName',
width: "200px" width: '200px'
}, },
{ {
label: "车架号", label: '车架号',
prop: "carVin", prop: 'carVin',
width: "250px" width: '250px'
}, },
{ {
label: "保险公司", label: '保险公司',
prop: "insuranceCompany", prop: 'insuranceCompany',
minWidth: 100 minWidth: 100
}, },
{ {
label: "状态", label: '状态',
prop: "orderStatus", prop: 'orderStatus',
width: "100", width: '100',
formatter: (cellValue) => { formatter: cellValue => {
if (cellValue.orderStatus == 4) { if (cellValue.orderStatus == 4) {
return "已支付" return '已支付'
} else { } else {
return this.baseData.severTypeList return this.baseData.severTypeList.map(item => item.severType).includes(cellValue.orderStatus) ? this.baseData.severTypeList.find(item => item.severType === cellValue.orderStatus).severName : '-'
.map((item) => item.severType)
.includes(cellValue.orderStatus)
? this.baseData.severTypeList.find(
(item) => item.severType === cellValue.orderStatus
).severName
: "-"
} }
} }
}, },
{ {
label: "备注", label: '备注',
prop: "remark" prop: 'remark'
}, },
{ {
label: "商品名称", label: '商品名称',
prop: "goodsName", prop: 'goodsName',
width: "200px" width: '200px'
}, },
{ {
label: "报价金额/元", label: '报价金额/元',
prop: "quotedPrice", prop: 'quotedPrice',
width: "200px" width: '200px'
}, },
{ {
label: "预计权益金额/元", label: '预计权益金额/元',
prop: "estEquityPrice", prop: 'estEquityPrice',
width: "250px" width: '250px'
}, },
{ {
label: "实际权益金额/元", label: '实际权益金额/元',
prop: "equityPrice", prop: 'equityPrice',
width: "250px" width: '250px'
}, },
{ {
label: "商户名称", label: '商户名称',
prop: "merchantName", prop: 'merchantName',
minWidth: 150 minWidth: 150
} }
] ]
...@@ -187,27 +177,24 @@ export default { ...@@ -187,27 +177,24 @@ export default {
// 基本数据 // 基本数据
baseData: { baseData: {
severTypeList: [ severTypeList: [
{ severName: "待报价", severType: 0 }, { severName: '待报价', severType: 0 },
{ severName: "待确认", severType: 1 }, { severName: '待确认', severType: 1 },
{ severName: "待支付", severType: 2 }, { severName: '待支付', severType: 2 },
{ severName: "已支付", severType: 3 }, { severName: '已支付', severType: 3 },
{ severName: "战败", severType: -1 }, { severName: '战败', severType: -1 },
{ severName: "已完成", severType: 5 } { severName: '已完成', severType: 5 }
] ]
}, }
} }
}, },
created() { created() { },
},
mounted() { mounted() {
this.getOptionsList() this.getOptionsList()
}, },
watch: { watch: {},
},
methods: { methods: {
getParams() { getParams() {
...@@ -220,7 +207,7 @@ export default { ...@@ -220,7 +207,7 @@ export default {
return params return params
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve) => { return new Promise(resolve => {
this.tableSearchForm = this.getParams() this.tableSearchForm = this.getParams()
delete this.tableSearchForm.createTime delete this.tableSearchForm.createTime
resolve() resolve()
...@@ -258,10 +245,10 @@ export default { ...@@ -258,10 +245,10 @@ export default {
}, },
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
orderStatus: "", orderStatus: '',
merchantName: "", merchantName: '',
goodsName: "", goodsName: '',
createTime: "" createTime: ''
} }
this.handleSearch() this.handleSearch()
}, },
...@@ -283,7 +270,7 @@ export default { ...@@ -283,7 +270,7 @@ export default {
// 打印报价单 // 打印报价单
handlePrint(row) { handlePrint(row) {
this.$apis.order.quotationPrintApi({ id: row.id }).then((res) => { this.$apis.order.quotationPrintApi({ id: row.id }).then(res => {
console.log(res) console.log(res)
const oWin = window.open(res) const oWin = window.open(res)
oWin.document.fn = function () { oWin.document.fn = function () {
...@@ -292,10 +279,7 @@ export default { ...@@ -292,10 +279,7 @@ export default {
oWin.close() oWin.close()
} }
} }
const html = const html = '<div style="height: 100%;width: 100%;">' + `<img src="${res}" onload="fn()" style="max-height:100%;max-width: 100%;" />` + '</div>'
'<div style="height: 100%;width: 100%;">' +
`<img src="${res}" onload="fn()" style="max-height:100%;max-width: 100%;" />` +
"</div>"
oWin.document.open() oWin.document.open()
oWin.document.write(html) oWin.document.write(html)
oWin.document.close() oWin.document.close()
...@@ -305,48 +289,56 @@ export default { ...@@ -305,48 +289,56 @@ export default {
// 打印权益合同 // 打印权益合同
handlePrintContract(row) { handlePrintContract(row) {
// 获取权益合同PDF // 获取权益合同PDF
this.$apis.order.contractExportApi({ orderId: row.orderId }).then((res) => { this.$apis.order.contractExportApi({ orderId: row.orderId }).then(res => {
window.open(res) window.open(res)
}) })
}, }
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import '@/assets/css/mixin.scss'; @import '@/assets/css/mixin.scss';
.purchase { .purchase {
.table-header { .table-header {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 25px; margin-bottom: 25px;
margin-top: 20px; margin-top: 20px;
h2 { h2 {
font-weight: 600; font-weight: 600;
font-size: 16px; font-size: 16px;
color: #333; color: #333;
} }
.glbtn { .glbtn {
left: 46px; left: 46px;
position: absolute; position: absolute;
} }
.btn { .btn {
right: 47px; right: 47px;
position: absolute; position: absolute;
} }
} }
.greenSpot { .greenSpot {
@include dot; @include dot;
background: $color-green; background: $color-green;
} }
.yellowSpot { .yellowSpot {
@include dot; @include dot;
background: $color-yellow; background: $color-yellow;
} }
.ashSpot { .ashSpot {
@include dot; @include dot;
background: $color-gray; background: $color-gray;
} }
.table-btns /deep/.el-button--text { .table-btns /deep/.el-button--text {
min-width: 0 !important; min-width: 0 !important;
padding: 0; padding: 0;
...@@ -356,5 +348,4 @@ export default { ...@@ -356,5 +348,4 @@ export default {
font-size: 14px; font-size: 14px;
color: #909399; color: #909399;
} }
} }</style>
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!