From 6622c8891d03e71d3dc75c2de97308ca71552786 Mon Sep 17 00:00:00 2001
From: zhangzeli <123456>
Date: 星期三, 09 二月 2022 13:52:45 +0800
Subject: [PATCH] bug

---
 src/views/your/car-manage/carManage.vue |   55 ++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 40 insertions(+), 15 deletions(-)

diff --git a/src/views/your/car-manage/carManage.vue b/src/views/your/car-manage/carManage.vue
index aa41752..4164143 100644
--- a/src/views/your/car-manage/carManage.vue
+++ b/src/views/your/car-manage/carManage.vue
@@ -81,15 +81,20 @@
           <Input v-model="carForm.carNo" />
         </FormItem>
         <FormItem label="鍔犳补鍗″彿" prop="addOilCode">
-          <Input v-model="carForm.addOilCode" type="number"/>
+          <Input v-model="carForm.addOilCode" />
         </FormItem>
-        <FormItem label="椹鹃┒浜�" prop="userId">
+        <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">
+        <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>
@@ -114,7 +119,7 @@
     </Modal>
     <Modal :title="modalTitle" v-model="addEquipmentVisible" :mask-closable="false" :width="500">
       <Form ref="equipmentForm" :model="equipmentForm" :label-width="80" :rules="equipmentFormValidate">
-        <FormItem label="璁惧" prop="type">
+        <FormItem label="璁惧绫诲瀷" prop="type">
           <Select v-model="equipmentForm.type">
             <Option :value="0">杞︽満</Option>
             <Option :value="1">鎽勫儚鏈�</Option>
@@ -122,10 +127,10 @@
             <Option :value="3">pad</Option>
           </Select>
         </FormItem>
-        <FormItem label="璁惧" prop="status">
+        <FormItem label="鐘舵��" prop="status">
           <Select v-model="equipmentForm.status">
             <Option :value="0">姝e父</Option>
-            <Option :value="1">鍋滅敤</Option>
+            <Option :value="1">寮傚父</Option>
           </Select>
         </FormItem>
         <FormItem label="缂栧彿" prop="code">
@@ -352,12 +357,12 @@
           sortable: true,
         },
         {
-          title: "椹鹃┒浜�",
+          title: "鍙告満",
           key: "nickName",
           width: 100,
         },
         {
-          title: "璺熻溅浜�",
+          title: "閰嶉�佸憳",
           key: "followNickName",
           width: 100,
         },
@@ -375,7 +380,24 @@
           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: "璐疆骞翠唤",
@@ -384,9 +406,9 @@
           sortable: true,
         },
         {
-          title: "鍔犳补鍗″彿",
-          key: "addOilCode",
-          minWidth: 120,
+          title: "鐧昏鏃ユ湡",
+          key: "createTime",
+          minWidth: 180,
           sortable: true,
         },
         {
@@ -747,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) {
@@ -759,7 +787,6 @@
                 this.$Message.success("鎿嶄綔鎴愬姛");
                 this.getDataList();
                 this.roleModalVisible = false;
-                this.carForm={};
               }
             });
           } else {
@@ -770,7 +797,6 @@
                 this.$Message.success("鎿嶄綔鎴愬姛");
                 this.getDataList();
                 this.roleModalVisible = false;
-                this.carForm={};
               }
             });
           }
@@ -791,7 +817,6 @@
                 this.getEquipmentList(this.carId);
                 this.addEquipmentVisible = false;
                 this.getEquipmentList(this.carId);
-                this.equipmentForm={};
               }
             });
           } else {
@@ -802,7 +827,6 @@
                 this.$Message.success("鎿嶄綔鎴愬姛");
                 this.getEquipmentList(this.carId);
                 this.addEquipmentVisible = false;
-                this.equipmentForm={};
               }
             });
           }
@@ -835,6 +859,7 @@
       this.equipmentVisible = true;
     },
     addCar() {
+      this.carForm={};
       this.getAllUser();
       this.modalType = 0;
       this.modalTitle = "娣诲姞杞﹁締";

--
Gitblit v1.9.1