2545307760@qq.com před 4 měsíci
rodič
revize
e4a3cfa46a

+ 3 - 2
web/src/api/guardBooth.js

@@ -34,10 +34,11 @@ export const obtainGuardBoothCode = (code) => {
 }
 
 // 获取岗亭列表
-export const obtainGuardBoothList = () => {
+export const obtainGuardBoothList = (params) => {
     return service({
         url: '/parking/booth/list',
-        method: 'get'
+        method: 'get',
+        params
     })
 }
 

+ 1 - 0
web/src/view/parking/carInfo.vue

@@ -254,6 +254,7 @@ const handleCurrentChange = (data) => {
 
 const handleSizeChange = (data) => {
   infoSearchData.page_size = data
+  infoSearchData.page = 1
   getCarInfoList()
 }
 

+ 52 - 20
web/src/view/parking/carOwner.vue

@@ -2,17 +2,22 @@
   <div>
     <el-form inline>
       <el-form-item>
-        <el-input placeholder="请输入手机号" v-model="mobilePhone">
-          <template #append>
-            <el-button @click="phoneCarOwnerList">搜索</el-button>
-          </template>
-        </el-input>
+        <el-input placeholder="请输入手机号" v-model="obtainData.owner_phone" />
       </el-form-item>
       <el-form-item>
-        <el-button icon="Plus" @click="openCarOwner('新增车主','')">新增</el-button>
+        <el-input placeholder="请输入车主名称" v-model="obtainData.owner_name"></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-select placeholder="是否是vip" v-model="obtainData.is_vip" @change="changeVip">
+          <el-option label="未成为vip" :value="false"></el-option>
+          <el-option label="已成为vip" :value="true"></el-option>
+        </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button icon="Edit">编辑</el-button>
+        <el-button type="primary" icon="Search" @click="getCarOwnerList">搜索</el-button>
+      </el-form-item>
+      <el-form-item>
+        <el-button icon="Plus" @click="openCarOwner('新增车主','')">新增</el-button>
       </el-form-item>
       <el-form-item>
         <el-button icon="Delete">删除</el-button>
@@ -33,7 +38,7 @@
         <el-button icon="ChatLineRound">其他</el-button>
       </el-form-item>
     </el-form>
-    <el-table :data="carOwnerList">
+    <el-table :data="carOwnerList" height="605">
       <el-table-column label="名字" align="center" width="180" prop="owner_name"></el-table-column>
       <el-table-column label="姓氏" align="center" width="180" prop="owner_surname"></el-table-column>
       <el-table-column label="手机" align="center" prop="owner_phone"></el-table-column>
@@ -56,6 +61,18 @@
         </template>
       </el-table-column>
     </el-table>
+    <div style="width: 100%;display: flex;justify-content: end">
+      <el-pagination
+          :current-page="obtainData.page"
+          :page-size="obtainData.pageSize"
+          :page-sizes="[10, 30, 50, 100]"
+          :total="carOwnerTotal"
+          layout="total, sizes, prev, pager, next, jumper"
+          @current-change="handleCurrentChange"
+          @size-change="handleSizeChange"
+          style="padding-right: 10px"
+      />
+    </div>
     <el-dialog v-model="carOwnerShow" :title="carOwnerTitle" width="650">
       <el-form label-width="100" size="large">
         <el-form-item label="名称:">
@@ -90,7 +107,7 @@
 </template>
 
 <script setup>
-import { obtainCarOwnerList, addCarOwner, editCarOwner, removeCarOwner, carOwnerInfoPhone } from '@/api/carOwner'
+import { obtainCarOwnerList, addCarOwner, editCarOwner, removeCarOwner } from '@/api/carOwner'
 import { onMounted, reactive, ref } from 'vue'
 import { ElMessage, ElMessageBox } from 'element-plus'
 import {deleteGuardBooth} from "@/api/guardBooth";
@@ -105,11 +122,36 @@ const carOwnerData = reactive({
   is_vip: false,
   vip_expire_time: ''
 })
+const changeVip = (val) => {
+  obtainData.is_vip = val
+  getCarOwnerList()
+}
+const obtainData = reactive({
+  owner_name: '',
+  owner_phone: '',
+  is_vip: false,
+  page: 1,
+  pageSize: 10
+})
+
+const carOwnerTotal = ref(0)
+
+const handleCurrentChange = (val) => {
+  obtainData.page = val
+  getCarOwnerList()
+}
+
+const handleSizeChange = (val) => {
+  obtainData.pageSize = val
+  obtainData.page = 1
+  getCarOwnerList()
+}
 const getCarOwnerList = () => {
-  obtainCarOwnerList().then(res => {
+  obtainCarOwnerList(obtainData).then(res => {
     if (res.code === 0) {
       carOwnerList.length = 0
       carOwnerList.push(...res.data.list)
+      carOwnerTotal.value = res.data.total
     }
   })
 }
@@ -191,16 +233,6 @@ const carOwnerOperation = async () => {
   }
 }
 
-const mobilePhone = ref('')
-
-const phoneCarOwnerList = () => {
-  carOwnerInfoPhone(mobilePhone.value).then(res => {
-    if (res.code === 0) {
-      carOwnerList.length = 0
-      carOwnerList.push(...res.data)
-    }
-  })
-}
 onMounted(() => {
   getCarOwnerList()
 })

+ 15 - 0
web/src/view/parking/parkingInfo.vue

@@ -71,6 +71,18 @@
               </template>
             </el-table-column>
           </el-table>
+          <div style="width: 100%;display: flex;justify-content: end">
+<!--            <el-pagination-->
+<!--                :current-page="obtainData.page"-->
+<!--                :page-size="obtainData.pageSize"-->
+<!--                :page-sizes="[10, 30, 50, 100]"-->
+<!--                :total="carOwnerTotal"-->
+<!--                layout="total, sizes, prev, pager, next, jumper"-->
+<!--                @current-change="handleCurrentChange"-->
+<!--                @size-change="handleSizeChange"-->
+<!--                style="padding-right: 10px"-->
+<!--            />-->
+          </div>
         </el-tab-pane>
         <el-tab-pane
             label="通道"
@@ -307,6 +319,9 @@ const openPosition = (head,data) => {
     positionData.booth_name = ''
   }
 }
+const searchGuardBooth = reactive({
+
+})
 const getGuardBoothList = () => {
   obtainGuardBoothList().then(res => {
     if (res.code === 0) {

+ 44 - 10
web/src/view/parking/pricing.vue

@@ -2,17 +2,16 @@
   <div>
     <el-form inline>
       <el-form-item>
-        <el-input>
-          <template #append>
-            <el-button>搜索</el-button>
-          </template>
-        </el-input>
+        <el-input placeholder="请输入车辆类型" v-model="getPricingData.vehicle_type" />
       </el-form-item>
       <el-form-item>
-        <el-button icon="Plus" @click="openPricing('新增收费配置','')">新增</el-button>
+        <el-button type="primary" icon="Search" @click="getPricingList">搜索</el-button>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="Plus" @click="openPricing('新增收费配置','')">新增</el-button>
       </el-form-item>
     </el-form>
-    <el-table :data="pricingList">
+    <el-table :data="pricingList" height="605">
       <el-table-column label="车辆类型" align="center" width="180" prop="vehicle_type"></el-table-column>
       <el-table-column label="初始费用" align="center" width="180" prop="start_fee"></el-table-column>
       <el-table-column label="单位费用" align="center" width="180" prop="unit_fee"></el-table-column>
@@ -27,12 +26,26 @@
       <el-table-column label="vip折扣" align="center" width="180" prop="vip_discount"></el-table-column>
       <el-table-column label="操作" align="center">
         <template #default="scope">
-          <el-button text type="primary" icon="MessageBox">备注</el-button>
-          <el-button @click="openPricing('编辑车费配置', scope.row)" icon="edit" text type="primary">编辑</el-button>
+          <el-tooltip :content="scope.row.description" placement="top" effect="light">
+            <el-button text type="primary" icon="MessageBox">备注</el-button>
+          </el-tooltip>
+          <el-button @click="openPricing('编辑收费配置', scope.row)" icon="edit" text type="primary">编辑</el-button>
           <el-button @click="deletePricing(scope.row)" icon="delete" text type="primary">删除</el-button>
         </template>
       </el-table-column>
     </el-table>
+    <div style="width: 100%;display: flex;justify-content: end">
+      <el-pagination
+          :current-page="getPricingData.page"
+          :page-size="getPricingData.page_size"
+          :page-sizes="[10, 30, 50, 100]"
+          :total="pricingTotal"
+          layout="total, sizes, prev, pager, next, jumper"
+          @current-change="handleCurrentChange"
+          @size-change="handleSizeChange"
+          style="padding-right: 10px"
+      />
+    </div>
     <el-dialog v-model="pricingShow" :title="pricingTitle" width="650">
       <el-form label-width="120" size="large">
         <el-form-item label="车辆类型:">
@@ -80,6 +93,7 @@
         <el-button @click="pricingOperation" type="primary" size="large">确认</el-button>
       </template>
     </el-dialog>
+
   </div>
 </template>
 
@@ -102,11 +116,30 @@ const pricingData = reactive({
   vip_discount: 0,
   description: ''
 })
+const pricingTotal = ref(0)
+
+const getPricingData = reactive({
+  vehicle_type: '',
+  page: 1,
+  page_size: 10
+})
+
+const handleCurrentChange = (val) => {
+  getPricingData.page = val
+  getPricingList()
+}
+
+const handleSizeChange = (val) => {
+  getPricingData.page_size = val
+  getPricingList()
+}
 const getPricingList = () => {
-  obtainPricingList().then(res => {
+  obtainPricingList(getPricingData).then(res => {
     if (res.code === 0) {
+      console.log('收费数据', res.data)
       pricingList.length = 0
       pricingList.push(...res.data.list)
+      pricingTotal.value = res.data.total
     }
   })
 }
@@ -159,6 +192,7 @@ const openPricing = (head, data) => {
     pricingData.is_vip_free = false
     pricingData.description = ''
   } else {
+    pricingData.id = data.ID
     pricingData.vehicle_type = data.vehicle_type
     pricingData.start_time = data.start_time
     pricingData.start_fee = data.start_fee

+ 1 - 0
web/src/view/report/enter.vue

@@ -128,6 +128,7 @@ const handleCurrentChange = (data) => {
 
 const handleSizeChange = (data) => {
   enterCondition.page_size = data
+  enterCondition.page = 1
   getEnterList()
 }