瀏覽代碼

客户管理

XF--LRQYEJOKYDS\Administrator 4 年之前
父節點
當前提交
6a87bf2cc2

+ 3 - 2
Yijia-SaaS/.idea/compiler.xml

@@ -7,12 +7,13 @@
         <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
         <outputRelativeToContentRoot value="true" />
         <module name="yijia-system" />
-        <module name="yijia-quartz" />
+        <module name="yijia-framework" />
         <module name="yijia-station" />
         <module name="yijia-generator" />
         <module name="yijia-common" />
         <module name="yijia-admin" />
-        <module name="yijia-framework" />
+        <module name="yijia-quartz" />
+        <module name="yijia-customer" />
       </profile>
     </annotationProcessing>
     <bytecodeTargetLevel>

+ 1 - 0
Yijia-SaaS/.idea/encodings.xml

@@ -7,6 +7,7 @@
     <file url="file://$PROJECT_DIR$/yijia-admin/src/main/resources" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/yijia-common" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/yijia-common/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/yijia-customer" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/yijia-framework" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/yijia-framework/src/main/java" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/yijia-generator" charset="UTF-8" />

+ 6 - 0
Yijia-SaaS/pom.xml

@@ -201,6 +201,11 @@
                 <version>${yijia.version}</version>
             </dependency>
 
+            <dependency>
+                <groupId>com.yijia</groupId>
+                <artifactId>yijia-customer</artifactId>
+                <version>${yijia.version}</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 
@@ -212,6 +217,7 @@
         <module>yijia-generator</module>
         <module>yijia-common</module>
         <module>yijia-station</module>
+        <module>yijia-customer</module>
     </modules>
     <packaging>pom</packaging>
     <dependencies>

+ 104 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/controller/CustomerManageController.java

