bug
zhangzeli
2022-01-11 80e514ca619fbb1fdc1559db4e97f24d61c68b46
src/views/your/car-manage/carManage.vue
@@ -83,13 +83,18 @@
        <FormItem label="加油卡号" prop="addOilCode">
          <Input v-model="carForm.addOilCode" />
        </FormItem>
        <FormItem label="车辆编号" prop="code">
          <Input v-model="carForm.code" />
        </FormItem>
        <FormItem label="司机" prop="userId">
          <Select v-model="carForm.userId" filterable>
            <Option :value="0">请选择</Option>
            <Option v-for="item in userList" :value="item.id" :key="item.id">{{ item.nickname }}</Option>
          </Select>
        </FormItem>
        <FormItem label="配送员" prop="followUserId">
          <Select v-model="carForm.followUserId" filterable>
            <Option :value="0" :key="0">请选择</Option>
            <Option v-for="item in driverList" :value="item.id" :key="item.id">{{ item.nickname }}</Option>
          </Select>
        </FormItem>
@@ -383,6 +388,15 @@
          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);
          }
        },
        {
@@ -755,6 +769,12 @@
      this.roleModalVisible = false;
    },
    submitCar() {
      if(this.carForm.userId==undefined || this.carForm.userId==0){
        this.carForm.userId="";
      }
      if(this.carForm.followUserId==undefined || this.carForm.followUserId==0){
        this.carForm.followUserId="";
      }
      this.carForm.buyYear = this.buyYear;
      this.$refs.carForm.validate((valid) => {
        if (valid) {
@@ -839,6 +859,7 @@
      this.equipmentVisible = true;
    },
    addCar() {
      this.carForm={};
      this.getAllUser();
      this.modalType = 0;
      this.modalTitle = "添加车辆";