You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

228 lines
8.1 KiB

<template>
<div class="app-container">
<!-- Start 列表页面 -->
<div v-show="viewState == 1">
<button-bar view-title="金融贴息差异调整管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
<el-form-item label="采购系统">
<el-input v-model="listQuery.params.purchaseSystemName" placeholder="" clearable />
</el-form-item>
<el-form-item label="品牌">
<el-input v-model="listQuery.params.brandName" placeholder="" clearable />
</el-form-item>
<el-form-item label="车型">
<el-input v-model="listQuery.params.vehModel" placeholder="" clearable />
</el-form-item>
<el-form-item label="车架号">
<el-input v-model="listQuery.params.vinNo" placeholder="" clearable />
</el-form-item>
<el-form-item label="客户名称">
<el-input v-model="listQuery.params.customerName" placeholder="" clearable />
</el-form-item>
<el-form-item label="合同编号">
<el-input v-model="listQuery.params.contractNo" placeholder="" clearable />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">金融贴息差异调整结果列表</div>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" align="center" width="50" />
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80" />
<el-table-column prop="state" label="状态" align="center" width="150" />
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" width="140" />
<el-table-column prop="brandName" label="品牌" align="center" width="200" />
<el-table-column prop="vehModelName" label="车型" align="center" width="200" />
<el-table-column prop="vinNo" label="车架号" align="center" width="150" />
<el-table-column prop="customerName" label="客户名称" align="center" width="140" />
<el-table-column prop="contractNo" label="合同编号" align="center" width="120" />
<el-table-column prop="estimateRebate" label="订单贴息" align="center" width="120" />
<el-table-column prop="uploadMoney" label="上传贴息" align="center" width="120" />
<el-table-column prop="adjustmentMoney" label="差额" align="center" width="150" />
<el-table-column prop="alreadyMoney" label="已调整" align="center" width="150" />
<el-table-column prop="nowDiffAmount" label="当前差额" align="center" width="100" />
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/financialDiscount/financialDiscount'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
export default {
name: 'ChooseAdjustment',
components: {
Pagination,
pageye,
ButtonBar
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: '',
btnKey: 'toConfirm',
btnLabel: '确认'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1,
// 查询条件 -----------
tableKey: 0,
list: [],
multipleSelection: [],
FormLoading: false,
listLoading: false,
listQuery: {
params: {
useOrgSid: '',
staffSid: '',
purchaseSystemName: '',
brandName: '',
vehModel: '',
vinNo: '',
customerName: '',
contractNo: '',
sids: []
},
current: 1,
size: 5,
total: 0
}
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
// 搜索条件效果
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'toConfirm':
this.toConfirm()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
// 序号
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
handleSelectionChange(row) {
this.multipleSelection = row
},
showData(value, useOrgSid, staffSid) {
this.listQuery.params.useOrgSid = useOrgSid
this.listQuery.params.staffSid = staffSid
const aa = []
if (value.length > 0) {
for (var i = 0; i < value.length; i++) {
aa.push(value[i].vehSid)
}
this.listQuery.params.sids = aa
} else {
this.listQuery.params.sids = []
}
this.handleReset()
},
// 查询列表信息
getList() {
this.listLoading = true
req.getAdjustVehList(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (response.success) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
// 查询按钮
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleReset() {
this.listQuery.current = 1
this.listQuery.size = 5
this.listQuery.total = 0
this.listQuery.params.purchaseSystemName = ''
this.listQuery.params.brandName = ''
this.listQuery.params.vehModel = ''
this.listQuery.params.vinNo = ''
this.listQuery.params.customerName = ''
this.listQuery.params.contractNo = ''
this.getList()
},
toConfirm() {
if (this.multipleSelection.length > 0) {
this.listQuery.params.useOrgSid = ''
this.listQuery.params.staffSid = ''
this.listQuery.params.sids = []
this.$emit('backData', this.multipleSelection)
} else {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条数据进行操作' })
}
},
doClose() {
this.listQuery.params.useOrgSid = ''
this.listQuery.params.staffSid = ''
this.listQuery.params.sids = []
this.$emit('doback')
}
}
}
</script>
<style scoped>
</style>