|  | @@ -1,16 +1,26 @@
 | 
	
		
			
				|  |  |  <template>
 | 
	
		
			
				|  |  |    <div class="mod-carManage app-container">
 | 
	
		
			
				|  |  |      <!--    卡片 视图区域-->
 | 
	
		
			
				|  |  | -    <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
 | 
	
		
			
				|  |  | +    <el-form
 | 
	
		
			
				|  |  | +      :inline="true"
 | 
	
		
			
				|  |  | +      :model="dataForm"
 | 
	
		
			
				|  |  | +      @keyup.enter.native="getDataList()"
 | 
	
		
			
				|  |  | +    >
 | 
	
		
			
				|  |  |        <el-form-item>
 | 
	
		
			
				|  |  | -        <el-input v-model="dataForm.fleetCompanyId" placeholder="车队id" clearable></el-input>
 | 
	
		
			
				|  |  | +        <el-input
 | 
	
		
			
				|  |  | +          v-model="dataForm.fleetCompanyId"
 | 
	
		
			
				|  |  | +          placeholder="车队id"
 | 
	
		
			
				|  |  | +          clearable
 | 
	
		
			
				|  |  | +        ></el-input>
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  |        <el-form-item>
 | 
	
		
			
				|  |  |          <!--        车辆管理添加驾驶员-->
 | 
	
		
			
				|  |  |          <!--车队可以加车辆-->
 | 
	
		
			
				|  |  |          <!--        个人照片改成身份证-->
 | 
	
		
			
				|  |  |          <el-button @click="getDataList()">查询</el-button>
 | 
	
		
			
				|  |  | -        <el-button type="primary" @click="addOrUpdateHandle()">添加车辆</el-button>
 | 
	
		
			
				|  |  | +        <el-button type="primary" @click="addOrUpdateHandle()"
 | 
	
		
			
				|  |  | +          >添加车辆</el-button
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  |          <!--        <el-button v-if="isAuth('fleet:carManage:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>-->
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  |      </el-form>
 | 
	
	
		
			
				|  | @@ -18,7 +28,7 @@
 | 
	
		
			
				|  |  |        :data="dataList"
 | 
	
		
			
				|  |  |        v-loading="dataListLoading"
 | 
	
		
			
				|  |  |        @selection-change="selectionChangeHandle"
 | 
	
		
			
				|  |  | -      style="width: 100%;"
 | 
	
		
			
				|  |  | +      style="width: 100%"
 | 
	
		
			
				|  |  |      >
 | 
	
		
			
				|  |  |        <el-table-column
 | 
	
		
			
				|  |  |          type="selection"
 | 
	
	
		
			
				|  | @@ -37,6 +47,16 @@
 | 
	
		
			
				|  |  |        >
 | 
	
		
			
				|  |  |        </el-table-column>
 | 
	
		
			
				|  |  |        <el-table-column
 | 
	
		
			
				|  |  | +        prop="driverName"
 | 
	
		
			
				|  |  | +        header-align="center"
 | 
	
		
			
				|  |  | +        align="center"
 | 
	
		
			
				|  |  | +        width="120"
 | 
	
		
			
				|  |  | +        :show-overflow-tooltip="true"
 | 
	
		
			
				|  |  | +        label="司机名称"
 | 
	
		
			
				|  |  | +      >
 | 
	
		
			
				|  |  | +      </el-table-column>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      <el-table-column
 | 
	
		
			
				|  |  |          prop="carNum"
 | 
	
		
			
				|  |  |          header-align="center"
 | 
	
		
			
				|  |  |          align="center"
 | 
	
	
		
			
				|  | @@ -214,7 +234,6 @@
 | 
	
		
			
				|  |  |        >
 | 
	
		
			
				|  |  |        </el-table-column>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |        <el-table-column
 | 
	
		
			
				|  |  |          prop="outerSize"
 | 
	
		
			
				|  |  |          header-align="center"
 | 
	
	
		
			
				|  | @@ -256,7 +275,7 @@
 | 
	
		
			
				|  |  |        >
 | 
	
		
			
				|  |  |          <template slot-scope="scope">
 | 
	
		
			
				|  |  |            <span v-if="!scope.row.regiestDate"></span>
 | 
	
		
			
				|  |  | -          <span v-else>{{ scope.row.regiestDate.slice(0,10) }}</span>
 | 
	
		
			
				|  |  | +          <span v-else>{{ scope.row.regiestDate.slice(0, 10) }}</span>
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |        </el-table-column>
 | 
	
		
			
				|  |  |        <el-table-column
 | 
	
	
		
			
				|  | @@ -268,7 +287,7 @@
 | 
	
		
			
				|  |  |        >
 | 
	
		
			
				|  |  |          <template slot-scope="scope">
 | 
	
		
			
				|  |  |            <span v-if="!scope.row.abandonDate"></span>
 | 
	
		
			
				|  |  | -          <span v-else>{{ scope.row.abandonDate.slice(0,10) }}</span>
 | 
	
		
			
				|  |  | +          <span v-else>{{ scope.row.abandonDate.slice(0, 10) }}</span>
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |        </el-table-column>
 | 
	
		
			
				|  |  |        <el-table-column
 | 
	
	
		
			
				|  | @@ -280,7 +299,7 @@
 | 
	
		
			
				|  |  |        >
 | 
	
		
			
				|  |  |          <template slot-scope="scope">
 | 
	
		
			
				|  |  |            <span v-if="!scope.row.creatTime"></span>
 | 
	
		
			
				|  |  | -          <span v-else>{{ scope.row.creatTime.slice(0,10) }}</span>
 | 
	
		
			
				|  |  | +          <span v-else>{{ scope.row.creatTime.slice(0, 10) }}</span>
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |        </el-table-column>
 | 
	
		
			
				|  |  |        <el-table-column
 | 
	
	
		
			
				|  | @@ -290,40 +309,40 @@
 | 
	
		
			
				|  |  |          width="130"
 | 
	
		
			
				|  |  |          label="操作"
 | 
	
		
			
				|  |  |        >
 | 
	
		
			
				|  |  | -<!--        <template slot-scope="scope">-->
 | 
	
		
			
				|  |  | -<!--          <el-tooltip class="item" effect="dark" content="修改" :enterable="false" placement="top">-->
 | 
	
		
			
				|  |  | -<!--            <el-button-->
 | 
	
		
			
				|  |  | -<!--              v-hasPermi="['fleet:carManage:edit']"-->
 | 
	
		
			
				|  |  | -<!--              type="primary"-->
 | 
	
		
			
				|  |  | -<!--              icon="el-icon-edit"-->
 | 
	
		
			
				|  |  | -<!--              content="修改"-->
 | 
	
		
			
				|  |  | -<!--              size="mini"-->
 | 
	
		
			
				|  |  | -<!--              circle @click="addOrUpdateHandle(scope.row)"-->
 | 
	
		
			
				|  |  | -<!--            ></el-button>-->
 | 
	
		
			
				|  |  | -<!--          </el-tooltip>-->
 | 
	
		
			
				|  |  | -<!--          <el-tooltip class="item" effect="dark" content="删除" :enterable="false" placement="top">-->
 | 
	
		
			
				|  |  | -<!--            <el-button v-hasPermi="['fleet:carManage:delete']"-->
 | 
	
		
			
				|  |  | -<!--                       icon="el-icon-delete"-->
 | 
	
		
			
				|  |  | -<!--                       type="danger"-->
 | 
	
		
			
				|  |  | -<!--                       circle-->
 | 
	
		
			
				|  |  | -<!--                       size="mini" @click="deleteHandle(scope.row.Id)"-->
 | 
	
		
			
				|  |  | -<!--            ></el-button>-->
 | 
	
		
			
				|  |  | -<!--          </el-tooltip>-->
 | 
	
		
			
				|  |  | -<!--        </template>-->
 | 
	
		
			
				|  |  | +        <!--        <template slot-scope="scope">-->
 | 
	
		
			
				|  |  | +        <!--          <el-tooltip class="item" effect="dark" content="修改" :enterable="false" placement="top">-->
 | 
	
		
			
				|  |  | +        <!--            <el-button-->
 | 
	
		
			
				|  |  | +        <!--              v-hasPermi="['fleet:carManage:edit']"-->
 | 
	
		
			
				|  |  | +        <!--              type="primary"-->
 | 
	
		
			
				|  |  | +        <!--              icon="el-icon-edit"-->
 | 
	
		
			
				|  |  | +        <!--              content="修改"-->
 | 
	
		
			
				|  |  | +        <!--              size="mini"-->
 | 
	
		
			
				|  |  | +        <!--              circle @click="addOrUpdateHandle(scope.row)"-->
 | 
	
		
			
				|  |  | +        <!--            ></el-button>-->
 | 
	
		
			
				|  |  | +        <!--          </el-tooltip>-->
 | 
	
		
			
				|  |  | +        <!--          <el-tooltip class="item" effect="dark" content="删除" :enterable="false" placement="top">-->
 | 
	
		
			
				|  |  | +        <!--            <el-button v-hasPermi="['fleet:carManage:delete']"-->
 | 
	
		
			
				|  |  | +        <!--                       icon="el-icon-delete"-->
 | 
	
		
			
				|  |  | +        <!--                       type="danger"-->
 | 
	
		
			
				|  |  | +        <!--                       circle-->
 | 
	
		
			
				|  |  | +        <!--                       size="mini" @click="deleteHandle(scope.row.Id)"-->
 | 
	
		
			
				|  |  | +        <!--            ></el-button>-->
 | 
	
		
			
				|  |  | +        <!--          </el-tooltip>-->
 | 
	
		
			
				|  |  | +        <!--        </template>-->
 | 
	
		
			
				|  |  |          <template slot-scope="scope">
 | 
	
		
			
				|  |  |            <el-button
 | 
	
		
			
				|  |  |              size="mini"
 | 
	
		
			
				|  |  |              type="text"
 | 
	
		
			
				|  |  |              icon="el-icon-edit"
 | 
	
		
			
				|  |  |              @click="addOrUpdateHandle(scope.row)"
 | 
	
		
			
				|  |  | -          >查看
 | 
	
		
			
				|  |  | +            >查看
 | 
	
		
			
				|  |  |            </el-button>
 | 
	
		
			
				|  |  |            <el-button
 | 
	
		
			
				|  |  |              size="mini"
 | 
	
		
			
				|  |  |              type="text"
 | 
	
		
			
				|  |  |              icon="el-icon-delete"
 | 
	
		
			
				|  |  |              @click="deleteHandle(scope.row.Id)"
 | 
	
		
			
				|  |  | -          >删除
 | 
	
		
			
				|  |  | +            >删除
 | 
	
		
			
				|  |  |            </el-button>
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |        </el-table-column>
 | 
	
	
		
			
				|  | @@ -339,76 +358,78 @@
 | 
	
		
			
				|  |  |      >
 | 
	
		
			
				|  |  |      </el-pagination>
 | 
	
		
			
				|  |  |      <!-- 弹窗, 新增 / 修改 -->
 | 
	
		
			
				|  |  | -    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" :dataForm="editModel"
 | 
	
		
			
				|  |  | +    <add-or-update
 | 
	
		
			
				|  |  | +      v-if="addOrUpdateVisible"
 | 
	
		
			
				|  |  | +      ref="addOrUpdate"
 | 
	
		
			
				|  |  | +      @refreshDataList="getDataList"
 | 
	
		
			
				|  |  | +      :dataForm="editModel"
 | 
	
		
			
				|  |  |      ></add-or-update>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  | -import { listFtmsorderbills ,deleted} from '@/api/fleet/carManage'
 | 
	
		
			
				|  |  | -import AddOrUpdate from './carManage-add-or-update'
 | 
	
		
			
				|  |  | +import { listFtmsorderbills, deleted } from "@/api/fleet/carManage";
 | 
	
		
			
				|  |  | +import AddOrUpdate from "./carManage-add-or-update";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  |        dataForm: {
 | 
	
		
			
				|  |  |          pageNum: 1,
 | 
	
		
			
				|  |  | -        pageSize: 10
 | 
	
		
			
				|  |  | +        pageSize: 10,
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        editModel: {},
 | 
	
		
			
				|  |  |        dataList: [],
 | 
	
		
			
				|  |  |        totalPage: 0,
 | 
	
		
			
				|  |  |        dataListLoading: false,
 | 
	
		
			
				|  |  |        dataListSelections: [],
 | 
	
		
			
				|  |  | -      addOrUpdateVisible: false
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +      addOrUpdateVisible: false,
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    components: {
 | 
	
		
			
				|  |  | -    AddOrUpdate
 | 
	
		
			
				|  |  | +    AddOrUpdate,
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    activated() {
 | 
	
		
			
				|  |  | -    this.getDataList()
 | 
	
		
			
				|  |  | +    this.getDataList();
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  |      // 获取数据列表
 | 
	
		
			
				|  |  |      getDataList() {
 | 
	
		
			
				|  |  | -      this.dataListLoading = false
 | 
	
		
			
				|  |  | -      listFtmsorderbills(this.dataForm).then(data => {
 | 
	
		
			
				|  |  | -        console.log(data)
 | 
	
		
			
				|  |  | +      this.dataListLoading = false;
 | 
	
		
			
				|  |  | +      listFtmsorderbills(this.dataForm).then((data) => {
 | 
	
		
			
				|  |  | +        console.log(data);
 | 
	
		
			
				|  |  |          if (data && data.code === 200) {
 | 
	
		
			
				|  |  | -          this.dataList = data.rows
 | 
	
		
			
				|  |  | -          this.totalPage = data.total
 | 
	
		
			
				|  |  | +          this.dataList = data.rows;
 | 
	
		
			
				|  |  | +          this.totalPage = data.total;
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  | -          this.dataList = []
 | 
	
		
			
				|  |  | -          this.totalPage = 0
 | 
	
		
			
				|  |  | +          this.dataList = [];
 | 
	
		
			
				|  |  | +          this.totalPage = 0;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        this.dataListLoading = false
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +        this.dataListLoading = false;
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      // 每页数
 | 
	
		
			
				|  |  |      sizeChangeHandle(val) {
 | 
	
		
			
				|  |  | -      this.dataForm.pageSize = val
 | 
	
		
			
				|  |  | -      console.log(val)
 | 
	
		
			
				|  |  | -      this.pageIndex = 1
 | 
	
		
			
				|  |  | -      this.getDataList()
 | 
	
		
			
				|  |  | +      this.dataForm.pageSize = val;
 | 
	
		
			
				|  |  | +      console.log(val);
 | 
	
		
			
				|  |  | +      this.pageIndex = 1;
 | 
	
		
			
				|  |  | +      this.getDataList();
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      // 当前页
 | 
	
		
			
				|  |  |      currentChangeHandle(val) {
 | 
	
		
			
				|  |  | -      console.log(val)
 | 
	
		
			
				|  |  | -      this.dataForm.pageNum = val
 | 
	
		
			
				|  |  | -      this.getDataList()
 | 
	
		
			
				|  |  | +      console.log(val);
 | 
	
		
			
				|  |  | +      this.dataForm.pageNum = val;
 | 
	
		
			
				|  |  | +      this.getDataList();
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      // 多选
 | 
	
		
			
				|  |  |      selectionChangeHandle(val) {
 | 
	
		
			
				|  |  | -      this.dataListSelections = val
 | 
	
		
			
				|  |  | +      this.dataListSelections = val;
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      // 新增 / 修改
 | 
	
		
			
				|  |  |      addOrUpdateHandle(row) {
 | 
	
		
			
				|  |  | -      this.addOrUpdateVisible = true
 | 
	
		
			
				|  |  | +      this.addOrUpdateVisible = true;
 | 
	
		
			
				|  |  |        if (row) {
 | 
	
		
			
				|  |  | -        this.editModel = row
 | 
	
		
			
				|  |  | +        this.editModel = row;
 | 
	
		
			
				|  |  |        } else {
 | 
	
		
			
				|  |  |          this.editModel = {
 | 
	
		
			
				|  |  |            id: null,
 | 
	
	
		
			
				|  | @@ -444,40 +465,51 @@ export default {
 | 
	
		
			
				|  |  |            businessInsuranceSrc: null,
 | 
	
		
			
				|  |  |            accpetCarrageInsuranceSrc: null,
 | 
	
		
			
				|  |  |            creatTime: null,
 | 
	
		
			
				|  |  | -          modificationTime: null
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | +          modificationTime: null,
 | 
	
		
			
				|  |  | +        };
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        this.$nextTick(() => {
 | 
	
		
			
				|  |  | -        this.$refs.addOrUpdate.init()
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | +        this.$refs.addOrUpdate.init();
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      // 删除
 | 
	
		
			
				|  |  |      deleteHandle(id) {
 | 
	
		
			
				|  |  | -      let carManageIds = [id ? [id] : this.dataListSelections.map(item => {
 | 
	
		
			
				|  |  | -        return item.userId
 | 
	
		
			
				|  |  | -      })]
 | 
	
		
			
				|  |  | -      this.$confirm(`确定对[id=${carManageIds.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
 | 
	
		
			
				|  |  | -        confirmButtonText: '确定',
 | 
	
		
			
				|  |  | -        cancelButtonText: '取消',
 | 
	
		
			
				|  |  | -        type: 'warning'
 | 
	
		
			
				|  |  | -      }).then(() => {
 | 
	
		
			
				|  |  | -        deleted(carManageIds).then(data=>{
 | 
	
		
			
				|  |  | -          if (data && data.code === 200) {
 | 
	
		
			
				|  |  | -            this.$message({
 | 
	
		
			
				|  |  | -              message: '操作成功',
 | 
	
		
			
				|  |  | -              type: 'success',
 | 
	
		
			
				|  |  | -              duration: 1500,
 | 
	
		
			
				|  |  | -              onClose: () => {
 | 
	
		
			
				|  |  | -                this.getDataList()
 | 
	
		
			
				|  |  | -              }
 | 
	
		
			
				|  |  | -            })
 | 
	
		
			
				|  |  | -          } else {
 | 
	
		
			
				|  |  | -            this.$message.error(data.msg)
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | +      let carManageIds = [
 | 
	
		
			
				|  |  | +        id
 | 
	
		
			
				|  |  | +          ? [id]
 | 
	
		
			
				|  |  | +          : this.dataListSelections.map((item) => {
 | 
	
		
			
				|  |  | +              return item.userId;
 | 
	
		
			
				|  |  | +            }),
 | 
	
		
			
				|  |  | +      ];
 | 
	
		
			
				|  |  | +      this.$confirm(
 | 
	
		
			
				|  |  | +        `确定对[id=${carManageIds.join(",")}]进行[${
 | 
	
		
			
				|  |  | +          id ? "删除" : "批量删除"
 | 
	
		
			
				|  |  | +        }]操作?`,
 | 
	
		
			
				|  |  | +        "提示",
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +          confirmButtonText: "确定",
 | 
	
		
			
				|  |  | +          cancelButtonText: "取消",
 | 
	
		
			
				|  |  | +          type: "warning",
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      )
 | 
	
		
			
				|  |  | +        .then(() => {
 | 
	
		
			
				|  |  | +          deleted(carManageIds).then((data) => {
 | 
	
		
			
				|  |  | +            if (data && data.code === 200) {
 | 
	
		
			
				|  |  | +              this.$message({
 | 
	
		
			
				|  |  | +                message: "操作成功",
 | 
	
		
			
				|  |  | +                type: "success",
 | 
	
		
			
				|  |  | +                duration: 1500,
 | 
	
		
			
				|  |  | +                onClose: () => {
 | 
	
		
			
				|  |  | +                  this.getDataList();
 | 
	
		
			
				|  |  | +                },
 | 
	
		
			
				|  |  | +              });
 | 
	
		
			
				|  |  | +            } else {
 | 
	
		
			
				|  |  | +              this.$message.error(data.msg);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  | -      }).catch(() => {
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -  }
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | +        .catch(() => {});
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  |  </script>
 |