Browse Source

修复测试文档中有关销售管理——欠款提车的问题

master
yunuo970428 3 years ago
parent
commit
baf4c8f415
  1. 220
      anrui-buscenter/anrui-buscenter-ui/src/views/teshushenpi/qiankuanticheguanli/jiansuocheliang.vue
  2. 2
      anrui-buscenter/anrui-buscenter-ui/src/views/teshushenpi/qiankuanticheguanli/qiankuanticheguanli.vue

220
anrui-buscenter/anrui-buscenter-ui/src/views/teshushenpi/qiankuanticheguanli/jiansuocheliang.vue

@ -4,7 +4,7 @@
<div class="tab-header webtop"> <div class="tab-header webtop">
<div>检索车辆信息</div> <div>检索车辆信息</div>
<div> <div>
<el-button type="primary" size="small" @click="AddUpdateReturn"></el-button> <el-button type="primary" size="small" @click="AddUpdateReturn"></el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> <el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div> </div>
</div> </div>
@ -19,6 +19,9 @@
<el-form-item label="合同编号:"> <el-form-item label="合同编号:">
<el-input v-model="listQuery.params.contractNo" placeholder="" clearable class="filter-item"/> <el-input v-model="listQuery.params.contractNo" placeholder="" clearable class="filter-item"/>
</el-form-item> </el-form-item>
<el-form-item label="车架号:">
<el-input v-model="listQuery.params.VINNo" placeholder="" clearable class="filter-item"/>
</el-form-item>
<div class="searchbtns"> <div class="searchbtns">
<el-button type="primary" @click="handleFilter">查询</el-button> <el-button type="primary" @click="handleFilter">查询</el-button>
<el-button type="primary" @click="handresetting">重置</el-button> <el-button type="primary" @click="handresetting">重置</el-button>
@ -26,26 +29,32 @@
</el-form> </el-form>
</div> </div>
</div> </div>
<div class=""> <div>
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange"> <div class="listtop">
<el-table-column width="50px" type="selection" align="center" /> <div class="tit">车辆列表</div>
<el-table-column width="80px" label="编号" type="index" :index="indexMethod" align="center"/> <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
<el-table-column label="合同编号" align="center"> </div>
<template slot-scope="scope"> <div class="">
<span>{{ scope.row.contractNo }}</span> <el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange">
</template> <el-table-column width="50px" type="selection" align="center" />
</el-table-column> <el-table-column width="80px" label="编号" type="index" :index="indexMethod" align="center"/>
<el-table-column label="客户名称" align="center"> <el-table-column label="合同编号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.customerName }}</span> <span>{{ scope.row.contractNo }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="车架号" align="center"> <el-table-column label="客户名称" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.VINNo }}</span> <span>{{ scope.row.customerName }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> <el-table-column label="车架号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.VINNo }}</span>
</template>
</el-table-column>
</el-table>
</div>
</div> </div>
<div class="pages"> <div class="pages">
<div class="tit" /> <div class="tit" />
@ -62,14 +71,14 @@
<script> <script>
import { import {
getArrearsVehicleList, getArrearsVehicleList,
arrearsVehicleApply, arrearsVehicleApply
} from "@/api/tesheshenpi/qiankuantiche"; } from '@/api/tesheshenpi/qiankuantiche'
import Pagination from "@/components/pagination"; import Pagination from '@/components/pagination'
import pageye from "@/components/pagination/pageye"; import pageye from '@/components/pagination/pageye'
// import qiankuanticheshenqing from './qiankuanticheshenqing.vue' // import qiankuanticheshenqing from './qiankuanticheshenqing.vue'
export default { export default {
name: "jiansuocheliang", name: 'jiansuocheliang',
components: { components: {
Pagination, Pagination,
pageye, pageye,
@ -80,7 +89,7 @@ export default {
data() { data() {
return { return {
isSearchShow: false, isSearchShow: false,
searchxianshitit: "隐藏查询条件", searchxianshitit: '隐藏查询条件',
btndisabled: false, btndisabled: false,
viewState: 2, viewState: 2,
tableKey: 0, tableKey: 0,
@ -88,81 +97,83 @@ export default {
sids: [], sids: [],
list: [], list: [],
datalist: [], datalist: [],
number: "", number: '',
listLoading: false, listLoading: false,
listQuery: { listQuery: {
current: 1, current: 1,
size: 10, size: 10,
params: { params: {
contractNo: "", contractNo: '',
customerName: "", customerName: '',
VINNo: ''
}, },
total: 1, total: 1
}, },
stateId: "", stateId: '',
YongHuid: [], YongHuid: [],
temp: {}, // temp: {} //
}; }
}, },
created() { created() {
// //
this.init(); this.init()
// //
}, },
methods: { methods: {
// //
clicksearchShow() { clicksearchShow() {
this.isSearchShow = !this.isSearchShow; this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) { if (this.isSearchShow) {
this.searchxianshitit = "隐藏查询条件"; this.searchxianshitit = '隐藏查询条件'
} else { } else {
this.searchxianshitit = "显示查询条件"; this.searchxianshitit = '显示查询条件'
} }
}, },
init() { init() {
this.getList(); this.getList()
}, },
indexMethod(index) { indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size; var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart; var pageindex = index + 1 + pagestart
return pageindex; return pageindex
}, },
// //
handleReturn() { handleReturn() {
this.$emit("doback", this.showbackState); this.$emit('doback', this.showbackState)
}, },
// //
getList() { getList() {
this.listLoading = true; this.listLoading = true
getArrearsVehicleList(this.listQuery).then((response) => { getArrearsVehicleList(this.listQuery).then((response) => {
this.listLoading = false; this.listLoading = false
if (response.code === "200") { if (response.code === '200') {
this.listQuery.total = response.data.total; this.listQuery.total = response.data.total
this.list = response.data.records; this.list = response.data.records
} }
}); })
}, },
// //
handleFilter() { handleFilter() {
this.getList(); this.getList()
}, },
// //
handresetting() { handresetting() {
this.listQuery = { this.listQuery = {
current: 1, current: 1,
size: 10, size: 10,
params: { params: {
contractNo: "", contractNo: '',
customerName: "", customerName: '',
VINNo: ''
}, },
total: 0, total: 0
}; }
this.getList(); this.getList()
}, },
// //
handleSelectionChange(row) { handleSelectionChange(row) {
this.sids = []; this.sids = []
const aa = []; const aa = []
row.forEach((element) => { row.forEach((element) => {
aa.push({ aa.push({
vinNo: element.VINNo, vinNo: element.VINNo,
@ -174,76 +185,89 @@ export default {
modelSid: element.modelSid, modelSid: element.modelSid,
dealMoney: element.dealMoney, dealMoney: element.dealMoney,
applyDate: element.applyDate, applyDate: element.applyDate,
arrearsVehicleSid: "", arrearsVehicleSid: ''
}); })
}); })
this.sids = aa; this.sids = aa
}, },
// //
showback(val) { showback(val) {
this.showbackState = val; this.showbackState = val
}, },
//-- // --
show(val, contractNo) { show(val, contractNo) {
this.number = contractNo; this.number = contractNo
if (contractNo !== "") { if (contractNo !== '') {
this.getList(); this.getList()
} }
if (val.length > 0) { if (val.length > 0) {
val.forEach((element) => { val.forEach((element) => {
this.datalist.push({ this.datalist.push({
vinNo: element.vinNo, vinNo: element.vinNo
}); })
}); })
} }
}, },
// //
AddUpdateReturn() { AddUpdateReturn() {
if (this.sids.length > 0) { if (this.sids.length > 0) {
if (this.number !== "") { if (this.number !== '') {
this.sids.forEach((e) => { this.sids.forEach((e) => {
if (e.contractNo !== this.number) { if (e.contractNo !== this.number) {
this.$notify({ this.$notify({
title: "提示", title: '提示',
message: "所选车辆合同编号不一致,请重新选择!", message: '所选车辆合同编号不一致,请重新选择!',
type: "success", type: 'success',
duration: 2000, duration: 2000
}); })
return; return
} }
}); })
for (var i = 0; i < this.datalist.length; i++) { for (var i = 0; i < this.datalist.length; i++) {
for (var j = 0; j < this.sids.length; j++) { for (var j = 0; j < this.sids.length; j++) {
if (this.datalist[i].vinNo == this.sids[j].vinNo) { if (this.datalist[i].vinNo === this.sids[j].vinNo) {
this.$notify({ this.$notify({
title: "提示", title: '提示',
message: "所选车架号已存在,请取消后重新选择!", message: '所选车架号已存在,请取消后重新选择!',
type: "success", type: 'success',
duration: 2000, duration: 2000
}); })
return; return
} }
} }
} }
this.$emit("return", this.sids, 1); this.$emit('return', this.sids, 1)
} else { } else {
arrearsVehicleApply(this.sids).then((res) => { arrearsVehicleApply(this.sids).then((res) => {
if (res.code == "200") { if (res.code === '200') {
this.$emit("return", this.sids, 2); this.$emit('return', this.sids, 2)
} }
}); })
} }
} else { } else {
this.$notify({ this.$notify({
title: "提示", title: '提示',
message: "请选择至少一条记录进行删除操作!", message: '请选择至少一条记录进行删除操作!',
type: "error", type: 'error',
duration: 2000, duration: 2000
}); })
} }
}, }
}, }
}; }
</script> </script>
<style scoped> <style scoped>
.listtop {
display: flex;
justify-content: space-between;
align-items: center;
border: 1px solid #dfe4ed;
height: 40px;
}
.tit {
margin-bottom: -10px;
}
.pagination {
margin-bottom: -10px;
}
</style> </style>

2
anrui-buscenter/anrui-buscenter-ui/src/views/teshushenpi/qiankuanticheguanli/qiankuanticheguanli.vue

@ -70,7 +70,7 @@
<span>{{ scope.row.modelName }}</span> <span>{{ scope.row.modelName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="累计欠款金额" align="center"> <el-table-column label="欠款金额" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.cumulativeArrearsMoney }}</span> <span>{{ scope.row.cumulativeArrearsMoney }}</span>
</template> </template>

Loading…
Cancel
Save