Procházet zdrojové kódy

Merge remote-tracking branch 'origin/dev_v2' into dev_v2

钱惠东 před 1 měsícem
rodič
revize
1d935da0c1

+ 46 - 7
RuoYi-Vue-fast-master/src/main/java/com/ruoyi/project/business/domain/TbAgentHistory.java

@@ -1,20 +1,19 @@
 package com.ruoyi.project.business.domain;
 
-import java.math.BigDecimal;
-import java.util.Date;
-
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import com.ruoyi.framework.web.domain.BaseEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.framework.aspectj.lang.annotation.Excel;
-import com.ruoyi.framework.web.domain.BaseEntity;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
 
 @Data
 @TableName("tb_agent_history")
@@ -149,4 +148,44 @@ public class TbAgentHistory extends BaseEntity{
     @TableField(exist = false)
     private String curUserPermissionChar;
 
+
+    /**
+     * 协议生效日期:列表检索开始
+     */
+    @TableField(exist = false)
+    private Date protocolSsDate;
+    /**
+     * 协议生效日期:列表检索结束
+     */
+    @TableField(exist = false)
+    private Date protocolSeDate;
+    /**
+     * 协议失效日期:列表检索开始
+     */
+    @TableField(exist = false)
+    private Date protocolEsDate;
+    /**
+     * 协议失效日期:列表检索结束
+     */
+    @TableField(exist = false)
+    private Date protocolEeDate;
+
+    @TableField(exist = false)
+    private List<String> agentIds;
+
+    /**
+     * 多选代理商等级
+     */
+    @TableField(exist = false)
+    private List<String> agentLevels;
+
+    @TableField(exist = false)
+    private List<String> origins;
+
+    /**
+     * 多选区域
+     */
+    @TableField(exist = false)
+    private List<String> areaIds;
+
 }

+ 3 - 6
RuoYi-Vue-fast-master/src/main/java/com/ruoyi/project/business/service/impl/TbAgentHistoryServiceImpl.java

@@ -1,18 +1,15 @@
 package com.ruoyi.project.business.service.impl;
 
-import java.util.List;
-
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
-import com.ruoyi.project.business.mapper.TbAgentMapper;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.ruoyi.project.business.mapper.TbAgentHistoryMapper;
 import com.ruoyi.project.business.domain.TbAgentHistory;
+import com.ruoyi.project.business.mapper.TbAgentHistoryMapper;
 import com.ruoyi.project.business.service.ITbAgentHistoryService;