@@ -0,0 +1,104 @@
+package com.yijia.customer.controller;
+import com.yijia.common.utils.poi.ExcelUtil;
+import com.yijia.customer.domain.CustomerManage;
+import com.yijia.customer.service.ICustomerManageService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.yijia.common.annotation.Log;
+import com.yijia.common.core.controller.BaseController;
+import com.yijia.common.core.domain.AjaxResult;
+import com.yijia.common.enums.BusinessType;
+
+import com.yijia.common.core.page.TableDataInfo;
+
+import java.util.List;
+
+/**
+ * 客户管理Controller
+ * 
+ * @author yijia
+ * @date 2020-12-21
+ */
+@RestController
+@RequestMapping("/customer/manage")
+public class CustomerManageController extends BaseController
+{
+    @Autowired
+    private ICustomerManageService customerManageService;
+
+    /**
+     * 查询客户管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('customer:manage:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(CustomerManage customerManage)
+    {
+        startPage();
+        List<CustomerManage> list = customerManageService.selectCustomerManageList(customerManage);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出客户管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('customer:manage:export')")
+    @Log(title = "客户管理", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(CustomerManage customerManage)
+    {
+        List<CustomerManage> list = customerManageService.selectCustomerManageList(customerManage);
+        ExcelUtil<CustomerManage> util = new ExcelUtil<CustomerManage>(CustomerManage.class);
+        return util.exportExcel(list, "manage");
+    }
+
+    /**
+     * 获取客户管理详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('customer:manage:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(customerManageService.selectCustomerManageById(id));
+    }
+
+    /**
+     * 新增客户管理
+     */
+    @PreAuthorize("@ss.hasPermi('customer:manage:add')")
+    @Log(title = "客户管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody CustomerManage customerManage)
+    {
+        return toAjax(customerManageService.insertCustomerManage(customerManage));
+    }
+
+    /**
+     * 修改客户管理
+     */
+    @PreAuthorize("@ss.hasPermi('customer:manage:edit')")
+    @Log(title = "客户管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody CustomerManage customerManage)
+    {
+        return toAjax(customerManageService.updateCustomerManage(customerManage));
+    }
+
+    /**
+     * 删除客户管理
+     */
+    @PreAuthorize("@ss.hasPermi('customer:manage:remove')")
+    @Log(title = "客户管理", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(customerManageService.deleteCustomerManageByIds(ids));
+    }
+}

+ 222 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/domain/CustomerManage.java

@@ -0,0 +1,222 @@
+package com.yijia.customer.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.yijia.common.annotation.Excel;
+import com.yijia.common.core.domain.BaseEntity;
+
+/**
+ * 客户管理对象 customer_manage
+ * 
+ * @author yijia
+ * @date 2020-12-21
+ */
+public class CustomerManage extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 会员id */
+    @Excel(name = "会员id")
+    private String memberId;
+
+    /** 客户姓名 */
+    @Excel(name = "客户姓名")
+    private String customerName;
+
+    /** 推荐人 */
+    @Excel(name = "推荐人")
+    private String commendMan;
+
+    /** 会员等级 */
+    @Excel(name = "会员等级")
+    private String memberGrade;
+
+    /** 手机号 */
+    @Excel(name = "手机号")
+    private String phoneNumber;
+
+    /** 车牌号 */
+    @Excel(name = "车牌号")
+    private String carNumber;
+
+    /** 油品 */
+    @Excel(name = "油品")
+    private String oils;
+
+    /** 余额 */
+    @Excel(name = "余额")
+    private String balance;
+
+    /** 积分 */
+    @Excel(name = "积分")
+    private String integral;
+
+    /** 专车类型 */
+    @Excel(name = "专车类型")
+    private String specialCarType;
+
+    /** 注册时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "注册时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date regtime;
+
+    /** 油站id */
+    @Excel(name = "油站id")
+    private Long stationId;
+
+    /** 油站名称 */
+    @Excel(name = "油站名称")
+    private String stationNam;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setMemberId(String memberId) 
+    {
+        this.memberId = memberId;
+    }
+
+    public String getMemberId() 
+    {
+        return memberId;
+    }
+    public void setCustomerName(String customerName) 
+    {
+        this.customerName = customerName;
+    }
+
+    public String getCustomerName() 
+    {
+        return customerName;
+    }
+    public void setCommendMan(String commendMan) 
+    {
+        this.commendMan = commendMan;
+    }
+
+    public String getCommendMan() 
+    {
+        return commendMan;
+    }
+    public void setMemberGrade(String memberGrade) 
+    {
+        this.memberGrade = memberGrade;
+    }
+
+    public String getMemberGrade() 
+    {
+        return memberGrade;
+    }
+    public void setPhoneNumber(String phoneNumber) 
+    {
+        this.phoneNumber = phoneNumber;
+    }
+
+    public String getPhoneNumber() 
+    {
+        return phoneNumber;
+    }
+    public void setCarNumber(String carNumber) 
+    {
+        this.carNumber = carNumber;
+    }
+
+    public String getCarNumber() 
+    {
+        return carNumber;
+    }
+    public void setOils(String oils) 
+    {
+        this.oils = oils;
+    }
+
+    public String getOils() 
+    {
+        return oils;
+    }
+    public void setBalance(String balance) 
+    {
+        this.balance = balance;
+    }
+
+    public String getBalance() 
+    {
+        return balance;
+    }
+    public void setIntegral(String integral) 
+    {
+        this.integral = integral;
+    }
+
+    public String getIntegral() 
+    {
+        return integral;
+    }
+    public void setSpecialCarType(String specialCarType) 
+    {
+        this.specialCarType = specialCarType;
+    }
+
+    public String getSpecialCarType() 
+    {
+        return specialCarType;
+    }
+    public void setRegtime(Date regtime) 
+    {
+        this.regtime = regtime;
+    }
+
+    public Date getRegtime() 
+    {
+        return regtime;
+    }
+    public void setStationId(Long stationId) 
+    {
+        this.stationId = stationId;
+    }
+
+    public Long getStationId() 
+    {
+        return stationId;
+    }
+    public void setStationNam(String stationNam) 
+    {
+        this.stationNam = stationNam;
+    }
+
+    public String getStationNam() 
+    {
+        return stationNam;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("memberId", getMemberId())
+            .append("customerName", getCustomerName())
+            .append("commendMan", getCommendMan())
+            .append("memberGrade", getMemberGrade())
+            .append("phoneNumber", getPhoneNumber())
+            .append("carNumber", getCarNumber())
+            .append("oils", getOils())
+            .append("balance", getBalance())
+            .append("integral", getIntegral())
+            .append("specialCarType", getSpecialCarType())
+            .append("regtime", getRegtime())
+            .append("stationId", getStationId())
+            .append("stationNam", getStationNam())
+            .toString();
+    }
+}

+ 63 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/mapper/CustomerManageMapper.java

@@ -0,0 +1,63 @@
+package com.yijia.customer.mapper;
+
+import java.util.List;
+
+import com.yijia.customer.domain.CustomerManage;
+
+
+/**
+ * 客户管理Mapper接口
+ * 
+ * @author yijia
+ * @date 2020-12-21
+ */
+public interface CustomerManageMapper 
+{
+    /**
+     * 查询客户管理
+     * 
+     * @param id 客户管理ID
+     * @return 客户管理
+     */
+    public CustomerManage selectCustomerManageById(Long id);
+
+    /**
+     * 查询客户管理列表
+     * 
+     * @param customerManage 客户管理
+     * @return 客户管理集合
+     */
+    public List<CustomerManage> selectCustomerManageList(CustomerManage customerManage);
+
+    /**
+     * 新增客户管理
+     * 
+     * @param customerManage 客户管理
+     * @return 结果
+     */
+    public int insertCustomerManage(CustomerManage customerManage);
+
+    /**
+     * 修改客户管理
+     * 
+     * @param customerManage 客户管理
+     * @return 结果
+     */
+    public int updateCustomerManage(CustomerManage customerManage);
+
+    /**
+     * 删除客户管理
+     * 
+     * @param id 客户管理ID
+     * @return 结果
+     */
+    public int deleteCustomerManageById(Long id);
+
+    /**
+     * 批量删除客户管理
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteCustomerManageByIds(Long[] ids);
+}

+ 119 - 0
Yijia-SaaS/yijia-customer/src/main/resources/mapper/customer/CustomerManageMapper.xml

@@ -0,0 +1,119 @@
+<?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.yijia.customer.mapper.CustomerManageMapper">
+    
+    <resultMap type="CustomerManage" id="CustomerManageResult">
+        <result property="id"    column="id"    />
+        <result property="memberId"    column="member_id"    />
+        <result property="customerName"    column="customer_name"    />
+        <result property="commendMan"    column="commend_man"    />
+        <result property="memberGrade"    column="member_grade"    />
+        <result property="phoneNumber"    column="phone_number"    />
+        <result property="carNumber"    column="car_number"    />
+        <result property="oils"    column="oils"    />
+        <result property="balance"    column="balance"    />
+        <result property="integral"    column="integral"    />
+        <result property="specialCarType"    column="special_car_type"    />
+        <result property="regtime"    column="regtime"    />
+        <result property="stationId"    column="station_id"    />
+        <result property="stationNam"    column="station_nam"    />
+    </resultMap>
+
+    <sql id="selectCustomerManageVo">
+        select id, member_id, customer_name, commend_man, member_grade, phone_number, car_number, oils, balance, integral, special_car_type, regtime, station_id, station_nam from customer_manage
+    </sql>
+
+    <select id="selectCustomerManageList" parameterType="CustomerManage" resultMap="CustomerManageResult">
+        <include refid="selectCustomerManageVo"/>
+        <where>  
+            <if test="memberId != null  and memberId != ''"> and member_id = #{memberId}</if>
+            <if test="customerName != null  and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
+            <if test="commendMan != null  and commendMan != ''"> and commend_man = #{commendMan}</if>
+            <if test="memberGrade != null  and memberGrade != ''"> and member_grade = #{memberGrade}</if>
+            <if test="phoneNumber != null  and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
+            <if test="carNumber != null  and carNumber != ''"> and car_number = #{carNumber}</if>
+            <if test="oils != null  and oils != ''"> and oils = #{oils}</if>
+            <if test="balance != null  and balance != ''"> and balance = #{balance}</if>
+            <if test="integral != null  and integral != ''"> and integral = #{integral}</if>
+            <if test="specialCarType != null  and specialCarType != ''"> and special_car_type = #{specialCarType}</if>
+            <if test="regtime != null "> and regtime = #{regtime}</if>
+            <if test="stationId != null "> and station_id = #{stationId}</if>
+            <if test="stationNam != null  and stationNam != ''"> and station_nam = #{stationNam}</if>
+        </where>
+    </select>
+    
+    <select id="selectCustomerManageById" parameterType="Long" resultMap="CustomerManageResult">
+        <include refid="selectCustomerManageVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertCustomerManage" parameterType="CustomerManage">
+        insert into customer_manage
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="memberId != null">member_id,</if>
+            <if test="customerName != null">customer_name,</if>
+            <if test="commendMan != null">commend_man,</if>
+            <if test="memberGrade != null">member_grade,</if>
+            <if test="phoneNumber != null">phone_number,</if>
+            <if test="carNumber != null">car_number,</if>
+            <if test="oils != null">oils,</if>
+            <if test="balance != null">balance,</if>
+            <if test="integral != null">integral,</if>
+            <if test="specialCarType != null">special_car_type,</if>
+            <if test="regtime != null">regtime,</if>
+            <if test="stationId != null">station_id,</if>
+            <if test="stationNam != null">station_nam,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="memberId != null">#{memberId},</if>
+            <if test="customerName != null">#{customerName},</if>
+            <if test="commendMan != null">#{commendMan},</if>
+            <if test="memberGrade != null">#{memberGrade},</if>
+            <if test="phoneNumber != null">#{phoneNumber},</if>
+            <if test="carNumber != null">#{carNumber},</if>
+            <if test="oils != null">#{oils},</if>
+            <if test="balance != null">#{balance},</if>
+            <if test="integral != null">#{integral},</if>
+            <if test="specialCarType != null">#{specialCarType},</if>
+            <if test="regtime != null">#{regtime},</if>
+            <if test="stationId != null">#{stationId},</if>
+            <if test="stationNam != null">#{stationNam},</if>
+         </trim>
+    </insert>
+
+    <update id="updateCustomerManage" parameterType="CustomerManage">
+        update customer_manage
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="memberId != null">member_id = #{memberId},</if>
+            <if test="customerName != null">customer_name = #{customerName},</if>
+            <if test="commendMan != null">commend_man = #{commendMan},</if>
+            <if test="memberGrade != null">member_grade = #{memberGrade},</if>
+            <if test="phoneNumber != null">phone_number = #{phoneNumber},</if>
+            <if test="carNumber != null">car_number = #{carNumber},</if>
+            <if test="oils != null">oils = #{oils},</if>
+            <if test="balance != null">balance = #{balance},</if>
+            <if test="integral != null">integral = #{integral},</if>
+            <if test="specialCarType != null">special_car_type = #{specialCarType},</if>
+            <if test="regtime != null">regtime = #{regtime},</if>
+            <if test="stationId != null">station_id = #{stationId},</if>
+            <if test="stationNam != null">station_nam = #{stationNam},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteCustomerManageById" parameterType="Long">
+        delete from customer_manage where id = #{id}
+    </delete>
+
+    <delete id="deleteCustomerManageByIds" parameterType="String">
+        delete from customer_manage where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+    
+</mapper>

+ 1 - 1
Yijia-SaaS/yijia-generator/src/main/resources/generator.yml

@@ -3,7 +3,7 @@ gen:
   # 作者
   author: yijia
   # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
-  packageName: com.yijia.station
+  packageName: com.yijia.customer
   # 自动去除表前缀,默认是false
   autoRemovePre: false
   # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)

+ 36 - 0
Yijia-SaaS/yijia-ui/src/views/customer/setupTable/customerSetupTable.vue

@@ -0,0 +1,36 @@
+<template>
+  <div class="tabjian">
+    <el-tabs v-model="activeName1" >
+      <el-tab-pane label="等级设置" name="dengji" :key="'dengji'">
+        <child1></child1>
+      </el-tab-pane>
+<!--      <el-tab-pane label="积分设置" name="jifen" :key="'jifen'">-->
+<!--        <child2></child2>-->
+<!--      </el-tab-pane>-->
+    </el-tabs>
+  </div>
+</template>
+<script>
+  import tabChild1 from '../setting/index.vue'
+
+  export default {
+    name: 'tabjian',
+    components:{
+      child1:tabChild1
+    },
+    data() {
+      return {
+        activeName1: 'dengji'
+      };
+    },
+    methods: {
+    }
+  }
+</script>
+
+<style>
+  .tabjian {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+</style>

+ 42 - 9
Yijia-SaaS/yijia-ui/src/views/station/adjust/index.vue

@@ -49,14 +49,21 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="油站名称" prop="stationName">
-        <el-input
-          v-model="queryParams.stationName"
-          placeholder="请输入油站名称"
+      <el-form-item label="油站名称" prop="stationId" >
+        <el-select
+          v-model="queryParams.stationId"
+          placeholder="请选择油站"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
-        />
+          @change="onInstitutionChang"
+        >
+          <el-option
+            v-for="item in stationOptions"
+            :key="item.stationId"
+            :label="item.stationName"
+            :value="item.stationId"
+          ></el-option>
+        </el-select>
       </el-form-item>
       <el-form-item label="操作员" prop="operator">
         <el-input
@@ -131,7 +138,7 @@
           <span>{{ parseTime(scope.row.adjustDate, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="油站id" v-if="getHiddenColumns" align="center" prop="stationId" />
+      <el-table-column label="油站id" v-show="false" align="center" prop="stationId" />
       <el-table-column label="油站名称" align="center" prop="stationName" />
       <el-table-column label="操作员" align="center" prop="operator" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@@ -195,8 +202,22 @@
         <el-form-item label="油站id" v-show="false" prop="stationId">
           <el-input v-model="form.stationId" placeholder="请输入油站id" />
         </el-form-item>
-        <el-form-item label="油站名称" prop="stationName">
-          <el-input v-model="form.stationName" placeholder="请输入油站名称" />
+
+        <el-form-item label="油站名称" prop="stationId" >
+          <el-select
+            v-model="form.stationId"
+            placeholder="请选择油站"
+            clearable
+            size="small"
+            @change="onInstitutionChang"
+          >
+            <el-option
+              v-for="item in stationOptions"
+              :key="item.stationId"
+              :label="item.stationName"
+              :value="item.stationId"
+            ></el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="操作员" prop="operator">
           <el-input v-model="form.operator" placeholder="请输入操作员" />
@@ -212,6 +233,7 @@
 
 <script>
 import { listAdjust, getAdjust, delAdjust, addAdjust, updateAdjust, exportAdjust } from "@/api/station/adjust";
+import {stationinfo} from "@/api/station/gun";
 
 export default {
   name: "Adjust",
@@ -248,6 +270,7 @@ export default {
         stationName: null,
         operator: null
       },
+      stationOptions:[],
       // 表单参数
       form: {},
       // 表单校验
@@ -257,6 +280,9 @@ export default {
   },
   created() {
     this.getList();
+    stationinfo().then(response => {
+      this.stationOptions = response.rows;
+    });
   },
   methods: {
     /** 查询油品调价信息列表 */
@@ -340,6 +366,13 @@ export default {
         }
       });
     },
