Commit f0fb9e2c authored by 法拉51246's avatar 法拉51246

1

parent 1d3a503e
......@@ -53,4 +53,7 @@ public class InfoPageReqVO extends PageParam {
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "业务经理")
private String creator;
}
\ No newline at end of file
......@@ -31,6 +31,7 @@ public interface InfoMapper extends BaseMapperX<InfoDO> {
.eqIfPresent(InfoDO::getVisitType, reqVO.getVisitType())
.eqIfPresent(InfoDO::getCompanyId,companyId)
.betweenIfPresent(InfoDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(InfoDO::getCreator,reqVO.getCreator())
.orderByDesc(InfoDO::getVisitDate));
}
default PageResult<InfoDO> selectHomePage(InfoPageReqVO reqVO) {
......
......@@ -284,7 +284,6 @@ public class InfoServiceImpl implements InfoService {
//现根据客户名称获取历史拜访记录
List<InfoDO> info = infoMapper.selectByCompanyName(companyName);
if (info != null && !info.isEmpty()){
Long companyId = info.get(0).getCompanyId();
//取最近四次
info = info.stream()
// 筛选本月记录(基于 LocalDateTime)
......@@ -313,13 +312,15 @@ public class InfoServiceImpl implements InfoService {
visitDateList.add(infoDO.getVisitDate().toLocalDate());
});
//下面获取客户信息
CustomerInfoDO customerInfoDO = customerInfoMapper.selectByCompanyName(companyName,companyId);//这个companyId是从根据companyId获取得数据List中获取得,一定和点得这条匹配
infoPrintVO.setVisitProductNames(customerInfoDO.getProductNames());//本次拜访品种
infoPrintVO.setCompanyName(customerInfoDO.getCompanyName());//公司名称
infoPrintVO.setSalesman(customerInfoDO.getCreator());//拜访记录的创建者就是该记录的业务员
infoPrintVO.setLocationImage(customerInfoDO.getLocationImage());//公司定位图
infoPrintVO.setContact(customerInfoDO.getContact());
infoPrintVO.setDepartment(customerInfoDO.getDepartment());
// CustomerInfoDO customerInfoDO = customerInfoMapper.selectByCompanyName(companyName,companyId);//这个companyId是从根据companyId获取得数据List中获取得,一定和点得这条匹配
//根据第一条数据去展示
InfoDO infoDO1 = info.get(0);
infoPrintVO.setVisitProductNames(infoDO1.getVisitProductNames());//本次拜访品种
infoPrintVO.setCompanyName(infoDO1.getCompanyName());//公司名称
infoPrintVO.setSalesman(infoDO1.getCreator());//拜访记录的创建者就是该记录的业务员
infoPrintVO.setLocationImage(infoDO1.getLocationImage());//公司定位图
infoPrintVO.setContact(infoDO1.getContact());
infoPrintVO.setDepartment(infoDO1.getDepartment());
//添加多次的信息
infoPrintVO.setServiceContent(serviceContent);
infoPrintVO.setVisitDate(visitDateList);
......@@ -361,8 +362,8 @@ public class InfoServiceImpl implements InfoService {
//拜访时间记录
List<LocalDate> visitDateList = new ArrayList<>();
//以第一个公司名称作为合并打印的公司
String companyName = info.get(0).getCompanyName();
Long companyId = info.get(0).getCompanyId();
// String companyName = info.get(0).getCompanyName();
// Long companyId = info.get(0).getCompanyId();
//取最多4张服务图片
int maxImages = 4;
for (InfoDO infoDO : info) {
......@@ -384,14 +385,16 @@ public class InfoServiceImpl implements InfoService {
});
//下面获取客户信息
InfoPrintVO infoPrintVO = new InfoPrintVO();
CustomerInfoDO customerInfoDO = customerInfoMapper.selectByCompanyName(companyName,companyId);
if (customerInfoDO != null){
infoPrintVO.setVisitProductNames(customerInfoDO.getProductNames());//本次拜访品种
infoPrintVO.setCompanyName(customerInfoDO.getCompanyName());//公司名称
infoPrintVO.setSalesman(customerInfoDO.getCreator());//拜访记录的创建者就是该记录的业务员
infoPrintVO.setLocationImage(customerInfoDO.getLocationImage());//公司定位图
infoPrintVO.setContact(customerInfoDO.getContact());
infoPrintVO.setDepartment(customerInfoDO.getDepartment());
// CustomerInfoDO customerInfoDO = customerInfoMapper.selectByCompanyName(companyName,companyId);
InfoDO infoDO = info.get(0);
if (infoDO != null){
infoPrintVO.setVisitProductNames(infoDO.getVisitProductNames());//本次拜访品种
infoPrintVO.setCompanyName(infoDO.getCompanyName());//公司名称
infoPrintVO.setSalesman(infoDO.getCreator());//拜访记录的创建者就是该记录的业务员
infoPrintVO.setLocationImage(infoDO.getLocationImage());//公司定位图
infoPrintVO.setContact(infoDO.getContact());
infoPrintVO.setDepartment(infoDO.getDepartment());
}
//添加多次的信息
infoPrintVO.setServiceContent(serviceContent);
......
......@@ -125,16 +125,16 @@
>
菜单权限
</el-button>
<el-button
v-hasPermi="['system:permission:assign-role-data-scope']"
link
preIcon="ep:coin"
title="数据权限"
type="primary"
@click="openDataPermissionForm(scope.row)"
>
数据权限
</el-button>
<!-- <el-button-->
<!-- v-hasPermi="['system:permission:assign-role-data-scope']"-->
<!-- link-->
<!-- preIcon="ep:coin"-->
<!-- title="数据权限"-->
<!-- type="primary"-->
<!-- @click="openDataPermissionForm(scope.row)"-->
<!-- >-->
<!-- 数据权限-->
<!-- </el-button>-->
<el-button
v-hasPermi="['system:role:delete']"
link
......
......@@ -95,6 +95,16 @@
/>
</el-select>
</el-form-item>
<el-form-item label="业务经理" prop="creator">
<el-input
v-model="queryParams.creator"
placeholder="请输入业务经理"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<!-- <el-form-item label="创建时间" prop="createTime">-->
<!-- <el-date-picker-->
<!-- v-model="queryParams.createTime"-->
......@@ -201,6 +211,7 @@
<dict-tag :type="DICT_TYPE.VISIT_TYPE" :value="scope.row.visitType" />
</template>
</el-table-column>
<el-table-column label="业务经理" align="center" prop="creator" />
<!-- <el-table-column-->
<!-- label="创建时间"-->
<!-- align="center"-->
......@@ -258,7 +269,7 @@
<script setup lang="ts">
import {DICT_TYPE, getIntDictOptions} from '@/utils/dict'
import {dateFormatter,dateFormatter2} from '@/utils/formatTime'
import {dateFormatter2} from '@/utils/formatTime'
import download from '@/utils/download'
import {InfoApi, InfoVO} from '@/api/visit/info'
import InfoForm from './InfoForm.vue'
......@@ -327,6 +338,7 @@ const queryParams = reactive({
visitMethod: undefined,
visitType: undefined,
createTime: [],
creator: undefined,
})
const queryFormRef = ref() // 搜索的表单
const exportLoading = ref(false) // 导出的加载中
......
......@@ -151,7 +151,7 @@
:src="url"
style="width: 100%;
height: 25%;
object-fit: cover;
object-fit: fill;/* cover是切一部分 */
border: 1px solid #ccc;"
/>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment