|
@@ -6,11 +6,18 @@
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
<div class="top">
|
|
|
-
|
|
|
+ <el-select v-model="formUserList.companyName" placeholder="请选择公司名称">
|
|
|
+ <el-option
|
|
|
+ v-for="item in companyList"
|
|
|
+ :key="item.companyName"
|
|
|
+ :label="item.companyName"
|
|
|
+ :value="item.companyName">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
<label style="margin-left: 1%;">车牌号:</label>
|
|
|
- <el-input placeholder="车牌号" class="input-demo" v-model="plateNumber"></el-input>
|
|
|
+ <el-input placeholder="车牌号" class="input-demo" v-model="carNum"></el-input>
|
|
|
<label style="margin-left: 1%;">备案结果:</label>
|
|
|
- <el-select v-model="isSuccess" placeholder="请选择备案结果">
|
|
|
+ <el-select v-model="formUserList.recStatus" placeholder="请选择备案结果">
|
|
|
<el-option
|
|
|
v-for="item in optionone"
|
|
|
:key="item.value"
|
|
@@ -18,7 +25,7 @@
|
|
|
:value="item.value">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
- <el-button type="success" style="margin-left: 1%;" @click="queryLook">查询</el-button>
|
|
|
+ <el-button type="success" style="margin-left: 1%;" @click="loadData">查询</el-button>
|
|
|
<el-button type="success" style="margin-left: 1%;" @click="exportOut">导出</el-button>
|
|
|
</div>
|
|
|
</el-col>
|
|
@@ -35,7 +42,7 @@
|
|
|
border
|
|
|
tooltip-effect="dark">
|
|
|
<el-table-column
|
|
|
- prop="plateNumber"
|
|
|
+ prop="carNum"
|
|
|
label="车牌号"
|
|
|
show-overflow-tooltip>
|
|
|
</el-table-column>
|
|
@@ -43,26 +50,26 @@
|
|
|
label="车牌颜色"
|
|
|
show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.plateColor == 0">蓝色</span>
|
|
|
- <span v-else-if="scope.row.plateColor == 1">黄色</span>
|
|
|
- <span v-else-if="scope.row.plateColor == 2">黑色</span>
|
|
|
- <span v-else-if="scope.row.plateColor == 3">白色</span>
|
|
|
- <span v-else-if="scope.row.plateColor == 4">渐变绿色</span>
|
|
|
- <span v-else-if="scope.row.plateColor == 5">黄绿渐变色</span>
|
|
|
- <span v-else-if="scope.row.plateColor == 6">蓝白渐变色</span>
|
|
|
- <span v-else-if="scope.row.plateColor == 9">未确定</span>
|
|
|
+ <span v-if="scope.row.carColor == 0">蓝色</span>
|
|
|
+ <span v-else-if="scope.row.carColor == 1">黄色</span>
|
|
|
+ <span v-else-if="scope.row.carColor == 2">黑色</span>
|
|
|
+ <span v-else-if="scope.row.carColor == 3">白色</span>
|
|
|
+ <span v-else-if="scope.row.carColor == 4">渐变绿色</span>
|
|
|
+ <span v-else-if="scope.row.carColor == 5">黄绿渐变色</span>
|
|
|
+ <span v-else-if="scope.row.carColor == 6">蓝白渐变色</span>
|
|
|
+ <span v-else-if="scope.row.carColor == 9">未确定</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
label="备案结果"
|
|
|
show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.isSuccess == 1">成功</span>
|
|
|
- <span v-else-if="scope.row.isSuccess == 2">失败</span>
|
|
|
+ <span v-if="scope.row.recStatus == 1">成功</span>
|
|
|
+ <span v-else-if="scope.row.recStatus == 0">失败</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="errorMsg"
|
|
|
+ prop="failReason"
|
|
|
label="信息"
|
|
|
show-overflow-tooltip>
|
|
|
</el-table-column>
|
|
@@ -90,68 +97,57 @@ export default{
|
|
|
data() {
|
|
|
return {
|
|
|
loading: false,
|
|
|
- userCompany: '',
|
|
|
- plateNumber: '',
|
|
|
- plateColor: '',
|
|
|
- startTime: '',
|
|
|
- endTime: '',
|
|
|
- isSuccess: '',
|
|
|
optionone: [{
|
|
|
- value: '1',
|
|
|
+ value: '2',
|
|
|
label: '成功'
|
|
|
}, {
|
|
|
- value: '2',
|
|
|
+ value: '1',
|
|
|
label: '失败'
|
|
|
}],
|
|
|
current: 1,
|
|
|
pagesize: 10,
|
|
|
total: 0,
|
|
|
usertable: [],
|
|
|
+ companyList:[],
|
|
|
formUserList: {
|
|
|
- "userId": "",
|
|
|
- "file": "",
|
|
|
- "roleId": ""
|
|
|
+ "customerName": "",
|
|
|
+ "companyName":"",
|
|
|
+ "recStatus":'',
|
|
|
+ "carNum":''
|
|
|
},
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ this.initCompanyList();
|
|
|
+ this.formUserList.customerName = sessionStorage.getItem('userName');
|
|
|
this.loadData();
|
|
|
},
|
|
|
methods: {
|
|
|
// 列表展示
|
|
|
async loadData() {
|
|
|
- this.formUserList.userId = sessionStorage.getItem('userId');
|
|
|
- this.formUserList.roleId = sessionStorage.getItem('roleId');
|
|
|
- if(this.formUserList.roleId == 1) {
|
|
|
- const formData = new FormData();
|
|
|
- formData.append('current', this.current);
|
|
|
- formData.append('size', this.pagesize);
|
|
|
- formData.append('isSuccess', this.isSuccess);
|
|
|
- const response = await this.$http.post(`carFreeCarrierRegister/list`, formData);
|
|
|
- if (response.data.code === 0) {
|
|
|
- this.loading = false;
|
|
|
- this.usertable = response.data.data.records;
|
|
|
- this.total = response.data.data.total;
|
|
|
- };
|
|
|
- }else {
|
|
|
- const formData = new FormData();
|
|
|
- formData.append('current', this.current);
|
|
|
- formData.append('size', this.pagesize);
|
|
|
- formData.append('userId', this.formUserList.userId);
|
|
|
- const response = await this.$http.post(`carFreeCarrierRegister/list`, formData);
|
|
|
- if (response.data.code === 0) {
|
|
|
- this.loading = false;
|
|
|
- this.usertable = response.data.data.records;
|
|
|
- this.total = response.data.data.total;
|
|
|
- };
|
|
|
- };
|
|
|
+ const formData = new FormData();
|
|
|
+ formData.append('current', this.current);
|
|
|
+ formData.append('size', this.pagesize);
|
|
|
+ formData.append('companyName', this.formUserList.companyName);
|
|
|
+ formData.append('carNum', this.formUserList.carNum);
|
|
|
+ formData.append('customerName', this.formUserList.customerName);
|
|
|
+ formData.append('recStatus', this.formUserList.recStatus);
|
|
|
+ const response = await this.$http.post(`noCar/findCarRec`, formData);
|
|
|
+ if (response.data.code === 0) {
|
|
|
+ this.usertable = response.data.data.records;
|
|
|
+ this.total = response.data.data.total;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async initCompanyList(){
|
|
|
+ const response = await this.$http.post(`lowerService/customeRecQueryList`, {"customerName":sessionStorage.getItem('userName')});
|
|
|
+ if (response.data.code === 0) {
|
|
|
+ this.companyList = response.data.data;
|
|
|
+ }
|
|
|
+ this.companyName = this.companyList[0]['companyName'];
|
|
|
},
|
|
|
//查询
|
|
|
async queryLook() {
|
|
|
- if(this.startTime !== '' || this.endTime !== '') {
|
|
|
- this.startTime = (new Date(this.startTime)).getTime();
|
|
|
- this.endTime = (new Date(this.endTime)).getTime();
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
if(this.formUserList.roleId == 1) {
|
|
|
const formData = new FormData();
|
|
@@ -211,20 +207,12 @@ export default{
|
|
|
// 分页方法
|
|
|
handleSizeChange(val) {
|
|
|
this.pagesize = val;
|
|
|
- if(this.plateNumber !== '' || this.isSuccess !== '') {
|
|
|
- this.queryLook();
|
|
|
- }else{
|
|
|
- this.loadData();
|
|
|
- };
|
|
|
+ this.loadData();
|
|
|
console.log(`每页 ${val} 条`);
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
- this.current = val;
|
|
|
- if(this.plateNumber !== '' || this.isSuccess !== '') {
|
|
|
- this.queryLook();
|
|
|
- }else{
|
|
|
- this.loadData();
|
|
|
- };
|
|
|
+ this.pagesize = val;
|
|
|
+ this.loadData();
|
|
|
console.log(`当前页: ${val}`);
|
|
|
},
|
|
|
|