+    onInstitutionChang(e){
+      let obj = {};
+      obj = this.stationOptions.find((item)=>{//这里的userList就是上面遍历的数据源
+        return item.stationId === e;//筛选出匹配数据
+      })
+      this.form.stationName=obj.stationName;
+    },
     /** 删除按钮操作 */
     handleDelete(row) {
       const adjustPriceIds = row.adjustPriceId || this.ids;

+ 2 - 1
Yijia-SaaS/yijia-ui/src/views/station/common/stationTable.vue

@@ -35,6 +35,7 @@
 </script>
 <style>
   .tabZujian {
-    padding-left:15px;
+    margin-left: 20px;
+    margin-top: 20px;
   }
 </style>

+ 13 - 15
Yijia-SaaS/yijia-ui/src/views/station/gun/index.vue

@@ -19,7 +19,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="油站id" prop="stationId">
+      <el-form-item label="油站名称" prop="stationId">
           <el-select
             v-model="queryParams.stationId"
             placeholder="请选择油站"
@@ -34,15 +34,6 @@
           ></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="油站名称" prop="stationName">
-        <el-input
-          v-model="queryParams.stationName"
-          placeholder="请输入油站名称"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
       <el-form-item label="操作时间" prop="date">
         <el-date-picker clearable size="small" style="width: 200px"
           v-model="queryParams.date"
@@ -52,8 +43,18 @@
         </el-date-picker>
       </el-form-item>
       <el-form-item label="油枪状态" prop="status">
-        <el-select v-model="queryParams.status" placeholder="请选择油枪状态" clearable size="small">
-          <el-option label="请选择字典生成" value="" />
+        <el-select
+          v-model="queryParams.status"
+          placeholder="请选择油枪状态"
+          clearable
+          size="small"
+        >
+          <el-option
+            v-for="item in statusOptions"
+            :key="item.dictValue"
+            :label="item.dictLabel"
+            :value="item.dictValue"
+          ></el-option>
         </el-select>
       </el-form-item>
       <el-form-item>
@@ -61,7 +62,6 @@
         <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
@@ -340,8 +340,6 @@ export default {
       obj = this.stationOptions.find((item)=>{//这里的userList就是上面遍历的数据源
           return item.stationId === e;//筛选出匹配数据
         })
-      console.log(obj.stationId);//获取的 id
-      console.log(obj.stationName);//获取的 name
       this.form.stationName=obj.stationName;
     },
     /** 删除按钮操作 */

+ 1 - 11
Yijia-SaaS/yijia-ui/src/views/station/info/index.vue

@@ -46,15 +46,6 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="集团id" prop="stationGroupId">
-        <el-input
-          v-model="queryParams.stationGroupId"
-          placeholder="请输入集团id"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
       <el-form-item label="集团名称" prop="stationGroupName">
         <el-input
           v-model="queryParams.stationGroupName"
@@ -149,7 +140,7 @@
       <el-table-column label="电话" align="center" prop="phone" />
       <el-table-column label="集团id" align="center" prop="stationGroupId" />
       <el-table-column label="集团名称" align="center" prop="stationGroupName" />
-      <el-table-column label="油站照片" align="center" prop="stationPic" />
+      <el-table-column v-if="false" label="油站照片" align="center" prop="stationPic" />
       <el-table-column label="油站经度" align="center" prop="stationLongitude" />
       <el-table-column label="油站纬度" align="center" prop="stationLatitude" />
       <el-table-column label="商户编码" align="center" prop="mno" />
@@ -269,7 +260,6 @@ export default {
         oilGunNum: null,
         contacts: null,
         phone: null,
-        stationGroupId: null,
         stationGroupName: null,
         stationPic: null,
         stationLongitude: null,

+ 1 - 1
Yijia-SaaS/yijia-ui/src/views/station/manage/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="88px">
       <el-form-item label="设备编号" prop="deviceNo">
         <el-input
           v-model="queryParams.deviceNo"

+ 39 - 20
Yijia-SaaS/yijia-ui/src/views/station/personnel/index.vue

@@ -19,23 +19,20 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="加油站id" prop="stationId">
-        <el-input
+      <el-form-item label="油站名称" prop="stationId" >
+        <el-select
           v-model="queryParams.stationId"
-          placeholder="请输入加油站id"
+          placeholder="请选择油站"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="油站名称" prop="stationName">
-        <el-input
-          v-model="queryParams.stationName"
-          placeholder="请输入油站名称"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
+        >
+          <el-option
+            v-for="item in stationOptions"
+            :key="item.stationId"
+            :label="item.stationName"
+            :value="item.stationId"
+          ></el-option>
+        </el-select>
       </el-form-item>
       <el-form-item label="二维码" prop="qrCode">
         <el-input
@@ -108,7 +105,7 @@
       <el-table-column label="油站员工主键id" v-if="false" align="center" prop="personnelId" />
       <el-table-column label="姓名" align="center" prop="personnelName" />
       <el-table-column label="负责枪号" align="center" prop="gunNo" />
-      <el-table-column label="加油站id" align="center" prop="stationId" />
+      <el-table-column label="加油站id"  v-if="false" align="center" prop="stationId" />
       <el-table-column label="加油站名称" align="center" prop="stationName" />
       <el-table-column label="二维码" align="center" prop="qrCode" />
       <el-table-column label="手机号" align="center" prop="personnelPhone" />
@@ -149,11 +146,21 @@
         <el-form-item label="负责枪号" prop="gunNo">
           <el-input v-model="form.gunNo" placeholder="请输入员工负责枪号" />
         </el-form-item>
-        <el-form-item label="油站id" prop="stationId">
-          <el-input v-model="form.stationId" placeholder="请输入加油站id" />
-        </el-form-item>
-        <el-form-item label="油站名称" prop="stationName">
-          <el-input v-model="form.stationName" placeholder="请输入加油站名称" />
+        <el-form-item label="油站名称" prop="stationId" >
+          <el-select
+            v-model="form.stationId"
+            placeholder="请选择油站"
+            clearable
+            size="small"
+            @change="onInstitutionChang"
+          >
+            <el-option
+              v-for="item in stationOptions"
+              :key="item.stationId"
+              :label="item.stationName"
+              :value="item.stationId"
+            ></el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="二维码" prop="qrCode">
           <el-input v-model="form.qrCode" placeholder="请输入二维码" />
@@ -172,6 +179,7 @@
 
 <script>
 import { listPersonnel, getPersonnel, delPersonnel, addPersonnel, updatePersonnel, exportPersonnel } from "@/api/station/personnel";
+import {stationinfo} from "@/api/station/gun";
 
 export default {
   name: "Personnel",
@@ -191,6 +199,7 @@ export default {
       total: 0,
       // 油站员工信息表格数据
       personnelList: [],
+      stationOptions:[],
       // 弹出层标题
       title: "",
       // 是否显示弹出层
@@ -215,6 +224,9 @@ export default {
   },
   created() {
     this.getList();
+    stationinfo().then(response => {
+      this.stationOptions = response.rows;
+    });
   },
   methods: {
     /** 查询油站员工信息列表 */
@@ -226,6 +238,13 @@ export default {
         this.loading = false;
       });
     },
+    onInstitutionChang(e){
+      let obj = {};
+      obj = this.stationOptions.find((item)=>{//这里的userList就是上面遍历的数据源
+        return item.stationId === e;//筛选出匹配数据
+      })
+      this.form.stationName=obj.stationName;
+    },
     // 取消按钮
     cancel() {
       this.open = false;

+ 41 - 11
Yijia-SaaS/yijia-ui/src/views/station/price/index.vue

@@ -19,15 +19,23 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="油站名称"  prop="stationNanme">
-        <el-input
-          v-model="queryParams.stationNanme"
-          placeholder="请输入油站名称"
+
+      <el-form-item label="油站名称" prop="stationId">
+        <el-select
+          v-model="queryParams.stationId"
+          placeholder="请选择油站"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
-        />
+        >
+          <el-option
+            v-for="item in stationOptions"
+            :key="item.stationId"
+            :label="item.stationName"
+            :value="item.stationId"
+          ></el-option>
+        </el-select>
       </el-form-item>
+
       <el-form-item label="操作时间" prop="date">
         <el-date-picker clearable size="small" style="width: 200px"
           v-model="queryParams.date"
@@ -133,11 +141,21 @@
         <el-form-item label="油品价格" prop="oilPrice">
           <el-input v-model="form.oilPrice" placeholder="请输入油品价格" />
         </el-form-item>
-        <el-form-item  label="油站id" prop="stationId">
-          <el-input v-model="form.stationId" placeholder="请输入油站id" />
-        </el-form-item>
-        <el-form-item label="油站名称" prop="stationNanme">
-          <el-input v-model="form.stationNanme" placeholder="请输入油站名称" />
+        <el-form-item label="油站名称" prop="stationId" >
+          <el-select
+            v-model="form.stationId"
+            placeholder="请选择油站"
+            clearable
+            size="small"
+            @change="onInstitutionChang"
+          >
+            <el-option
+              v-for="item in stationOptions"
+              :key="item.stationId"
+              :label="item.stationName"
+              :value="item.stationId"
+            ></el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="操作时间" prop="date">
           <el-date-picker clearable size="small" style="width: 200px"
@@ -158,6 +176,7 @@
 
 <script>
 import { listPrice, getPrice, delPrice, addPrice, updatePrice, exportPrice } from "@/api/station/price";
+import {stationinfo} from "@/api/station/gun";
 
 export default {
   name: "Price",
@@ -191,6 +210,7 @@ export default {
         stationNanme: null,
         date: null
       },
+      stationOptions:[],
       // 表单参数
       form: {},
       // 表单校验
@@ -200,6 +220,9 @@ export default {
   },
   created() {
     this.getList();
+    stationinfo().then(response => {
+      this.stationOptions = response.rows;
+    });
   },
   methods: {
     /** 查询油品价格列表 */
@@ -294,6 +317,13 @@ export default {
           this.msgSuccess("删除成功");
         })
     },
+    onInstitutionChang(e){
+      let obj = {};
+      obj = this.stationOptions.find((item)=>{//这里的userList就是上面遍历的数据源
+        return item.stationId === e;//筛选出匹配数据
+      })
+      this.form.stationName=obj.stationName;
+    },
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;