From 76a2cda5327be91041903b491ee729707e2004c1 Mon Sep 17 00:00:00 2001
From: hdy <1105738590@qq.com>
Date: 星期三, 12 二月 2025 10:36:56 +0800
Subject: [PATCH] 过站采集页面新增

---
 billion-ui/src/views/main/da/stationCollection/index.vue                                        |  303 +++++++++++++++++++++
 billion-main/src/main/java/com/billion/main/da/service/IDaStationCollectionService.java         |   63 ++++
 billion-ui/src/api/main/da/stationCollection.js                                                 |   44 +++
 billion-main/src/main/java/com/billion/main/da/service/impl/DaStationCollectionServiceImpl.java |   95 ++++++
 billion-main/src/main/resources/mapper/da/DaStationCollectionMapper.xml                         |   81 +++++
 billion-main/src/main/java/com/billion/main/da/controller/DaStationCollectionController.java    |   98 +++++++
 billion-main/src/main/java/com/billion/main/da/mapper/DaStationCollectionMapper.java            |   63 ++++
 billion-main/src/main/java/com/billion/main/da/domain/DaStationCollection.java                  |   52 +++
 8 files changed, 799 insertions(+), 0 deletions(-)

diff --git a/billion-main/src/main/java/com/billion/main/da/controller/DaStationCollectionController.java b/billion-main/src/main/java/com/billion/main/da/controller/DaStationCollectionController.java
new file mode 100644
index 0000000..dae407a
--- /dev/null
+++ b/billion-main/src/main/java/com/billion/main/da/controller/DaStationCollectionController.java
@@ -0,0 +1,98 @@
+package com.billion.main.da.controller;
+
+import com.billion.common.annotation.Log;
+import com.billion.common.core.controller.BaseController;
+import com.billion.common.core.domain.AjaxResult;
+import com.billion.common.core.page.TableDataInfo;
+import com.billion.common.enums.BusinessType;
+import com.billion.common.utils.poi.ExcelUtil;
+import com.billion.main.da.domain.DaStationCollection;
+import com.billion.main.da.service.IDaStationCollectionService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 杩囩珯閲囬泦Controller
+ * 
+ * @author HDY
+ * @date 2025-02-12
+ */
+@RestController
+@RequestMapping("/da/stationCollection")
+public class DaStationCollectionController extends BaseController
+{
+    @Autowired
+    private IDaStationCollectionService daStationCollectionService;
+
+    /**
+     * 鏌ヨ杩囩珯閲囬泦鍒楄〃
+     */
+    @PreAuthorize("@ss.hasPermi('da:stationCollection:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(DaStationCollection daStationCollection)
+    {
+        startPage();
+        List<DaStationCollection> list = daStationCollectionService.selectDaStationCollectionList(daStationCollection);
+        return getDataTable(list);
+    }
+
+    /**
+     * 瀵煎嚭杩囩珯閲囬泦鍒楄〃
+     */
+    @PreAuthorize("@ss.hasPermi('da:stationCollection:export')")
+    @Log(title = "杩囩珯閲囬泦", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, DaStationCollection daStationCollection)
+    {
+        List<DaStationCollection> list = daStationCollectionService.selectDaStationCollectionList(daStationCollection);
+        ExcelUtil<DaStationCollection> util = new ExcelUtil<DaStationCollection>(DaStationCollection.class);
+        util.exportExcel(response, list, "杩囩珯閲囬泦鏁版嵁");
+    }
+
+    /**
+     * 鑾峰彇杩囩珯閲囬泦璇︾粏淇℃伅
+     */
+    @PreAuthorize("@ss.hasPermi('da:stationCollection:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(daStationCollectionService.selectDaStationCollectionById(id));
+    }
+
+    /**
+     * 鏂板杩囩珯閲囬泦
+     */
+    @PreAuthorize("@ss.hasPermi('da:stationCollection:add')")
+    @Log(title = "杩囩珯閲囬泦", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody DaStationCollection daStationCollection)
+    {
+        return toAjax(daStationCollectionService.insertDaStationCollection(daStationCollection));
+    }
+
+    /**
+     * 淇敼杩囩珯閲囬泦
+     */
+    @PreAuthorize("@ss.hasPermi('da:stationCollection:edit')")
+    @Log(title = "杩囩珯閲囬泦", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody DaStationCollection daStationCollection)
+    {
+        return toAjax(daStationCollectionService.updateDaStationCollection(daStationCollection));
+    }
+
+    /**
+     * 鍒犻櫎杩囩珯閲囬泦
+     */
+    @PreAuthorize("@ss.hasPermi('da:stationCollection:remove')")
+    @Log(title = "杩囩珯閲囬泦", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(daStationCollectionService.deleteDaStationCollectionByIds(ids));
+    }
+}
diff --git a/billion-main/src/main/java/com/billion/main/da/domain/DaStationCollection.java b/billion-main/src/main/java/com/billion/main/da/domain/DaStationCollection.java
new file mode 100644
index 0000000..d2e301c
--- /dev/null
+++ b/billion-main/src/main/java/com/billion/main/da/domain/DaStationCollection.java
@@ -0,0 +1,52 @@
+package com.billion.main.da.domain;
+
+import com.billion.common.annotation.Excel;
+import com.billion.main.common.BaseEntity;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 杩囩珯閲囬泦瀵硅薄 da_station_collection
+ * 
+ * @author HDY
+ * @date 2025-02-12
+ */
+@Data
+public class DaStationCollection extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 涓婚敭id */
+    private Long id;
+
+    /** 鎬绘垚搴忓垪鍙� */
+    @Excel(name = "鎬绘垚搴忓垪鍙�")
+    private String sfcCode;
+
+    /** 宸ヤ綅缂栫爜 */
+    @Excel(name = "宸ヤ綅缂栫爜")
+    private String locationCode;
+
+    /** 杩涚珯鏃堕棿 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "杩涚珯鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date inboundTime;
+
+    /** 鍑虹珯鏃堕棿 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "鍑虹珯鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date outboundTime;
+
+    /** 鐘舵�侊紙1鍚堟牸0涓嶅悎鏍硷級 */
+    @Excel(name = "鐘舵��", readConverterExp = "1=鍚堟牸0涓嶅悎鏍�")
+    private String status;
+
+    /** 閲囬泦鏃堕棿 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "閲囬泦鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date collectTime;
+
+
+}
diff --git a/billion-main/src/main/java/com/billion/main/da/mapper/DaStationCollectionMapper.java b/billion-main/src/main/java/com/billion/main/da/mapper/DaStationCollectionMapper.java
new file mode 100644
index 0000000..fcda62a
--- /dev/null
+++ b/billion-main/src/main/java/com/billion/main/da/mapper/DaStationCollectionMapper.java
@@ -0,0 +1,63 @@
+package com.billion.main.da.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.billion.main.da.domain.DaStationCollection;
+
+import java.util.List;
+
+/**
+ * 杩囩珯閲囬泦Mapper鎺ュ彛
+ * 
+ * @author HDY
+ * @date 2025-02-12
+ */
+public interface DaStationCollectionMapper extends BaseMapper<DaStationCollection>
+{
+    /**
+     * 鏌ヨ杩囩珯閲囬泦
+     * 
+     * @param id 杩囩珯閲囬泦涓婚敭
+     * @return 杩囩珯閲囬泦
+     */
+    public DaStationCollection selectDaStationCollectionById(Long id);
+
+    /**
+     * 鏌ヨ杩囩珯閲囬泦鍒楄〃
+     * 
+     * @param daStationCollection 杩囩珯閲囬泦
+     * @return 杩囩珯閲囬泦闆嗗悎
+     */
+    public List<DaStationCollection> selectDaStationCollectionList(DaStationCollection daStationCollection);
+
+    /**
+     * 鏂板杩囩珯閲囬泦
+     * 
+     * @param daStationCollection 杩囩珯閲囬泦
+     * @return 缁撴灉
+     */
+    public int insertDaStationCollection(DaStationCollection daStationCollection);
+
+    /**
+     * 淇敼杩囩珯閲囬泦
+     * 
+     * @param daStationCollection 杩囩珯閲囬泦
+     * @return 缁撴灉
+     */
+    public int updateDaStationCollection(DaStationCollection daStationCollection);
+
+    /**
+     * 鍒犻櫎杩囩珯閲囬泦
+     * 
+     * @param id 杩囩珯閲囬泦涓婚敭
+     * @return 缁撴灉
+     */
+    public int deleteDaStationCollectionById(Long id);
+
+    /**
+     * 鎵归噺鍒犻櫎杩囩珯閲囬泦
+     * 
+     * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
+     * @return 缁撴灉
+     */
+    public int deleteDaStationCollectionByIds(Long[] ids);
+}
diff --git a/billion-main/src/main/java/com/billion/main/da/service/IDaStationCollectionService.java b/billion-main/src/main/java/com/billion/main/da/service/IDaStationCollectionService.java
new file mode 100644
index 0000000..de76584
--- /dev/null
+++ b/billion-main/src/main/java/com/billion/main/da/service/IDaStationCollectionService.java
@@ -0,0 +1,63 @@
+package com.billion.main.da.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.billion.main.da.domain.DaStationCollection;
+
+import java.util.List;
+
+/**
+ * 杩囩珯閲囬泦Service鎺ュ彛
+ * 
+ * @author HDY
+ * @date 2025-02-12
+ */
+public interface IDaStationCollectionService extends IService<DaStationCollection>
+{
+    /**
+     * 鏌ヨ杩囩珯閲囬泦
+     * 
+     * @param id 杩囩珯閲囬泦涓婚敭
+     * @return 杩囩珯閲囬泦
+     */
+    public DaStationCollection selectDaStationCollectionById(Long id);
+
+    /**
+     * 鏌ヨ杩囩珯閲囬泦鍒楄〃
+     * 
+     * @param daStationCollection 杩囩珯閲囬泦
+     * @return 杩囩珯閲囬泦闆嗗悎
+     */
+    public List<DaStationCollection> selectDaStationCollectionList(DaStationCollection daStationCollection);
+
+    /**
+     * 鏂板杩囩珯閲囬泦
+     * 
+     * @param daStationCollection 杩囩珯閲囬泦
+     * @return 缁撴灉
+     */
+    public int insertDaStationCollection(DaStationCollection daStationCollection);
+
+    /**
+     * 淇敼杩囩珯閲囬泦
+     * 
+     * @param daStationCollection 杩囩珯閲囬泦
+     * @return 缁撴灉
+     */
+    public int updateDaStationCollection(DaStationCollection daStationCollection);
+
+    /**
+     * 鎵归噺鍒犻櫎杩囩珯閲囬泦
+     * 
+     * @param ids 闇�瑕佸垹闄ょ殑杩囩珯閲囬泦涓婚敭闆嗗悎
+     * @return 缁撴灉
+     */
+    public int deleteDaStationCollectionByIds(Long[] ids);
+
+    /**
+     * 鍒犻櫎杩囩珯閲囬泦淇℃伅
+     * 
+     * @param id 杩囩珯閲囬泦涓婚敭
+     * @return 缁撴灉
+     */
+    public int deleteDaStationCollectionById(Long id);
+}
diff --git a/billion-main/src/main/java/com/billion/main/da/service/impl/DaStationCollectionServiceImpl.java b/billion-main/src/main/java/com/billion/main/da/service/impl/DaStationCollectionServiceImpl.java
new file mode 100644
index 0000000..70ac6a3
--- /dev/null
+++ b/billion-main/src/main/java/com/billion/main/da/service/impl/DaStationCollectionServiceImpl.java
@@ -0,0 +1,95 @@
+package com.billion.main.da.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.billion.main.da.domain.DaStationCollection;
+import com.billion.main.da.mapper.DaStationCollectionMapper;
+import com.billion.main.da.service.IDaStationCollectionService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 杩囩珯閲囬泦Service涓氬姟灞傚鐞�
+ * 
+ * @author HDY
+ * @date 2025-02-12
+ */
+@Service
+public class DaStationCollectionServiceImpl extends ServiceImpl<DaStationCollectionMapper, DaStationCollection> implements IDaStationCollectionService
+{
+    @Autowired
+    private DaStationCollectionMapper daStationCollectionMapper;
+
+    /**
+     * 鏌ヨ杩囩珯閲囬泦
+     * 
+     * @param id 杩囩珯閲囬泦涓婚敭
+     * @return 杩囩珯閲囬泦
+     */
+    @Override
+    public DaStationCollection selectDaStationCollectionById(Long id)
+    {
+        return daStationCollectionMapper.selectDaStationCollectionById(id);
+    }
+
+    /**
+     * 鏌ヨ杩囩珯閲囬泦鍒楄〃
+     * 
+     * @param daStationCollection 杩囩珯閲囬泦
+     * @return 杩囩珯閲囬泦
+     */
+    @Override
+    public List<DaStationCollection> selectDaStationCollectionList(DaStationCollection daStationCollection)
+    {
+        return daStationCollectionMapper.selectDaStationCollectionList(daStationCollection);
+    }
+
+    /**
+     * 鏂板杩囩珯閲囬泦
+     * 
+     * @param daStationCollection 杩囩珯閲囬泦
+     * @return 缁撴灉
+     */
+    @Override
+    public int insertDaStationCollection(DaStationCollection daStationCollection)
+    {
+        return daStationCollectionMapper.insertDaStationCollection(daStationCollection);
+    }
+
+    /**
+     * 淇敼杩囩珯閲囬泦
+     * 
+     * @param daStationCollection 杩囩珯閲囬泦
+     * @return 缁撴灉
+     */
+    @Override
+    public int updateDaStationCollection(DaStationCollection daStationCollection)
+    {
+        return daStationCollectionMapper.updateDaStationCollection(daStationCollection);
+    }
+
+    /**
+     * 鎵归噺鍒犻櫎杩囩珯閲囬泦
+     * 
+     * @param ids 闇�瑕佸垹闄ょ殑杩囩珯閲囬泦涓婚敭
+     * @return 缁撴灉
+     */
+    @Override
+    public int deleteDaStationCollectionByIds(Long[] ids)
+    {
+        return daStationCollectionMapper.deleteDaStationCollectionByIds(ids);
+    }
+
+    /**
+     * 鍒犻櫎杩囩珯閲囬泦淇℃伅
+     * 
+     * @param id 杩囩珯閲囬泦涓婚敭
+     * @return 缁撴灉
+     */
+    @Override
+    public int deleteDaStationCollectionById(Long id)
+    {
+        return daStationCollectionMapper.deleteDaStationCollectionById(id);
+    }
+}
diff --git a/billion-main/src/main/resources/mapper/da/DaStationCollectionMapper.xml b/billion-main/src/main/resources/mapper/da/DaStationCollectionMapper.xml
new file mode 100644
index 0000000..19972d3
--- /dev/null
+++ b/billion-main/src/main/resources/mapper/da/DaStationCollectionMapper.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.billion.main.da.mapper.DaStationCollectionMapper">
+    
+    <resultMap type="DaStationCollection" id="DaStationCollectionResult">
+        <result property="id"    column="id"    />
+        <result property="sfcCode"    column="sfc_code"    />
+        <result property="locationCode"    column="location_code"    />
+        <result property="inboundTime"    column="inbound_time"    />
+        <result property="outboundTime"    column="outbound_time"    />
+        <result property="status"    column="status"    />
+        <result property="collectTime"    column="collect_time"    />
+    </resultMap>
+
+    <sql id="selectDaStationCollectionVo">
+        select id, sfc_code, location_code, inbound_time, outbound_time, status, collect_time from da_station_collection
+    </sql>
+
+    <select id="selectDaStationCollectionList" parameterType="DaStationCollection" resultMap="DaStationCollectionResult">
+        <include refid="selectDaStationCollectionVo"/>
+        <where>  
+            <if test="sfcCode != null  and sfcCode != ''"> and sfc_code = #{sfcCode}</if>
+            <if test="locationCode != null  and locationCode != ''"> and location_code = #{locationCode}</if>
+            <if test="inboundTime != null "> and inbound_time = #{inboundTime}</if>
+            <if test="outboundTime != null "> and outbound_time = #{outboundTime}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="collectTime != null "> and collect_time = #{collectTime}</if>
+        </where>
+    </select>
+    
+    <select id="selectDaStationCollectionById" parameterType="Long" resultMap="DaStationCollectionResult">
+        <include refid="selectDaStationCollectionVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertDaStationCollection" parameterType="DaStationCollection" useGeneratedKeys="true" keyProperty="id">
+        insert into da_station_collection
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="sfcCode != null">sfc_code,</if>
+            <if test="locationCode != null">location_code,</if>
+            <if test="inboundTime != null">inbound_time,</if>
+            <if test="outboundTime != null">outbound_time,</if>
+            <if test="status != null">status,</if>
+            <if test="collectTime != null">collect_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="sfcCode != null">#{sfcCode},</if>
+            <if test="locationCode != null">#{locationCode},</if>
+            <if test="inboundTime != null">#{inboundTime},</if>
+            <if test="outboundTime != null">#{outboundTime},</if>
+            <if test="status != null">#{status},</if>
+            <if test="collectTime != null">#{collectTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateDaStationCollection" parameterType="DaStationCollection">
+        update da_station_collection
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="sfcCode != null">sfc_code = #{sfcCode},</if>
+            <if test="locationCode != null">location_code = #{locationCode},</if>
+            <if test="inboundTime != null">inbound_time = #{inboundTime},</if>
+            <if test="outboundTime != null">outbound_time = #{outboundTime},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="collectTime != null">collect_time = #{collectTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteDaStationCollectionById" parameterType="Long">
+        delete from da_station_collection where id = #{id}
+    </delete>
+
+    <delete id="deleteDaStationCollectionByIds" parameterType="String">
+        delete from da_station_collection where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>
\ No newline at end of file
diff --git a/billion-ui/src/api/main/da/stationCollection.js b/billion-ui/src/api/main/da/stationCollection.js
new file mode 100644
index 0000000..ab5cad2
--- /dev/null
+++ b/billion-ui/src/api/main/da/stationCollection.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 鏌ヨ杩囩珯閲囬泦鍒楄〃
+export function listStationCollection(query) {
+  return request({
+    url: '/da/stationCollection/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 鏌ヨ杩囩珯閲囬泦璇︾粏
+export function getStationCollection(id) {
+  return request({
+    url: '/da/stationCollection/' + id,
+    method: 'get'
+  })
+}
+
+// 鏂板杩囩珯閲囬泦
+export function addStationCollection(data) {
+  return request({
+    url: '/da/stationCollection',
+    method: 'post',
+    data: data
+  })
+}
+
+// 淇敼杩囩珯閲囬泦
+export function updateStationCollection(data) {
+  return request({
+    url: '/da/stationCollection',
+    method: 'put',
+    data: data
+  })
+}
+
+// 鍒犻櫎杩囩珯閲囬泦
+export function delStationCollection(id) {
+  return request({
+    url: '/da/stationCollection/' + id,
+    method: 'delete'
+  })
+}
diff --git a/billion-ui/src/views/main/da/stationCollection/index.vue b/billion-ui/src/views/main/da/stationCollection/index.vue
new file mode 100644
index 0000000..a6a07b2
--- /dev/null
+++ b/billion-ui/src/views/main/da/stationCollection/index.vue
@@ -0,0 +1,303 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="鎬绘垚搴忓垪鍙�" prop="sfcCode">
+        <el-input
+          v-model="queryParams.sfcCode"
+          placeholder="璇疯緭鍏ユ�绘垚搴忓垪鍙�"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="宸ヤ綅缂栫爜" prop="locationCode">
+        <el-input
+          v-model="queryParams.locationCode"
+          placeholder="璇疯緭鍏ュ伐浣嶇紪鐮�"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="杩涚珯鏃堕棿" prop="inboundTime">
+        <el-date-picker clearable
+          v-model="queryParams.inboundTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="璇烽�夋嫨杩涚珯鏃堕棿">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="鍑虹珯鏃堕棿" prop="outboundTime">
+        <el-date-picker clearable
+          v-model="queryParams.outboundTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="璇烽�夋嫨鍑虹珯鏃堕棿">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="閲囬泦鏃堕棿" prop="collectTime">
+        <el-date-picker clearable
+          v-model="queryParams.collectTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="璇烽�夋嫨閲囬泦鏃堕棿">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item style="float: right">
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['main:daStationCollection:add']"
+        >鏂板</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['main:daStationCollection:edit']"
+        >淇敼</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['main:daStationCollection:remove']"
+        >鍒犻櫎</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['main:daStationCollection:export']"
+        >瀵煎嚭</el-button>
+      </el-col>
+    </el-row>
+
+    <el-table border v-loading="loading" :data="daStationCollectionList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="涓婚敭id" align="center" prop="id" />
+      <el-table-column :show-overflow-tooltip="true" label="鎬绘垚搴忓垪鍙�" align="center" prop="sfcCode" />
+      <el-table-column :show-overflow-tooltip="true" label="宸ヤ綅缂栫爜" align="center" prop="locationCode" />
+      <el-table-column label="杩涚珯鏃堕棿" align="center" prop="inboundTime" width="180">
+      </el-table-column>
+      <el-table-column label="鍑虹珯鏃堕棿" align="center" prop="outboundTime" width="180">
+      </el-table-column>
+      <el-table-column :show-overflow-tooltip="true" label="鐘舵��" align="center" prop="status" />
+      <el-table-column label="閲囬泦鏃堕棿" align="center" prop="collectTime" width="180">
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 娣诲姞鎴栦慨鏀硅繃绔欓噰闆嗗璇濇 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="鎬绘垚搴忓垪鍙�" prop="sfcCode">
+          <el-input v-model="form.sfcCode" placeholder="璇疯緭鍏ユ�绘垚搴忓垪鍙�" />
+        </el-form-item>
+        <el-form-item label="宸ヤ綅缂栫爜" prop="locationCode">
+          <el-input v-model="form.locationCode" placeholder="璇疯緭鍏ュ伐浣嶇紪鐮�" />
+        </el-form-item>
+        <el-form-item label="杩涚珯鏃堕棿" prop="inboundTime">
+          <el-date-picker clearable
+            v-model="form.inboundTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="璇烽�夋嫨杩涚珯鏃堕棿">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="鍑虹珯鏃堕棿" prop="outboundTime">
+          <el-date-picker clearable
+            v-model="form.outboundTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="璇烽�夋嫨鍑虹珯鏃堕棿">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="閲囬泦鏃堕棿" prop="collectTime">
+          <el-date-picker clearable
+            v-model="form.collectTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="璇烽�夋嫨閲囬泦鏃堕棿">
+          </el-date-picker>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
+        <el-button @click="cancel">鍙� 娑�</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listStationCollection, getStationCollection, delStationCollection, addStationCollection, updateStationCollection } from "@/api/main/da/stationCollection";
+
+export default {
+  name: "DaStationCollection",
+  data() {
+    return {
+      // 閬僵灞�
+      loading: true,
+      // 閫変腑鏁扮粍
+      ids: [],
+      // 闈炲崟涓鐢�
+      single: true,
+      // 闈炲涓鐢�
+      multiple: true,
+      // 鏄剧ず鎼滅储鏉′欢
+      showSearch: true,
+      // 鎬绘潯鏁�
+      total: 0,
+      // 杩囩珯閲囬泦琛ㄦ牸鏁版嵁
+      daStationCollectionList: [],
+      // 寮瑰嚭灞傛爣棰�
+      title: "",
+      // 鏄惁鏄剧ず寮瑰嚭灞�
+      open: false,
+      // 鏌ヨ鍙傛暟
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        sfcCode: null,
+        locationCode: null,
+        inboundTime: null,
+        outboundTime: null,
+        status: null,
+        collectTime: null
+      },
+      // 琛ㄥ崟鍙傛暟
+      form: {},
+      // 琛ㄥ崟鏍¢獙
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 鏌ヨ杩囩珯閲囬泦鍒楄〃 */
+    getList() {
+      this.loading = true;
+      listStationCollection(this.queryParams).then(response => {
+        this.daStationCollectionList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 鍙栨秷鎸夐挳
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 琛ㄥ崟閲嶇疆
+    reset() {
+      this.form = {
+        id: null,
+        sfcCode: null,
+        locationCode: null,
+        inboundTime: null,
+        outboundTime: null,
+        status: null,
+        collectTime: null
+      };
+      this.resetForm("form");
+    },
+    /** 鎼滅储鎸夐挳鎿嶄綔 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 閲嶇疆鎸夐挳鎿嶄綔 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 澶氶�夋閫変腑鏁版嵁
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 鏂板鎸夐挳鎿嶄綔 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "娣诲姞杩囩珯閲囬泦";
+    },
+    /** 淇敼鎸夐挳鎿嶄綔 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getStationCollection(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "淇敼杩囩珯閲囬泦";
+      });
+    },
+    /** 鎻愪氦鎸夐挳 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateStationCollection(this.form).then(response => {
+              this.$modal.msgSuccess("淇敼鎴愬姛");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addStationCollection(this.form).then(response => {
+              this.$modal.msgSuccess("鏂板鎴愬姛");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('鏄惁纭鍒犻櫎').then(function() {
+        return delStationCollection(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+      }).catch(() => {});
+    },
+    /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+    handleExport() {
+      this.download('main/daStationCollection/export', {
+        ...this.queryParams
+      }, `daStationCollection_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

--
Gitblit v1.9.3