From f51896f6358a60ab83456358446ac48085b48298 Mon Sep 17 00:00:00 2001
From: zhangxiaoxu123 <819527061@qq.com>
Date: 星期五, 05 五月 2023 09:49:11 +0800
Subject: [PATCH] 登录页面修改

---
 src/views/your/addOil-manage/addOilManage.vue |  130 ++++++++++++++++++++++++++++++-------------
 1 files changed, 90 insertions(+), 40 deletions(-)

diff --git a/src/views/your/addOil-manage/addOilManage.vue b/src/views/your/addOil-manage/addOilManage.vue
index e96119f..62983b1 100644
--- a/src/views/your/addOil-manage/addOilManage.vue
+++ b/src/views/your/addOil-manage/addOilManage.vue
@@ -8,15 +8,14 @@
     <Card>
       <Row class="operation">
         <Button @click="addOil" type="primary" icon="md-add">娣诲姞鍔犳补璁板綍</Button>
-        <Button @click="delAll" icon="md-trash">鎵归噺鍒犻櫎</Button>
         <Button @click="init" icon="md-refresh">鍒锋柊</Button>
         <Button type="dashed" @click="openTip = !openTip">{{
           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"
@@ -66,29 +65,54 @@
               :label-width="80"
               :rules="addOilFormValidate"
       >
-        <FormItem label="杞﹁締" prop="carId">
-            <Select v-model="addOilForm.carId" filterable>
-              <Option v-for="item in carList" :value="item.id">{{ item.carNo }}</Option>
-            </Select>
-        </FormItem>
-        <Form-item label="鍔犳补鏃ユ湡" prop="addDate">
-          <Row>
-            <Col span="11">
+        <Row :gutter="0">
+          <Col span="12">
+            <FormItem label="杞﹁締" prop="carId">
+              <Select v-model="addOilForm.carId" filterable>
+                <Option v-for="item in carList" :value="item.id">{{ item.carNo }}</Option>
+              </Select>
+            </FormItem>
+          </Col>
+          <Col span="12">
+            <Form-item label="鍔犳补鏃ユ湡" prop="addDate">
               <Date-picker @on-change="change1" type="date" value="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" v-model="addOilForm.addDate"></Date-picker>
-            </Col>
-          </Row>
-        </Form-item>
-        <FormItem label="鍔犳补閲�" prop="amount">
-          <Input v-model="addOilForm.amount" type="number"/>
-        </FormItem>
-        <FormItem label="鍗曚环" prop="unitPrice">
-          <Input v-model="addOilForm.unitPrice" type="number"/>
-        </FormItem>
-        <FormItem label="鍔犳补閲戦" prop="money">
-          <Input v-model="addOilForm.money" type="number"/>
-        </FormItem>
-        <FormItem label="鍔犳补鏃堕噷绋�" prop="mileage">
-          <Input v-model="addOilForm.mileage" type="number"/>
+            </Form-item>
+          </Col>
+        </Row>
+        <Row :gutter="0">
+          <Col span="12">
+            <FormItem label="鍔犳补閲�" prop="amount">
+              <Input v-model="addOilForm.amount" type="number">
+                <span slot="append">鍗�</span>
+              </Input>
+            </FormItem>
+          </Col>
+          <Col span="12">
+            <FormItem label="鍗曚环" prop="unitPrice">
+              <Input v-model="addOilForm.unitPrice" type="number">
+                <span slot="append">鍏�</span>
+              </Input>
+            </FormItem>
+          </Col>
+        </Row>
+        <Row :gutter="0">
+          <Col span="12">
+            <FormItem label="鍔犳补閲戦" prop="money">
+              <Input v-model="addOilForm.money" type="number">
+                <span slot="append">鍏�</span>
+              </Input>
+            </FormItem>
+          </Col>
+          <Col span="12">
+            <FormItem label="閲岀▼" prop="mileage">
+              <Input v-model="addOilForm.mileage" type="number">
+                <span slot="append">鍏噷</span>
+              </Input>
+            </FormItem>
+          </Col>
+        </Row>
+        <FormItem label="鍔犳补鍗″彿" prop="addOilCode">
+          <Input v-model="addOilForm.addOilCode" />
         </FormItem>
         <FormItem label="澶囨敞" prop="remarks">
           <Input v-model="addOilForm.remarks" />
@@ -231,6 +255,14 @@
           order: "desc", // 榛樿鎺掑簭鏂瑰紡
           key: "",
         },
+        searchForm2: {
+          // 鎼滅储妗嗗垵濮嬪寲瀵硅薄
+          pageNumber: 1, // 褰撳墠椤垫暟
+          pageSize: 10, // 椤甸潰澶у皬
+          sort: "createTime", // 榛樿鎺掑簭瀛楁
+          order: "desc", // 榛樿鎺掑簭鏂瑰紡
+          key: "",
+        },
         addOilForm: {
           status : 0
         },
@@ -258,13 +290,18 @@
           {
             title: "杞︾墝鍙�",
             key: "carNo",
-            width: 100,
+            width: 120,
             sortable: true,
+          },
+          {
+            title: "鍔犳补鍗″彿",
+            key: "addOilCode",
+            width: 140,
           },
           {
             title: "鍔犳补鏃ユ湡",
             key: "addDate",
-            width: 150,
+            width: 120,
             sortable: true,
           },
           {
@@ -282,19 +319,22 @@
           {
             title: "鍔犳补閲戦",
             key: "money",
-            minWidth: 100,
+            minWidth: 120,
             sortable: true,
           },
           {
             title: "鍔犳补鏃堕噷绋�",
             key: "mileage",
-            minWidth: 100,
+            minWidth: 130,
             sortable: true,
           },
           {
             title: "澶囨敞",
             key: "remarks",
-            minWidth: 150,
+            width: 150,
+            render: (h, params) => {
+              return h("div",params.row.remarks=="undefined" ? '':params.row.remarks);
+            }
           },
           {
             title: "鎿嶄綔",
@@ -304,15 +344,15 @@
             render: (h, params) => {
               return h("div", [
                 h(
-                        "a",
-                        {
-                          on: {
-                            click: () => {
-                              this.edit(params.row);
-                            },
-                          },
-                        },
-                        "缂栬緫"
+                  "a",
+                  {
+                    on: {
+                      click: () => {
+                        this.edit(params.row);
+                      },
+                    },
+                  },
+                  "缂栬緫"
                 ),
                 h("Divider", {
                   props: {
@@ -421,6 +461,16 @@
       getDataList() {
         this.loading = true;
         getAddOilList(this.searchForm).then((res) => {
+          this.loading = false;
+          if (res.success) {
+            this.data = res.result.records;
+            this.total = res.result.total;
+          }
+        });
+      },
+      getDataList2() {
+        this.loading = true;
+        getAddOilList(this.searchForm2).then((res) => {
           this.loading = false;
           if (res.success) {
             this.data = res.result.records;
@@ -846,4 +896,4 @@
       this.init();
     },
   };
-</script>
\ No newline at end of file
+</script>

--
Gitblit v1.9.1