+import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.util.List;
 
 /**
  * 代理商档案Service业务层处理

+ 4 - 3
RuoYi-Vue-fast-master/src/main/java/com/ruoyi/project/business/service/impl/TbAgentServiceImpl.java

@@ -23,10 +23,9 @@ import com.ruoyi.project.business.mapper.TbAreaMapper;
 import com.ruoyi.project.common.service.ICommonService;
 import com.ruoyi.project.system.domain.SysUser;
 import com.ruoyi.project.system.service.ISysUserService;
-import java.util.Arrays;
-import java.util.List;
+
+import java.util.*;
 import java.util.concurrent.CompletableFuture;
-import java.util.Objects;
 
 import io.netty.util.internal.ObjectUtil;
 import lombok.RequiredArgsConstructor;
@@ -135,6 +134,7 @@ public class TbAgentServiceImpl extends ServiceImpl<TbAgentMapper, TbAgent> impl
         tbAgent.setPermissionChar(handlePermissionChar(tbAgent));
         TbAgentHistory tbAgentHistory = new TbAgentHistory();
         BeanUtils.copyProperties(tbAgent,tbAgentHistory);
+        tbAgentHistory.setCreateTime(new Date());
         // return tbAgentMapper.insertTbAgent(tbAgent);
         boolean r1 = save(tbAgent);
         // 保存附件
@@ -204,6 +204,7 @@ public class TbAgentServiceImpl extends ServiceImpl<TbAgentMapper, TbAgent> impl
         TbAgentHistory tbAgentHistory = new TbAgentHistory();
         //往履历表中添加记录
         BeanUtils.copyProperties(tbAgent,tbAgentHistory);
+        tbAgentHistory.setCreateTime(new Date());
         tbAgentHistoryService.save(tbAgentHistory);
         // return tbAgentMapper.updateTbAgent(tbAgent);
         tbFileService.saveOrUpdateFile(tbAgent.getAnnex(), tbAgent.getAgentId(), FileBuzType.AGENT.getType());

+ 3 - 0
RuoYi-Vue-fast-master/src/main/java/com/ruoyi/project/business/service/impl/TcAccountServiceImpl.java

@@ -221,6 +221,9 @@ public class TcAccountServiceImpl extends ServiceImpl<TcAccountMapper, TcAccount
         if (StringUtils.isNotEmpty(tcAccount.getOwnerName())) {
             tcAccount.setOwnerName(tcAccount.getOwnerName().replaceAll("%", "/%").replaceAll("_", "/_"));
         }
+        if (StringUtils.isNotEmpty(tcAccount.getCity())) {
+            tcAccount.setCity(tcAccount.getCity().replaceAll("%", "/%").replaceAll("_", "/_"));
+        }
 //        tcAccount.setPermissionChar(SecurityUtils.getPermissionCharSea());
         tcAccount.setPermissionChar(SecurityUtils.getPermissionCharIns());
         // 代理商销售经理的场合

+ 39 - 10
RuoYi-Vue-fast-master/src/main/resources/mybatis/business/TbAgentHistoryMapper.xml

@@ -91,29 +91,58 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                         getpremessionview_chars p) permission ON permission.premession_char = ah.agent_id
         <where>
             ah.del_flag = 0
-            <if test="agentId != null "> and ah.agent_id = #{agentId}</if>
+            <if test="agentIds != null and agentIds.size() > 0">
+                and ah.agent_id in
+                <foreach collection="agentIds" item="agentId" open="(" separator="," close=")">
+                    #{agentId}
+                </foreach>
+            </if>
             <if test="agentNo != null  and agentNo != ''"> and ah.agent_no like concat('%', #{agentNo}, '%')</if>
             <if test="agentName != null  and agentName != ''"> and ah.agent_name like concat('%', #{agentName}, '%')</if>
-            <if test="areaId != null "> and ah.area_id = #{areaId}</if>
+            <if test="areaIds != null and areaIds.size() > 0">
+                and ah.area_id in
+                <foreach collection="areaIds" item="areaId" open="(" separator="," close=")">
+                    #{areaId}
+                </foreach>
+            </if>
+
             <if test="countryId != null  and countryId != ''"> and ah.country_id = #{countryId}</if>
             <if test="city != null  and city != ''"> and ah.city = #{city}</if>
             <if test="agentType != null  and agentType != ''"> and ah.agent_type = #{agentType}</if>
             <if test="hasContract != null "> and ah.has_contract = #{hasContract}</if>
             <if test="parentAgentId != null "> and ah.parent_agent_id = #{parentAgentId}</if>
             <if test="parentSalerId != null "> and ah.parent_saler_id = #{parentSalerId}</if>
-            <if test="agentLevel != null  and agentLevel != ''"> and ah.agent_level = #{agentLevel}</if>
+            <if test="agentLevels != null and agentLevels.size() > 0">
+                and ah.agent_level in
+                <foreach collection="agentLevels" item="agentLevel" open="(" separator="," close=")">
+                    #{agentLevel}
+                </foreach>
+            </if>
             <if test="discount != null "> and ah.discount = #{discount}</if>
             <if test="head != null  and head != ''"> and ah.head = #{head}</if>
-            <if test="phone != null  and phone != ''"> and ah.phone = #{phone}</if>
-            <if test="email != null  and email != ''"> and ah.email = #{email}</if>
-            <if test="address != null  and address != ''"> and ah.address = #{address}</if>
+            <if test="phone != null  and phone != ''"> and ah.phone  like concat('%', #{phone}, '%')</if>
+            <if test="email != null  and email != ''"> and ah.email like concat('%',#{email},'%') </if>
+            <if test="address != null  and address != ''"> and ah.address like concat('%', #{address},'%')</if>
             <if test="status != null  and status != ''"> and ah.status = #{status}</if>
             <if test="permissionChar != null  and permissionChar != ''"> and find_in_set(#{permissionChar}, ah.permission_char)</if>
-            <if test="origin != null  and origin != ''"> and ah.origin = #{origin}</if>
+            <if test="origins != null and origins.size() > 0">
+                and ah.origin in
+                <foreach collection="origins" item="origin" open="(" separator="," close=")">
+                    #{origin}
+                </foreach>
+            </if>
             <if test="firstCooperationYear != null  and firstCooperationYear != ''"> and ah.first_cooperation_year = #{firstCooperationYear}</if>
-            <if test="protocolStartDate != null "> and ah.protocol_start_date = #{protocolStartDate}</if>
-            <if test="protocolEndDate != null "> and ah.protocol_end_date = #{protocolEndDate}</if>
-            <if test="authorizedArea != null  and authorizedArea != ''"> and ah.authorized_area = #{authorizedArea}</if>
+            <if test="protocolSsDate != null and protocolSeDate != null">and ah.protocol_start_date between #{protocolSsDate} and #{protocolSeDate}</if>
+            <if test="protocolEsDate != null and protocolEeDate != null">and ah.protocol_end_date between #{protocolEsDate} and #{protocolEeDate}</if>
+            <if test="beginTime != null and endTime != null">and ah.create_time between #{beginTime} and #{endTime}</if>
+            <if test="authorizedArea != null and authorizedArea != ''">and ah.authorized_area like concat('%', #{authorizedArea}, '%')</if>
+
+            <if test="parentAgentName != null and parentAgentName != ''">
+                and a2.agent_name like concat('%', #{parentAgentName}, '%')
+            </if>
+            <if test="parentSalerName != null and parentSalerName != ''">
+                and u.nick_name like concat('%', #{parentSalerName}, '%')
+            </if>
         </where>
         order by ah.id desc
     </select>

+ 3 - 3
ruoyi-ui-vue2/src/views/crmManagement/account/edit.vue

@@ -30,7 +30,7 @@
     </div>
     <!-- 关联项目 -->
     <div class="content" style="margin-bottom: 20px" v-if="type == 'view' && !$route.query.historyId">
-      <div class="card" :style="{width: (type === 'view' && accounts && accounts.length > 0) ?'95%' :'100%'}">
+      <div class="card" style="width: 100%">
         <div class="flex-center-left mb16">
           <!--              <img class="item-size" src="../../../assets/images/account-item.png" alt="">-->
           <!--              <div class="card-title">{{ $t('account.project') }}</div>-->
@@ -77,8 +77,8 @@
         <pagination :auto-scroll="false" :total="projectTotal" :page.sync="projectQueryParams.pageNum"
                     :limit.sync="projectQueryParams.pageSize" @pagination="getProjectListByAccount"/>
       </div>
-            <el-button v-if="type === 'view' && accounts && accounts.length > 0" icon="el-icon-remove-outline" plain size="mini" @click="cancelMerge" style="width: 5%">
-              {{ $t('account.unmerge') }}</el-button>
+<!--            <el-button v-if="type === 'view' && accounts && accounts.length > 0" icon="el-icon-remove-outline" plain size="mini" @click="cancelMerge" style="width: 5%">-->
+<!--              {{ $t('account.unmerge') }}</el-button>-->
     </div>
 
     <div class="content">

+ 7 - 6
ruoyi-ui-vue2/src/views/crmManagement/project/view.vue

@@ -443,7 +443,7 @@
               <div class="card-item follow-list">
                 <div style="height: 22px;margin-bottom: 20px;">{{ $t('account.follow') }}</div>
                 <el-table :data="followList" border v-loading="followLoading" height="33vh" max-height="70%"
-                          :header-cell-style="{ background: '#F4F6F8', color: '#92A2B5' }">
+                          :header-cell-style="{ background: '#F4F6F8', color: '#92A2B5' }" class="custom-table">
                   <el-table-column label="No" type="index" width="50" align="center" />
                   <!-- <el-table-column :label="$t('follow.followNo')" prop="followNo" width="200px"></el-table-column> -->
                   <el-table-column :label="$t('follow.followTime')" prop="followTime" width="150px">
@@ -457,7 +457,7 @@
                   <!-- <el-table-column prop="createByName" :label="$t('account.followPerson')" show-overflow-tooltip
                                    width="120px"></el-table-column> -->
                   <el-table-column :label="$t('follow.followDesc')" prop="followDesc" width="200" show-overflow-tooltip></el-table-column>
-                  <el-table-column fixed="right" :label="$t('common.operate')" align="center">
+                  <el-table-column fixed="right" :label="$t('common.operate')" align="center" >
                     <template slot-scope="{ row }">
                       <el-button size="small" type="text" @click.native.prevent="handleViewFollow(row)">
                         {{ $t('common.view') }}
@@ -473,14 +473,14 @@
               <div class="card-item quotation-list">
                 <div style="margin-bottom: 20px;">{{ $t('engineering.quotation') }}</div>
                 <el-table :data="quotationList" height="33vh" border row-key="id" children="children"
-                          :header-cell-style="{ background: '#F4F6F8', color: '#92A2B5' }">
+                          :header-cell-style="{ background: '#F4F6F8', color: '#92A2B5' }" class="custom-table">
                   <!--<el-table-column label="No" type="index" width="50" align="center" />-->
                   <!--报价编号-->
                   <Column :label="$t('quotation.quotationNo')" prop="quotationNo" :min-width="200"/>
                   <!--版本号-->
                   <Column :label="$t('common.version')" prop="version"/>
                   <!--币种-->
-                  <Column :label="$t('project.currency')" prop="currencyId" width="200px"/>
+                  <Column :label="$t('project.currency')" prop="currencyId" width="200px" searchType="select" :searchDict="dict.type.currency_type"/>
                   <!--梯形-->
                   <Column :label="$t('quotation.suitModel')" prop="elevatorModel"/>
                   <!--报价者-->
@@ -518,7 +518,7 @@
               <div class="card-item plot-list">
                 <div style="margin-bottom: 20px;">{{ $t('engineering.associatedPlot') }}</div>
                 <el-table :data="engineeringList" height="33vh" border
-                          :header-cell-style="{ background: '#F4F6F8', color: '#92A2B5' }">
+                          :header-cell-style="{ background: '#F4F6F8', color: '#92A2B5' }" class="custom-table">
                   <el-table-column label="No" type="index" width="50" align="center" />
                   <Column :label="$t('engineering.no')" prop="civilEngineeringNo" width="200px"/>
                   <Column :label="$t('quotation.quotationNo')" prop="quotationNo" width="200px"/>
@@ -1564,9 +1564,10 @@ export default {
 
 
 //表头fixed列导致的不整洁
-::v-deep  .el-table--medium .el-table__cell{
+::v-deep  .custom-table.el-table--medium .el-table__cell{
   padding: 0px !important;
 }
 
+
 </style>
 

+ 38 - 62
ruoyi-ui-vue2/src/views/user/tcAgentHistory/index.vue

@@ -9,7 +9,7 @@
         </el-button>
       </template>
       <template #default="{ list }">
-        <Column label="代理商ID" :searchParams="queryParams" :showSearch="true" fixed prop="agentId" sortable="custom"/>
+<!--        <Column label="代理商ID" :searchParams="queryParams" :showSearch="true" fixed prop="agentId" sortable="custom"/>-->
         <!--代理商编号-->
         <Column :label="$t('agent.agentNo')" :searchParams="queryParams" :showSearch="true" fixed prop="agentNo" sortable="custom"/>
         <!--代理商名称-->
@@ -52,6 +52,9 @@
           </template>
         </Column>
 
+        <!--授权区域-->
+        <Column :label="$t('agent.authorizedArea')" prop="authorizedArea" width="250" show-search :searchParams="queryParams"/>
+
         <!--城市-->
         <Column :label="$t('project.city')" prop="city" show-search :searchParams="queryParams"/>
 
@@ -75,6 +78,12 @@
         <!-- 协议失效日期-->
         <Column :label="$t('agent.protocolEndDate')" prop="protocolEndDate" show-search :searchParams="queryParams"
                 search-type="dateRange" prop-start="protocolEsDate" prop-end="protocolEeDate" width="250"/>
+
+        <!--创建时间-->
+        <Column :label="$t('common.createTime')" :searchParams="queryParams" :showSearch="true" prop="createTime"
+                searchType="dateRange"  prop-start="beginTime" prop-end="endTime"  width="300px">
+
+        </Column>
         <!--国家-->
 <!--        <Column :label="$t('account.country')" :search-dict="curCountryOps" :showSearch="true" label-prop="second"-->
 <!--                prop="countryId"-->
@@ -86,16 +95,16 @@
 <!--        </Column>-->
 
         <Column :label="$t('common.operate')" :min-width="180" :showSearch="true" fixed="right" searchType="operate">
-          <template #default="{ row }">
-            <!--编辑-->
-            <el-button v-hasPermi="['user:tcAgentHistory:edit']" :disabled="row.agentId === 0" icon="el-icon-edit" size="mini"
-                       type="text" @click="handleUpdate(row)">{{ $t('common.edit') }}
-            </el-button>
-            <!--删除-->
-            <el-button v-hasPermi="['user:tcAgentHistory:del']" :disabled="row.agentId === 0" icon="el-icon-delete" size="mini"
-                       type="text" @click="handleDelete(row)">{{ $t('common.delete') }}
-            </el-button>
-          </template>
+<!--          <template #default="{ row }">-->
+<!--            &lt;!&ndash;编辑&ndash;&gt;-->
+<!--            <el-button v-hasPermi="['user:tcAgentHistory:edit']" :disabled="row.agentId === 0" icon="el-icon-edit" size="mini"-->
+<!--                       type="text" @click="handleUpdate(row)">{{ $t('common.edit') }}-->
+<!--            </el-button>-->
+<!--            &lt;!&ndash;删除&ndash;&gt;-->
+<!--            <el-button v-hasPermi="['user:tcAgentHistory:del']" :disabled="row.agentId === 0" icon="el-icon-delete" size="mini"-->
+<!--                       type="text" @click="handleDelete(row)">{{ $t('common.delete') }}-->
+<!--            </el-button>-->
+<!--          </template>-->
         </Column>
 
       </template>
@@ -104,7 +113,6 @@
     </card-table>
 
 
-
 <!--      <el-form-item label="负责人名称" prop="head">-->
 <!--        <el-input v-model="queryParams.head" placeholder="请输入负责人名称" clearable @keyup.enter.native="handleQuery"/>-->
 <!--      </el-form-item>-->
@@ -117,49 +125,6 @@
 
 
 
-
-
-<!--    <el-table v-loading="loading" :data="historyList" @selection-change="handleSelectionChange">-->
-
-<!--        <template slot-scope="scope">-->
-<!--          <span>{{ parseTime(scope.row.protocolStartDate, '{y}-{m}-{d}') }}</span>-->
-<!--        </template>-->
-<!--      </el-table-column>-->
-<!--      <el-table-column label="协议失效日期" align="center" prop="protocolEndDate" width="180">-->
-<!--        <template slot-scope="scope">-->
-<!--          <span>{{ parseTime(scope.row.protocolEndDate, '{y}-{m}-{d}') }}</span>-->
-<!--        </template>-->
-<!--      </el-table-column>-->
-<!--      <el-table-column label="授权区域" align="center" prop="authorizedArea" />-->
-<!--      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
-<!--        <template slot-scope="scope">-->
-<!--          <el-button-->
-<!--            size="mini"-->
-<!--            type="text"-->
-<!--            icon="el-icon-edit"-->
-<!--            @click="handleUpdate(scope.row)"-->
-<!--            v-hasPermi="['system:history:edit']"-->
-<!--          >修改</el-button>-->
-<!--          <el-button-->
-<!--            size="mini"-->
-<!--            type="text"-->
-<!--            icon="el-icon-delete"-->
-<!--            @click="handleDelete(scope.row)"-->
-<!--            v-hasPermi="['system:history:remove']"-->
-<!--          >删除</el-button>-->
-<!--        </template>-->
-<!--      </el-table-column>-->
-<!--    </el-table>-->
-
-<!--    <pagination-->
-<!--      v-show="total>0"-->
-<!--      :total="total"-->
-<!--      :page.sync="queryParams.pageNum"-->
-<!--      :limit.sync="queryParams.pageSize"-->
-<!--      @pagination="getList"-->
-<!--    />-->
-
-
   </div>
 </template>
 
@@ -352,6 +317,7 @@ export default {
       this.$set(this.form, 'protocolStartDate', null)
       this.$set(this.form, 'protocolEndDate', null)
       this.$set(this.form, 'authorizedArea', null)
+      this.$set(this.form, 'parentAgentName', null)
       //this.resetForm("form");
       this.areaTree = [];
     },
@@ -363,7 +329,6 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.$set(this.queryParams, 'agentId', null)
-      this.$set(this.queryParams, 'id', null)
       this.$set(this.queryParams, 'agentNo', null)
       this.$set(this.queryParams, 'agentName', null)
       this.$set(this.queryParams, 'areaId', null)
@@ -381,17 +346,28 @@ export default {
       this.$set(this.queryParams, 'address', null)
       this.$set(this.queryParams, 'status', null)
       this.$set(this.queryParams, 'permissionChar', null)
-      this.$set(this.queryParams, 'delFlag', null)
-      this.$set(this.queryParams, 'createTime', null)
-      this.$set(this.queryParams, 'createBy', null)
-      this.$set(this.queryParams, 'updateTime', null)
-      this.$set(this.queryParams, 'updateBy', null)
-      this.$set(this.queryParams, 'remark', null)
       this.$set(this.queryParams, 'origin', null)
       this.$set(this.queryParams, 'firstCooperationYear', null)
       this.$set(this.queryParams, 'protocolStartDate', null)
       this.$set(this.queryParams, 'protocolEndDate', null)
       this.$set(this.queryParams, 'authorizedArea', null)
+
+      this.$set(this.queryParams, 'protocolSsDate', null);
+      this.$set(this.queryParams, 'protocolSeDate', null);
+      this.$set(this.queryParams, 'protocolEsDate', null);
+      this.$set(this.queryParams, 'protocolEeDate', null);
+
+      this.$set(this.queryParams, 'areaIds', null)
+      this.$set(this.queryParams, 'parentAgentName', null)
+      this.$set(this.queryParams, 'parentSalerName', null)
+      this.$set(this.queryParams, 'agentLevels', null)
+      this.$set(this.queryParams, 'origins', null)
+
+      this.$set(this.queryParams, 'beginTime', null)
+      this.$set(this.queryParams, 'endTime', null)
+
+
+
       this.handleQuery();
     },
     // 多选框选中数据