kongdeqiang
2023-03-14 a0654f2c21511a0e16b977427a563a3ccdfd1fba
src/views/your/car-manage/carManage.vue
@@ -13,9 +13,9 @@
          openTip ? "关闭提示" : "开启提示"
        }}</Button>
        <Input
          v-model="searchForm.carNo"
          v-model="searchForm2.carNo"
          suffix="ios-search"
          @on-change="getDataList"
          @on-change="getDataList2"
          placeholder="输入车牌号搜索"
          clearable
          style="width: 250px"
@@ -286,6 +286,14 @@
        order: "desc", // 默认排序方式
        key: "",
      },
      searchForm2: {
        // 搜索框初始化对象
        pageNumber: 1, // 当前页数
        pageSize: 10, // 页面大小
        sort: "createTime", // 默认排序字段
        order: "desc", // 默认排序方式
        key: "",
      },
      carForm: {
        status : 0
      },
@@ -323,6 +331,61 @@
          sortable: true,
        },
        {
          title: "司机",
          key: "nickName",
          width: 100,
        },
        {
          title: "配送员",
          key: "followNickName",
          width: 100,
        },
        {
          title: "品牌",
          key: "brand",
          width: 100,
        },
        {
          title: "型号",
          key: "model",
          width: 100,
        },
        {
          title: "排量",
          key: "displacement",
          width: 100,
        },
        {
          title: "加油卡号",
          key: "addOilCode",
          minWidth: 120,
          // sortable: true,
          render: (h, params) => {
            return h("div",params.row.addOilCode=="undefined" ? '':params.row.addOilCode);
          }
        },
        {
          title: "编号",
          key: "code",
          minWidth: 120,
          tooltip:true,
          // render: (h, params) => {
          //   return h("div",params.row.code=="undefined" ? '':params.row.code);
          // }
        },
        {
          title: "购置年份",
          key: "buyYear",
          minWidth: 120,
          sortable: true,
        },
        {
          title: "登记日期",
          key: "createTime",
          minWidth: 180,
          sortable: true,
        },
        {
          title: "状态",
          key: "status",
          width: 100,
@@ -354,61 +417,6 @@
          title: "移除原因",
          key: "removeReason",
          width: 170,
          sortable: true,
        },
        {
          title: "司机",
          key: "nickName",
          width: 100,
        },
        {
          title: "配送员",
          key: "followNickName",
          width: 100,
        },
        {
          title: "品牌",
          key: "brand",
          width: 100,
        },
        {
          title: "型号",
          key: "model",
          width: 100,
        },
        {
          title: "排量",
          key: "displacement",
          width: 100,
        },
        {
          title: "加油卡号",
          key: "addOilCode",
          minWidth: 120,
          sortable: true,
          render: (h, params) => {
            return h("div",params.row.addOilCode=="undefined" ? '':params.row.addOilCode);
          }
        },
        {
          title: "编号",
          key: "code",
          minWidth: 120,
          sortable: true,
          render: (h, params) => {
            return h("div",params.row.code=="undefined" ? '':params.row.code);
          }
        },
        {
          title: "购置年份",
          key: "buyYear",
          minWidth: 120,
          sortable: true,
        },
        {
          title: "登记日期",
          key: "createTime",
          minWidth: 180,
          sortable: true,
        },
        {
@@ -731,10 +739,20 @@
        }
      });
    },
    getDataList2() {
      this.loading = true;
      getCarList(this.searchForm2).then((res) => {
        this.loading = false;
        if (res.success) {
          this.data = res.result.records;
          this.total = res.result.total;
        }
      });
    },
    getEquipmentList(carId) {
      this.loading = true;
      this.searchForm.carId=carId;
      getEquipment(this.searchForm).then((res) => {
      this.searchForm2.carId=carId;
      getEquipment(this.searchForm2).then((res) => {
        this.loading = false;
        if (res.success) {
          this.data2 = res.result.records;
@@ -1236,4 +1254,4 @@
    this.init();
  },
};
</script>
</script>