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

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

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

Loading…
Cancel
Save