Merge branch 'main' of http://jialcheerful.club:3000/xd/JNBusiness
This commit is contained in:
commit
2d9f13ea59
|
@ -1,12 +1,7 @@
|
||||||
package com.ruoyi.web.controller.monitor;
|
package com.ruoyi.web.controller.monitor;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Properties;
|
|
||||||
import java.util.Set;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.redis.core.RedisCallback;
|
import org.springframework.data.redis.core.RedisCallback;
|
||||||
import org.springframework.data.redis.core.RedisTemplate;
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
|
@ -87,7 +82,7 @@ public class CacheController
|
||||||
public AjaxResult getCacheKeys(@PathVariable String cacheName)
|
public AjaxResult getCacheKeys(@PathVariable String cacheName)
|
||||||
{
|
{
|
||||||
Set<String> cacheKeys = redisTemplate.keys(cacheName + "*");
|
Set<String> cacheKeys = redisTemplate.keys(cacheName + "*");
|
||||||
return AjaxResult.success(cacheKeys);
|
return AjaxResult.success(new TreeSet<>(cacheKeys));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('monitor:cache:list')")
|
@PreAuthorize("@ss.hasPermi('monitor:cache:list')")
|
||||||
|
|
|
@ -168,17 +168,19 @@ public class QuotController extends BaseController
|
||||||
* 获取报价详细信息-整单通过
|
* 获取报价详细信息-整单通过
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('quot:quot:allPass')")
|
@PreAuthorize("@ss.hasPermi('quot:quot:allPass')")
|
||||||
@GetMapping(value = "/allPass/{quotId}")
|
@GetMapping(value = "/allPass/{quotIds}")
|
||||||
@Log(title = "报价单-手动更新状态为通过", businessType = BusinessType.UPDATE)
|
@Log(title = "报价单-手动更新状态为通过", businessType = BusinessType.UPDATE)
|
||||||
public AjaxResult getAllPassInfo(@PathVariable("quotId") String quotId)
|
public AjaxResult getAllPassInfo(@PathVariable("quotIds") String[] quotIds)
|
||||||
{
|
{
|
||||||
Quot quot = new Quot();
|
for(String quotId:quotIds){
|
||||||
quot.setQuotId(quotId);
|
Quot quot = new Quot();
|
||||||
quot.setQuotApprovalStatus("2");// 提交状态设置为 通过
|
quot.setQuotId(quotId);
|
||||||
quot.setQuotQuotationDate(DateUtils.getNowDate());//报价单-报价日期设置为 当前日期
|
quot.setQuotApprovalStatus("2");// 提交状态设置为 通过
|
||||||
quot.setQuotCheckUserName(getUsername());
|
quot.setQuotQuotationDate(DateUtils.getNowDate());//报价单-报价日期设置为 当前日期
|
||||||
quotService.updateQuotAllPassInfo(quot);
|
quot.setQuotCheckUserName(getUsername());
|
||||||
return success(quot);
|
quotService.updateQuotAllPassInfo(quot);
|
||||||
|
}
|
||||||
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -642,7 +642,17 @@ public class RedBookController extends BaseController
|
||||||
@GetMapping(value = "/{quotId}")
|
@GetMapping(value = "/{quotId}")
|
||||||
public AjaxResult getInfo(@PathVariable("quotId") String quotId)
|
public AjaxResult getInfo(@PathVariable("quotId") String quotId)
|
||||||
{
|
{
|
||||||
return success(redBookService.selectQuotByQuotId(quotId));
|
OAQuot aAQuot = redBookService.selectQuotByQuotId(quotId);
|
||||||
|
String rbDateUid = aAQuot.getRbDateUid();
|
||||||
|
|
||||||
|
List<OAQuotProduct> aAQuotProduct= aAQuot.getSelectedResultData();
|
||||||
|
for(OAQuotProduct p:aAQuotProduct){
|
||||||
|
if(StringUtils.isEmpty(p.getUid_0())){
|
||||||
|
p.setUid_0(rbDateUid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return success(aAQuot);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -663,7 +673,11 @@ public class RedBookController extends BaseController
|
||||||
return toAjax(redBookService.deleteQuotsByQuotId(quotId));
|
return toAjax(redBookService.deleteQuotsByQuotId(quotId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出所选的红本产品明细数据
|
||||||
|
* @param response
|
||||||
|
* @param selectedResultData
|
||||||
|
*/
|
||||||
@PostMapping("/exportProduct")
|
@PostMapping("/exportProduct")
|
||||||
public void exportMaterial(HttpServletResponse response, @RequestParam("selectedResultData") String selectedResultData)
|
public void exportMaterial(HttpServletResponse response, @RequestParam("selectedResultData") String selectedResultData)
|
||||||
{
|
{
|
||||||
|
|
|
@ -148,6 +148,8 @@ public class SysUserController extends BaseController
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@Validated @RequestBody SysUser user)
|
public AjaxResult add(@Validated @RequestBody SysUser user)
|
||||||
{
|
{
|
||||||
|
deptService.checkDeptDataScope(user.getDeptId());
|
||||||
|
roleService.checkRoleDataScope(user.getRoleIds());
|
||||||
if (!userService.checkUserNameUnique(user))
|
if (!userService.checkUserNameUnique(user))
|
||||||
{
|
{
|
||||||
return error("新增用户'" + user.getUserName() + "'失败,登录账号已存在");
|
return error("新增用户'" + user.getUserName() + "'失败,登录账号已存在");
|
||||||
|
@ -180,6 +182,8 @@ public class SysUserController extends BaseController
|
||||||
{
|
{
|
||||||
userService.checkUserAllowed(user);
|
userService.checkUserAllowed(user);
|
||||||
userService.checkUserDataScope(user.getUserId());
|
userService.checkUserDataScope(user.getUserId());
|
||||||
|
deptService.checkDeptDataScope(user.getDeptId());
|
||||||
|
roleService.checkRoleDataScope(user.getRoleIds());
|
||||||
if (!userService.checkUserNameUnique(user))
|
if (!userService.checkUserNameUnique(user))
|
||||||
{
|
{
|
||||||
return error("修改用户'" + user.getUserName() + "'失败,登录账号已存在");
|
return error("修改用户'" + user.getUserName() + "'失败,登录账号已存在");
|
||||||
|
@ -301,6 +305,7 @@ public class SysUserController extends BaseController
|
||||||
public AjaxResult insertAuthRole(Long userId, Long[] roleIds)
|
public AjaxResult insertAuthRole(Long userId, Long[] roleIds)
|
||||||
{
|
{
|
||||||
userService.checkUserDataScope(userId);
|
userService.checkUserDataScope(userId);
|
||||||
|
roleService.checkRoleDataScope(roleIds);
|
||||||
userService.insertUserAuth(userId, roleIds);
|
userService.insertUserAuth(userId, roleIds);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,11 @@ package com.ruoyi.web.controller.technicalConfirm;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.ruoyi.common.constant.CacheConstants;
|
||||||
import com.ruoyi.common.constant.WebsocketConst;
|
import com.ruoyi.common.constant.WebsocketConst;
|
||||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||||
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
|
import com.ruoyi.common.core.redis.RedisLock;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
@ -12,6 +15,7 @@ import com.ruoyi.quot.service.IQuotService;
|
||||||
import com.ruoyi.system.service.ISysNoticeService;
|
import com.ruoyi.system.service.ISysNoticeService;
|
||||||
import com.ruoyi.technicalConfirm.domain.QuotJsqr;
|
import com.ruoyi.technicalConfirm.domain.QuotJsqr;
|
||||||
import com.ruoyi.technicalConfirm.domain.QuotJsqrXzDetail;
|
import com.ruoyi.technicalConfirm.domain.QuotJsqrXzDetail;
|
||||||
|
import com.ruoyi.technicalConfirm.domain.QuotJsqrXzRemark;
|
||||||
import com.ruoyi.technicalConfirm.service.IQuotJsqrService;
|
import com.ruoyi.technicalConfirm.service.IQuotJsqrService;
|
||||||
import com.ruoyi.web.utils.SendNotice.NoticeUtil;
|
import com.ruoyi.web.utils.SendNotice.NoticeUtil;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
@ -51,6 +55,12 @@ public class QuotJsqrController extends BaseController
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysNoticeService noticeService;
|
private ISysNoticeService noticeService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RedisCache redisCache;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RedisLock redisLock;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询报价单-技术确认单列表
|
* 查询报价单-技术确认单列表
|
||||||
*/
|
*/
|
||||||
|
@ -116,8 +126,11 @@ public class QuotJsqrController extends BaseController
|
||||||
@PostMapping("/doOperate")
|
@PostMapping("/doOperate")
|
||||||
public AjaxResult doOperate(HttpServletResponse response, @RequestBody QuotJsqrXzDetail info)
|
public AjaxResult doOperate(HttpServletResponse response, @RequestBody QuotJsqrXzDetail info)
|
||||||
{
|
{
|
||||||
|
String currentUser = getLoginUser().getUser().getNickName();
|
||||||
|
|
||||||
QuotJsqr quotJsqr = new QuotJsqr();
|
QuotJsqr quotJsqr = new QuotJsqr();
|
||||||
String quotJsqrId = info.getQuotJsqrId();
|
String quotJsqrId = info.getQuotJsqrId();
|
||||||
|
QuotJsqr quotJsqrEntity = quotJsqrService.selectQuotJsqrByQuotJsqrId(quotJsqrId);
|
||||||
quotJsqr.setQuotJsqrId(quotJsqrId);
|
quotJsqr.setQuotJsqrId(quotJsqrId);
|
||||||
|
|
||||||
String quotJsxzGroup = info.getQuotJsxzGroup();//组名
|
String quotJsxzGroup = info.getQuotJsxzGroup();//组名
|
||||||
|
@ -133,6 +146,14 @@ public class QuotJsqrController extends BaseController
|
||||||
quotJsqr.setQuotJsqrTlRemark(info.getQuotJsqrTlRemark());
|
quotJsqr.setQuotJsqrTlRemark(info.getQuotJsqrTlRemark());
|
||||||
|
|
||||||
String quotJsqrTlRemark = info.getQuotJsqrTlRemark();
|
String quotJsqrTlRemark = info.getQuotJsqrTlRemark();
|
||||||
|
|
||||||
|
if("2".equals(quotJsqrEntity.getQuotJsqrTlOperateState())){
|
||||||
|
return error("特缆协助操作人已通过,请勿重复操作");
|
||||||
|
}
|
||||||
|
if("3".equals(quotJsqrEntity.getQuotJsqrTlOperateState())){
|
||||||
|
return error("特缆协助操作人已被驳回,请勿重复操作");
|
||||||
|
}
|
||||||
|
|
||||||
if("3".equals(state)){//驳回
|
if("3".equals(state)){//驳回
|
||||||
if(StringUtils.isEmpty(quotJsqrTlRemark)){
|
if(StringUtils.isEmpty(quotJsqrTlRemark)){
|
||||||
return error("特缆协助说明不能为空");
|
return error("特缆协助说明不能为空");
|
||||||
|
@ -143,6 +164,13 @@ public class QuotJsqrController extends BaseController
|
||||||
return error("特缆反馈附件 或 特缆协助说明 至少填写一项");
|
return error("特缆反馈附件 或 特缆协助说明 至少填写一项");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 清空redis 协助说明key
|
||||||
|
String hvalue = redisCache.getCacheMapValue("quotJsqrXzRemark",quotJsqrEntity.getQuotJsqrCode()+"_TL");
|
||||||
|
if(StringUtils.isNotEmpty(hvalue) && currentUser.equals(hvalue)){
|
||||||
|
redisCache.deleteCacheMapValue("quotJsqrXzRemark",quotJsqrEntity.getQuotJsqrCode()+"_TL");
|
||||||
|
redisLock.unLock(quotJsqrEntity.getQuotJsqrCode()+"_TL",currentUser);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if("checker".equals(type)){//审核人通过、驳回
|
if("checker".equals(type)){//审核人通过、驳回
|
||||||
quotJsqr.setQuotJsqrTlCheckUserName(getLoginUser().getUser().getNickName());
|
quotJsqr.setQuotJsqrTlCheckUserName(getLoginUser().getUser().getNickName());
|
||||||
|
@ -183,6 +211,14 @@ public class QuotJsqrController extends BaseController
|
||||||
quotJsqr.setQuotJsqrDyRemark(info.getQuotJsqrDyRemark());
|
quotJsqr.setQuotJsqrDyRemark(info.getQuotJsqrDyRemark());
|
||||||
|
|
||||||
String quotJsqrDyRemark = info.getQuotJsqrDyRemark();
|
String quotJsqrDyRemark = info.getQuotJsqrDyRemark();
|
||||||
|
|
||||||
|
if("2".equals(quotJsqrEntity.getQuotJsqrDyOperateState())){
|
||||||
|
return error("低压协助操作人已通过,请勿重复操作");
|
||||||
|
}
|
||||||
|
if("3".equals(quotJsqrEntity.getQuotJsqrDyOperateState())){
|
||||||
|
return error("低压协助操作人已被驳回,请勿重复操作");
|
||||||
|
}
|
||||||
|
|
||||||
if("3".equals(state)){//驳回
|
if("3".equals(state)){//驳回
|
||||||
if(StringUtils.isEmpty(quotJsqrDyRemark)){
|
if(StringUtils.isEmpty(quotJsqrDyRemark)){
|
||||||
return error("低压协助说明不能为空");
|
return error("低压协助说明不能为空");
|
||||||
|
@ -193,6 +229,13 @@ public class QuotJsqrController extends BaseController
|
||||||
return error("低压反馈附件 或 低压协助说明 至少填写一项");
|
return error("低压反馈附件 或 低压协助说明 至少填写一项");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 清空redis 协助说明key
|
||||||
|
String hvalue = redisCache.getCacheMapValue("quotJsqrXzRemark",quotJsqrEntity.getQuotJsqrCode()+"_DY");
|
||||||
|
if(StringUtils.isNotEmpty(hvalue) && currentUser.equals(hvalue)){
|
||||||
|
redisCache.deleteCacheMapValue("quotJsqrXzRemark",quotJsqrEntity.getQuotJsqrCode()+"_DY");
|
||||||
|
redisLock.unLock(quotJsqrEntity.getQuotJsqrCode()+"_DY",currentUser);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if("checker".equals(type)){//审核人通过、驳回
|
if("checker".equals(type)){//审核人通过、驳回
|
||||||
quotJsqr.setQuotJsqrDyCheckUserName(getLoginUser().getUser().getNickName());
|
quotJsqr.setQuotJsqrDyCheckUserName(getLoginUser().getUser().getNickName());
|
||||||
|
@ -233,6 +276,14 @@ public class QuotJsqrController extends BaseController
|
||||||
quotJsqr.setQuotJsqrZyRemark(info.getQuotJsqrZyRemark());
|
quotJsqr.setQuotJsqrZyRemark(info.getQuotJsqrZyRemark());
|
||||||
|
|
||||||
String quotJsqrZyRemark = info.getQuotJsqrZyRemark();
|
String quotJsqrZyRemark = info.getQuotJsqrZyRemark();
|
||||||
|
|
||||||
|
if("2".equals(quotJsqrEntity.getQuotJsqrZyOperateState())){
|
||||||
|
return error("中压协助操作人已通过,请勿重复操作");
|
||||||
|
}
|
||||||
|
if("3".equals(quotJsqrEntity.getQuotJsqrZyOperateState())){
|
||||||
|
return error("中压协助操作人已被驳回,请勿重复操作");
|
||||||
|
}
|
||||||
|
|
||||||
if("3".equals(state)){//驳回
|
if("3".equals(state)){//驳回
|
||||||
if(StringUtils.isEmpty(quotJsqrZyRemark)){
|
if(StringUtils.isEmpty(quotJsqrZyRemark)){
|
||||||
return error("中压协助说明不能为空");
|
return error("中压协助说明不能为空");
|
||||||
|
@ -243,6 +294,13 @@ public class QuotJsqrController extends BaseController
|
||||||
return error("中压反馈附件 或 低压协助说明 至少填写一项");
|
return error("中压反馈附件 或 低压协助说明 至少填写一项");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 清空redis 协助说明key
|
||||||
|
String hvalue = redisCache.getCacheMapValue("quotJsqrXzRemark",quotJsqrEntity.getQuotJsqrCode()+"_ZY");
|
||||||
|
if(StringUtils.isNotEmpty(hvalue) && currentUser.equals(hvalue)){
|
||||||
|
redisCache.deleteCacheMapValue("quotJsqrXzRemark",quotJsqrEntity.getQuotJsqrCode()+"_ZY");
|
||||||
|
redisLock.unLock(quotJsqrEntity.getQuotJsqrCode()+"_ZY",currentUser);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if("checker".equals(type)){//审核人通过、驳回
|
if("checker".equals(type)){//审核人通过、驳回
|
||||||
quotJsqr.setQuotJsqrZyCheckUserName(getLoginUser().getUser().getNickName());
|
quotJsqr.setQuotJsqrZyCheckUserName(getLoginUser().getUser().getNickName());
|
||||||
|
@ -284,6 +342,14 @@ public class QuotJsqrController extends BaseController
|
||||||
quotJsqr.setQuotJsqrQtRemark(info.getQuotJsqrQtRemark());
|
quotJsqr.setQuotJsqrQtRemark(info.getQuotJsqrQtRemark());
|
||||||
|
|
||||||
String quotJsqrQtRemark = info.getQuotJsqrQtRemark();
|
String quotJsqrQtRemark = info.getQuotJsqrQtRemark();
|
||||||
|
|
||||||
|
if("2".equals(quotJsqrEntity.getQuotJsqrQtOperateState())){
|
||||||
|
return error("其他协助操作人已通过,请勿重复操作");
|
||||||
|
}
|
||||||
|
if("3".equals(quotJsqrEntity.getQuotJsqrQtOperateState())){
|
||||||
|
return error("其他协助操作人已被驳回,请勿重复操作");
|
||||||
|
}
|
||||||
|
|
||||||
if("3".equals(state)){//驳回
|
if("3".equals(state)){//驳回
|
||||||
if(StringUtils.isEmpty(quotJsqrQtRemark)){
|
if(StringUtils.isEmpty(quotJsqrQtRemark)){
|
||||||
return error("其他协助说明不能为空");
|
return error("其他协助说明不能为空");
|
||||||
|
@ -294,6 +360,13 @@ public class QuotJsqrController extends BaseController
|
||||||
return error("其他反馈附件 或 其他协助说明 至少填写一项");
|
return error("其他反馈附件 或 其他协助说明 至少填写一项");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 清空redis 协助说明key
|
||||||
|
String hvalue = redisCache.getCacheMapValue("quotJsqrXzRemark",quotJsqrEntity.getQuotJsqrCode()+"_QT");
|
||||||
|
if(StringUtils.isNotEmpty(hvalue) && currentUser.equals(hvalue)){
|
||||||
|
redisCache.deleteCacheMapValue("quotJsqrXzRemark",quotJsqrEntity.getQuotJsqrCode()+"_QT");
|
||||||
|
redisLock.unLock(quotJsqrEntity.getQuotJsqrCode()+"_QT",currentUser);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if("checker".equals(type)){//审核人通过、驳回
|
if("checker".equals(type)){//审核人通过、驳回
|
||||||
quotJsqr.setQuotJsqrQtCheckUserName(getLoginUser().getUser().getNickName());
|
quotJsqr.setQuotJsqrQtCheckUserName(getLoginUser().getUser().getNickName());
|
||||||
|
@ -411,4 +484,43 @@ public class QuotJsqrController extends BaseController
|
||||||
List<String> userIds = noticeService.getSendEmp(WebsocketConst.MSG_SEND_QUOT_BJZ);
|
List<String> userIds = noticeService.getSendEmp(WebsocketConst.MSG_SEND_QUOT_BJZ);
|
||||||
NoticeUtil.sendNoticesBusiness(loginUser,"有报价单已完成技术协助","单号:"+quotJsqr.getQuotCode(),userIds);
|
NoticeUtil.sendNoticesBusiness(loginUser,"有报价单已完成技术协助","单号:"+quotJsqr.getQuotCode(),userIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听协助说明,有数据输入则加入redis
|
||||||
|
*/
|
||||||
|
@PostMapping("/setRedisJsxz")
|
||||||
|
public AjaxResult setRedisJsxz(HttpServletResponse response, @RequestBody QuotJsqrXzRemark info)
|
||||||
|
{
|
||||||
|
String currentUser = getLoginUser().getUser().getNickName();
|
||||||
|
String type = info.getType();
|
||||||
|
String quotJsqrCode = info.getQuotJsqrCode();
|
||||||
|
String remark = info.getRemark();
|
||||||
|
|
||||||
|
if(StringUtils.isNotBlank(remark)){
|
||||||
|
// 判断 redis 中有无 quotJsqrXzRemark key
|
||||||
|
Boolean lock = redisLock.getLock(quotJsqrCode+"_"+type, 10,currentUser);
|
||||||
|
if(lock){
|
||||||
|
String hvalue = redisCache.getCacheMapValue("quotJsqrXzRemark",quotJsqrCode+"_"+type);
|
||||||
|
if(StringUtils.isEmpty(hvalue)){
|
||||||
|
redisCache.setCacheMapValue("quotJsqrXzRemark",quotJsqrCode+"_"+type,currentUser);
|
||||||
|
}else if(!hvalue.equals(currentUser)){
|
||||||
|
return error("当前有其他用户【"+hvalue+"】正在录入");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
String hvalue = redisCache.getCacheMapValue("quotJsqrXzRemark",quotJsqrCode+"_"+type);
|
||||||
|
if(StringUtils.isNotEmpty(hvalue)){
|
||||||
|
if(!currentUser.equals(hvalue)){
|
||||||
|
return error("当前有其他用户【"+hvalue+"】正在录入");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{// 清空 协助说明时清空redis对应的值
|
||||||
|
String hvalue = redisCache.getCacheMapValue("quotJsqrXzRemark",quotJsqrCode+"_"+type);
|
||||||
|
if(StringUtils.isNotEmpty(hvalue) && currentUser.equals(hvalue)){
|
||||||
|
redisCache.deleteCacheMapValue("quotJsqrXzRemark",quotJsqrCode+"_"+type);
|
||||||
|
redisLock.unLock(quotJsqrCode+"_"+type,currentUser);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return success();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.ruoyi.common.annotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Target({ElementType.FIELD})
|
||||||
|
@Documented
|
||||||
|
public @interface DataName {
|
||||||
|
String name() default ""; // 字段名称
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 读取枚举内容转义表达式 (如: 0=男,1=女,2=未知)
|
||||||
|
*/
|
||||||
|
String readConverterExp() default "";
|
||||||
|
}
|
|
@ -88,6 +88,11 @@ public @interface Excel
|
||||||
*/
|
*/
|
||||||
public String[] combo() default {};
|
public String[] combo() default {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否从字典读数据到combo,默认不读取,如读取需要设置dictType注解.
|
||||||
|
*/
|
||||||
|
public boolean comboReadDict() default false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否需要纵向合并单元格,应对需求:含有list集合单元格)
|
* 是否需要纵向合并单元格,应对需求:含有list集合单元格)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -73,6 +73,11 @@
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
<version>1.18.26</version>
|
<version>1.18.26</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus</artifactId>
|
||||||
|
<version>2.0.5</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
|
@ -92,11 +92,18 @@ public class DataScopeAspect
|
||||||
{
|
{
|
||||||
StringBuilder sqlString = new StringBuilder();
|
StringBuilder sqlString = new StringBuilder();
|
||||||
List<String> conditions = new ArrayList<String>();
|
List<String> conditions = new ArrayList<String>();
|
||||||
|
List<String> scopeCustomIds = new ArrayList<String>();
|
||||||
|
user.getRoles().forEach(role -> {
|
||||||
|
if (DATA_SCOPE_CUSTOM.equals(role.getDataScope()) && StringUtils.isNotEmpty(permission) && StringUtils.isNotEmpty(role.getPermissions()) && StringUtils.containsAny(role.getPermissions(), Convert.toStrArray(permission)))
|
||||||
|
{
|
||||||
|
scopeCustomIds.add(Convert.toStr(role.getRoleId()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
for (SysRole role : user.getRoles())
|
for (SysRole role : user.getRoles())
|
||||||
{
|
{
|
||||||
String dataScope = role.getDataScope();
|
String dataScope = role.getDataScope();
|
||||||
if (!DATA_SCOPE_CUSTOM.equals(dataScope) && conditions.contains(dataScope))
|
if (conditions.contains(dataScope))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -113,9 +120,15 @@ public class DataScopeAspect
|
||||||
}
|
}
|
||||||
else if (DATA_SCOPE_CUSTOM.equals(dataScope))
|
else if (DATA_SCOPE_CUSTOM.equals(dataScope))
|
||||||
{
|
{
|
||||||
sqlString.append(StringUtils.format(
|
if (scopeCustomIds.size() > 1)
|
||||||
" OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id = {} ) ", deptAlias,
|
{
|
||||||
role.getRoleId()));
|
// 多个自定数据权限使用in查询,避免多次拼接。
|
||||||
|
sqlString.append(StringUtils.format(" OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id in ({}) ) ", deptAlias, String.join(",", scopeCustomIds)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sqlString.append(StringUtils.format(" OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id = {} ) ", deptAlias, role.getRoleId()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (DATA_SCOPE_DEPT.equals(dataScope))
|
else if (DATA_SCOPE_DEPT.equals(dataScope))
|
||||||
{
|
{
|
||||||
|
@ -142,7 +155,7 @@ public class DataScopeAspect
|
||||||
conditions.add(dataScope);
|
conditions.add(dataScope);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 多角色情况下,所有角色都不包含传递过来的权限字符,这个时候sqlString也会为空,所以要限制一下,不查询任何数据
|
// 角色都不包含传递过来的权限字符,这个时候sqlString也会为空,所以要限制一下,不查询任何数据
|
||||||
if (StringUtils.isEmpty(conditions))
|
if (StringUtils.isEmpty(conditions))
|
||||||
{
|
{
|
||||||
sqlString.append(StringUtils.format(" OR {}.dept_id = 0 ", deptAlias));
|
sqlString.append(StringUtils.format(" OR {}.dept_id = 0 ", deptAlias));
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
package com.ruoyi.framework.web.exception;
|
package com.ruoyi.framework.web.exception;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
import com.ruoyi.common.utils.html.EscapeUtil;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.security.access.AccessDeniedException;
|
import org.springframework.security.access.AccessDeniedException;
|
||||||
|
@ -19,7 +22,7 @@ import com.ruoyi.common.utils.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 全局异常处理器
|
* 全局异常处理器
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@RestControllerAdvice
|
@RestControllerAdvice
|
||||||
|
@ -79,8 +82,13 @@ public class GlobalExceptionHandler
|
||||||
public AjaxResult handleMethodArgumentTypeMismatchException(MethodArgumentTypeMismatchException e, HttpServletRequest request)
|
public AjaxResult handleMethodArgumentTypeMismatchException(MethodArgumentTypeMismatchException e, HttpServletRequest request)
|
||||||
{
|
{
|
||||||
String requestURI = request.getRequestURI();
|
String requestURI = request.getRequestURI();
|
||||||
|
String value = Convert.toStr(e.getValue());
|
||||||
|
if (StringUtils.isNotEmpty(value))
|
||||||
|
{
|
||||||
|
value = EscapeUtil.clean(value);
|
||||||
|
}
|
||||||
log.error("请求参数类型不匹配'{}',发生系统异常.", requestURI, e);
|
log.error("请求参数类型不匹配'{}',发生系统异常.", requestURI, e);
|
||||||
return AjaxResult.error(String.format("请求参数类型不匹配,参数[%s]要求类型为:'%s',但输入值为:'%s'", e.getName(), e.getRequiredType().getName(), e.getValue()));
|
return AjaxResult.error(String.format("请求参数类型不匹配,参数[%s]要求类型为:'%s',但输入值为:'%s'", e.getName(), e.getRequiredType().getName(), value));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -131,12 +131,12 @@ public class SysLoginService
|
||||||
{
|
{
|
||||||
String verifyKey = CacheConstants.CAPTCHA_CODE_KEY + StringUtils.nvl(uuid, "");
|
String verifyKey = CacheConstants.CAPTCHA_CODE_KEY + StringUtils.nvl(uuid, "");
|
||||||
String captcha = redisCache.getCacheObject(verifyKey);
|
String captcha = redisCache.getCacheObject(verifyKey);
|
||||||
redisCache.deleteObject(verifyKey);
|
|
||||||
if (captcha == null)
|
if (captcha == null)
|
||||||
{
|
{
|
||||||
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire")));
|
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire")));
|
||||||
throw new CaptchaExpireException();
|
throw new CaptchaExpireException();
|
||||||
}
|
}
|
||||||
|
redisCache.deleteObject(verifyKey);
|
||||||
if (!code.equalsIgnoreCase(captcha))
|
if (!code.equalsIgnoreCase(captcha))
|
||||||
{
|
{
|
||||||
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error")));
|
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error")));
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="${packageName}.mapper.${ClassName}Mapper">
|
<mapper namespace="${packageName}.mapper.${ClassName}Mapper">
|
||||||
|
|
||||||
<resultMap type="${ClassName}" id="${ClassName}Result">
|
<resultMap type="${ClassName}" id="${ClassName}Result">
|
||||||
#foreach ($column in $columns)
|
#foreach ($column in $columns)
|
||||||
<result property="${column.javaField}" column="${column.columnName}" />
|
<result property="${column.javaField}" column="${column.columnName}" />
|
||||||
#end
|
#end
|
||||||
</resultMap>
|
</resultMap>
|
||||||
#if($table.sub)
|
#if($table.sub)
|
||||||
|
|
||||||
<resultMap id="${ClassName}${subClassName}Result" type="${ClassName}" extends="${ClassName}Result">
|
<resultMap id="${ClassName}${subClassName}Result" type="${ClassName}" extends="${ClassName}Result">
|
||||||
<collection property="${subclassName}List" notNullColumn="sub_${subTable.pkColumn.columnName}" javaType="java.util.List" resultMap="${subClassName}Result" />
|
<collection property="${subclassName}List" ofType="${subClassName}" column="${pkColumn.columnName}" select="select${subClassName}List" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap type="${subClassName}" id="${subClassName}Result">
|
<resultMap type="${subClassName}" id="${subClassName}Result">
|
||||||
#foreach ($column in $subTable.columns)
|
#foreach ($column in $subTable.columns)
|
||||||
<result property="${column.javaField}" column="sub_${column.columnName}" />
|
<result property="${column.javaField}" column="${column.columnName}" />
|
||||||
#end
|
#end
|
||||||
</resultMap>
|
</resultMap>
|
||||||
#end
|
#end
|
||||||
|
|
||||||
<sql id="select${ClassName}Vo">
|
<sql id="select${ClassName}Vo">
|
||||||
select#foreach($column in $columns) $column.columnName#if($foreach.count != $columns.size()),#end#end from ${tableName}
|
select#foreach($column in $columns) $column.columnName#if($foreach.count != $columns.size()),#end#end from ${tableName}
|
||||||
|
@ -28,76 +28,81 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="select${ClassName}List" parameterType="${ClassName}" resultMap="${ClassName}Result">
|
<select id="select${ClassName}List" parameterType="${ClassName}" resultMap="${ClassName}Result">
|
||||||
<include refid="select${ClassName}Vo"/>
|
<include refid="select${ClassName}Vo"/>
|
||||||
<where>
|
<where>
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#set($queryType=$column.queryType)
|
#set($queryType=$column.queryType)
|
||||||
#set($javaField=$column.javaField)
|
#set($javaField=$column.javaField)
|
||||||
#set($javaType=$column.javaType)
|
#set($javaType=$column.javaType)
|
||||||
#set($columnName=$column.columnName)
|
#set($columnName=$column.columnName)
|
||||||
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
||||||
#if($column.query)
|
#if($column.query)
|
||||||
#if($column.queryType == "EQ")
|
#if($column.queryType == "EQ")
|
||||||
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName = #{$javaField}</if>
|
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName = #{$javaField}</if>
|
||||||
#elseif($queryType == "NE")
|
#elseif($queryType == "NE")
|
||||||
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName != #{$javaField}</if>
|
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName != #{$javaField}</if>
|
||||||
#elseif($queryType == "GT")
|
#elseif($queryType == "GT")
|
||||||
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName > #{$javaField}</if>
|
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName > #{$javaField}</if>
|
||||||
#elseif($queryType == "GTE")
|
#elseif($queryType == "GTE")
|
||||||
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName >= #{$javaField}</if>
|
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName >= #{$javaField}</if>
|
||||||
#elseif($queryType == "LT")
|
#elseif($queryType == "LT")
|
||||||
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName < #{$javaField}</if>
|
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName < #{$javaField}</if>
|
||||||
#elseif($queryType == "LTE")
|
#elseif($queryType == "LTE")
|
||||||
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName <= #{$javaField}</if>
|
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName <= #{$javaField}</if>
|
||||||
#elseif($queryType == "LIKE")
|
#elseif($queryType == "LIKE")
|
||||||
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName like concat('%', #{$javaField}, '%')</if>
|
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName like concat('%', #{$javaField}, '%')</if>
|
||||||
#elseif($queryType == "BETWEEN")
|
#elseif($queryType == "BETWEEN")
|
||||||
<if test="params.begin$AttrName != null and params.begin$AttrName != '' and params.end$AttrName != null and params.end$AttrName != ''"> and $columnName between #{params.begin$AttrName} and #{params.end$AttrName}</if>
|
<if test="params.begin$AttrName != null and params.begin$AttrName != '' and params.end$AttrName != null and params.end$AttrName != ''"> and $columnName between #{params.begin$AttrName} and #{params.end$AttrName}</if>
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="select${ClassName}By${pkColumn.capJavaField}" parameterType="${pkColumn.javaType}" resultMap="#if($table.sub)${ClassName}${subClassName}Result#else${ClassName}Result#end">
|
|
||||||
#if($table.crud || $table.tree)
|
|
||||||
<include refid="select${ClassName}Vo"/>
|
|
||||||
where ${pkColumn.columnName} = #{${pkColumn.javaField}}
|
|
||||||
#elseif($table.sub)
|
|
||||||
select#foreach($column in $columns) a.$column.columnName#if($foreach.count != $columns.size()),#end#end,
|
|
||||||
#foreach($column in $subTable.columns) b.$column.columnName as sub_$column.columnName#if($foreach.count != $subTable.columns.size()),#end#end
|
|
||||||
|
|
||||||
from ${tableName} a
|
<select id="select${ClassName}By${pkColumn.capJavaField}" parameterType="${pkColumn.javaType}" resultMap="#if($table.sub)${ClassName}${subClassName}Result#else${ClassName}Result#end">
|
||||||
left join ${subTableName} b on b.${subTableFkName} = a.${pkColumn.columnName}
|
#if($table.crud || $table.tree)
|
||||||
where a.${pkColumn.columnName} = #{${pkColumn.javaField}}
|
<include refid="select${ClassName}Vo"/>
|
||||||
#end
|
where ${pkColumn.columnName} = #{${pkColumn.javaField}}
|
||||||
|
#elseif($table.sub)
|
||||||
|
select#foreach($column in $columns) $column.columnName#if($foreach.count != $columns.size()),#end#end
|
||||||
|
from ${tableName}
|
||||||
|
where ${pkColumn.columnName} = #{${pkColumn.javaField}}
|
||||||
|
#end
|
||||||
</select>
|
</select>
|
||||||
|
#if($table.sub)
|
||||||
|
|
||||||
|
<select id="select${subClassName}List" resultType="${subClassName}" resultMap="${subClassName}Result">
|
||||||
|
select#foreach ($column in $subTable.columns) $column.columnName#if($foreach.count != $subTable.columns.size()),#end#end
|
||||||
|
from ${subTableName}
|
||||||
|
where ${subTableFkName} = #{${subTableFkName}}
|
||||||
|
</select>
|
||||||
|
#end
|
||||||
|
|
||||||
<insert id="insert${ClassName}" parameterType="${ClassName}"#if($pkColumn.increment) useGeneratedKeys="true" keyProperty="$pkColumn.javaField"#end>
|
<insert id="insert${ClassName}" parameterType="${ClassName}"#if($pkColumn.increment) useGeneratedKeys="true" keyProperty="$pkColumn.javaField"#end>
|
||||||
insert into ${tableName}
|
insert into ${tableName}
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#if($column.columnName != $pkColumn.columnName || !$pkColumn.increment)
|
#if($column.columnName != $pkColumn.columnName || !$pkColumn.increment)
|
||||||
<if test="$column.javaField != null#if($column.javaType == 'String' && $column.required) and $column.javaField != ''#end">$column.columnName,</if>
|
<if test="$column.javaField != null#if($column.javaType == 'String' && $column.required) and $column.javaField != ''#end">$column.columnName,</if>
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#if($column.columnName != $pkColumn.columnName || !$pkColumn.increment)
|
#if($column.columnName != $pkColumn.columnName || !$pkColumn.increment)
|
||||||
<if test="$column.javaField != null#if($column.javaType == 'String' && $column.required) and $column.javaField != ''#end">#{$column.javaField},</if>
|
<if test="$column.javaField != null#if($column.javaType == 'String' && $column.required) and $column.javaField != ''#end">#{$column.javaField},</if>
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="update${ClassName}" parameterType="${ClassName}">
|
<update id="update${ClassName}" parameterType="${ClassName}">
|
||||||
update ${tableName}
|
update ${tableName}
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#if($column.columnName != $pkColumn.columnName)
|
#if($column.columnName != $pkColumn.columnName)
|
||||||
<if test="$column.javaField != null#if($column.javaType == 'String' && $column.required) and $column.javaField != ''#end">$column.columnName = #{$column.javaField},</if>
|
<if test="$column.javaField != null#if($column.javaType == 'String' && $column.required) and $column.javaField != ''#end">$column.columnName = #{$column.javaField},</if>
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
</trim>
|
</trim>
|
||||||
where ${pkColumn.columnName} = #{${pkColumn.javaField}}
|
where ${pkColumn.columnName} = #{${pkColumn.javaField}}
|
||||||
</update>
|
</update>
|
||||||
|
@ -107,29 +112,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="delete${ClassName}By${pkColumn.capJavaField}s" parameterType="String">
|
<delete id="delete${ClassName}By${pkColumn.capJavaField}s" parameterType="String">
|
||||||
delete from ${tableName} where ${pkColumn.columnName} in
|
delete from ${tableName} where ${pkColumn.columnName} in
|
||||||
<foreach item="${pkColumn.javaField}" collection="array" open="(" separator="," close=")">
|
<foreach item="${pkColumn.javaField}" collection="array" open="(" separator="," close=")">
|
||||||
#{${pkColumn.javaField}}
|
#{${pkColumn.javaField}}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
#if($table.sub)
|
#if($table.sub)
|
||||||
|
|
||||||
<delete id="delete${subClassName}By${subTableFkClassName}s" parameterType="String">
|
|
||||||
delete from ${subTableName} where ${subTableFkName} in
|
|
||||||
<foreach item="${subTableFkclassName}" collection="array" open="(" separator="," close=")">
|
|
||||||
#{${subTableFkclassName}}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="delete${subClassName}By${subTableFkClassName}" parameterType="${pkColumn.javaType}">
|
<delete id="delete${subClassName}By${subTableFkClassName}s" parameterType="String">
|
||||||
delete from ${subTableName} where ${subTableFkName} = #{${subTableFkclassName}}
|
delete from ${subTableName} where ${subTableFkName} in
|
||||||
</delete>
|
<foreach item="${subTableFkclassName}" collection="array" open="(" separator="," close=")">
|
||||||
|
#{${subTableFkclassName}}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
<insert id="batch${subClassName}">
|
<delete id="delete${subClassName}By${subTableFkClassName}" parameterType="${pkColumn.javaType}">
|
||||||
insert into ${subTableName}(#foreach($column in $subTable.columns) $column.columnName#if($foreach.count != $subTable.columns.size()),#end#end) values
|
delete from ${subTableName} where ${subTableFkName} = #{${subTableFkclassName}}
|
||||||
<foreach item="item" index="index" collection="list" separator=",">
|
</delete>
|
||||||
(#foreach($column in $subTable.columns) #{item.$column.javaField}#if($foreach.count != $subTable.columns.size()),#end#end)
|
|
||||||
</foreach>
|
<insert id="batch${subClassName}">
|
||||||
</insert>
|
insert into ${subTableName}(#foreach($column in $subTable.columns) $column.columnName#if($foreach.count != $subTable.columns.size()),#end#end) values
|
||||||
#end
|
<foreach item="item" index="index" collection="list" separator=",">
|
||||||
</mapper>
|
(#foreach($column in $subTable.columns) #{item.$column.javaField}#if($foreach.count != $subTable.columns.size()),#end#end)
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
#end
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.ruoyi.redBook.domain;
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class OAQuot extends BaseEntity {
|
public class OAQuot extends BaseEntity {
|
||||||
|
@ -13,6 +14,8 @@ public class OAQuot extends BaseEntity {
|
||||||
private String quotLxrdh;//联系人电话
|
private String quotLxrdh;//联系人电话
|
||||||
private String totalPrice;//总金额
|
private String totalPrice;//总金额
|
||||||
|
|
||||||
|
private BigDecimal perc;//一次折扣
|
||||||
|
private BigDecimal perc2;//二次折扣
|
||||||
private String rbDateUid;//调价版本
|
private String rbDateUid;//调价版本
|
||||||
private String quotApprovalStatus;//提交状态
|
private String quotApprovalStatus;//提交状态
|
||||||
|
|
||||||
|
@ -64,6 +67,14 @@ public class OAQuot extends BaseEntity {
|
||||||
|
|
||||||
public void setTotalPrice(String totalPrice) { this.totalPrice = totalPrice; }
|
public void setTotalPrice(String totalPrice) { this.totalPrice = totalPrice; }
|
||||||
|
|
||||||
|
public BigDecimal getPerc() {return perc; }
|
||||||
|
|
||||||
|
public void setPerc(BigDecimal perc) {this.perc = perc; }
|
||||||
|
|
||||||
|
public BigDecimal getPerc2() { return perc2; }
|
||||||
|
|
||||||
|
public void setPerc2(BigDecimal perc2) { this.perc2 = perc2; }
|
||||||
|
|
||||||
public String getRbDateUid() { return rbDateUid; }
|
public String getRbDateUid() { return rbDateUid; }
|
||||||
|
|
||||||
public void setRbDateUid(String rbDateUid) { this.rbDateUid = rbDateUid; }
|
public void setRbDateUid(String rbDateUid) { this.rbDateUid = rbDateUid; }
|
||||||
|
|
|
@ -114,7 +114,7 @@ public interface OARedBookMapper
|
||||||
* @param uid_0
|
* @param uid_0
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String getFixDatePrice(@Param("name_0") String name_0,@Param("spec") String spec,@Param("voltage") String voltage, @Param("uid_0") String uid_0);
|
String getFixDatePrice(@Param("name_0") String name_0, @Param("uid_0") String uid_0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入明细批量获取红本价格-型号、规格、电压、数量
|
* 导入明细批量获取红本价格-型号、规格、电压、数量
|
||||||
|
|
|
@ -194,7 +194,7 @@ public class RedBookServiceImpl implements IRedBookService
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getFixDatePrice(String name_0,String spec,String voltage, String uid_0) {
|
public String getFixDatePrice(String name_0,String spec,String voltage, String uid_0) {
|
||||||
return oaRedBookMapper.getFixDatePrice(name_0,spec,voltage,uid_0);
|
return oaRedBookMapper.getFixDatePrice(name_0,uid_0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -206,7 +206,7 @@ public class RedBookServiceImpl implements IRedBookService
|
||||||
@DataSource(DataSourceType.OAREDBOOK)
|
@DataSource(DataSourceType.OAREDBOOK)
|
||||||
public List<OAQuotProduct> setRedBookPrice(List<OAQuotProduct> list) {
|
public List<OAQuotProduct> setRedBookPrice(List<OAQuotProduct> list) {
|
||||||
for(OAQuotProduct oAQuotProduct : list){
|
for(OAQuotProduct oAQuotProduct : list){
|
||||||
String price = oaRedBookMapper.getFixDatePrice(oAQuotProduct.getName_0(),oAQuotProduct.getSpec(),oAQuotProduct.getVoltage(),oAQuotProduct.getUid_0());
|
String price = oaRedBookMapper.getFixDatePrice(oAQuotProduct.getName_0(),oAQuotProduct.getUid_0());
|
||||||
oAQuotProduct.setPrice(price);
|
oAQuotProduct.setPrice(price);
|
||||||
if(StringUtils.isEmpty(price)){
|
if(StringUtils.isEmpty(price)){
|
||||||
oAQuotProduct.setName_1("");
|
oAQuotProduct.setName_1("");
|
||||||
|
|
|
@ -0,0 +1,78 @@
|
||||||
|
package com.ruoyi.system.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class SysChangeRecord {
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date changeTime;
|
||||||
|
|
||||||
|
private String createName;
|
||||||
|
|
||||||
|
private String changeField;
|
||||||
|
|
||||||
|
private String beforeChange;
|
||||||
|
|
||||||
|
private String afterChange;
|
||||||
|
|
||||||
|
private String typeId;
|
||||||
|
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
public Date getChangeTime() {
|
||||||
|
return changeTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChangeTime(Date changeTime) {
|
||||||
|
this.changeTime = changeTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateName() {
|
||||||
|
return createName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateName(String createName) {
|
||||||
|
this.createName = createName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getChangeField() {
|
||||||
|
return changeField;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChangeField(String changeField) {
|
||||||
|
this.changeField = changeField;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBeforeChange() {
|
||||||
|
return beforeChange;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBeforeChange(String beforeChange) {
|
||||||
|
this.beforeChange = beforeChange;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAfterChange() {
|
||||||
|
return afterChange;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAfterChange(String afterChange) {
|
||||||
|
this.afterChange = afterChange;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypeId() {
|
||||||
|
return typeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTypeId(String typeId) {
|
||||||
|
this.typeId = typeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemark(String remark) {
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.system.domain.SysChangeRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变更日志记录Mapper
|
||||||
|
*/
|
||||||
|
public interface SysChangeRecordMapper {
|
||||||
|
/**
|
||||||
|
* 插入
|
||||||
|
* @param changeRecord
|
||||||
|
*/
|
||||||
|
public void insertChangeRecord(SysChangeRecord changeRecord);
|
||||||
|
}
|
|
@ -7,14 +7,14 @@ import com.ruoyi.system.domain.SysUserRole;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色业务层
|
* 角色业务层
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public interface ISysRoleService
|
public interface ISysRoleService
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询角色数据
|
* 根据条件分页查询角色数据
|
||||||
*
|
*
|
||||||
* @param role 角色信息
|
* @param role 角色信息
|
||||||
* @return 角色数据集合信息
|
* @return 角色数据集合信息
|
||||||
*/
|
*/
|
||||||
|
@ -22,7 +22,7 @@ public interface ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户ID查询角色列表
|
* 根据用户ID查询角色列表
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 角色列表
|
* @return 角色列表
|
||||||
*/
|
*/
|
||||||
|
@ -30,7 +30,7 @@ public interface ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户ID查询角色权限
|
* 根据用户ID查询角色权限
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 权限列表
|
* @return 权限列表
|
||||||
*/
|
*/
|
||||||
|
@ -38,14 +38,14 @@ public interface ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有角色
|
* 查询所有角色
|
||||||
*
|
*
|
||||||
* @return 角色列表
|
* @return 角色列表
|
||||||
*/
|
*/
|
||||||
public List<SysRole> selectRoleAll();
|
public List<SysRole> selectRoleAll();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户ID获取角色选择框列表
|
* 根据用户ID获取角色选择框列表
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 选中角色ID列表
|
* @return 选中角色ID列表
|
||||||
*/
|
*/
|
||||||
|
@ -53,7 +53,7 @@ public interface ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过角色ID查询角色
|
* 通过角色ID查询角色
|
||||||
*
|
*
|
||||||
* @param roleId 角色ID
|
* @param roleId 角色ID
|
||||||
* @return 角色对象信息
|
* @return 角色对象信息
|
||||||
*/
|
*/
|
||||||
|
@ -61,7 +61,7 @@ public interface ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验角色名称是否唯一
|
* 校验角色名称是否唯一
|
||||||
*
|
*
|
||||||
* @param role 角色信息
|
* @param role 角色信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -69,7 +69,7 @@ public interface ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验角色权限是否唯一
|
* 校验角色权限是否唯一
|
||||||
*
|
*
|
||||||
* @param role 角色信息
|
* @param role 角色信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -77,21 +77,21 @@ public interface ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验角色是否允许操作
|
* 校验角色是否允许操作
|
||||||
*
|
*
|
||||||
* @param role 角色信息
|
* @param role 角色信息
|
||||||
*/
|
*/
|
||||||
public void checkRoleAllowed(SysRole role);
|
public void checkRoleAllowed(SysRole role);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验角色是否有数据权限
|
* 校验角色是否有数据权限
|
||||||
*
|
*
|
||||||
* @param roleId 角色id
|
* @param roleIds 角色id
|
||||||
*/
|
*/
|
||||||
public void checkRoleDataScope(Long roleId);
|
public void checkRoleDataScope(Long... roleIds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过角色ID查询角色使用数量
|
* 通过角色ID查询角色使用数量
|
||||||
*
|
*
|
||||||
* @param roleId 角色ID
|
* @param roleId 角色ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -99,7 +99,7 @@ public interface ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增保存角色信息
|
* 新增保存角色信息
|
||||||
*
|
*
|
||||||
* @param role 角色信息
|
* @param role 角色信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -107,7 +107,7 @@ public interface ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改保存角色信息
|
* 修改保存角色信息
|
||||||
*
|
*
|
||||||
* @param role 角色信息
|
* @param role 角色信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -115,7 +115,7 @@ public interface ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改角色状态
|
* 修改角色状态
|
||||||
*
|
*
|
||||||
* @param role 角色信息
|
* @param role 角色信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -123,7 +123,7 @@ public interface ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改数据权限信息
|
* 修改数据权限信息
|
||||||
*
|
*
|
||||||
* @param role 角色信息
|
* @param role 角色信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -131,7 +131,7 @@ public interface ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过角色ID删除角色
|
* 通过角色ID删除角色
|
||||||
*
|
*
|
||||||
* @param roleId 角色ID
|
* @param roleId 角色ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -139,7 +139,7 @@ public interface ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除角色信息
|
* 批量删除角色信息
|
||||||
*
|
*
|
||||||
* @param roleIds 需要删除的角色ID
|
* @param roleIds 需要删除的角色ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -147,7 +147,7 @@ public interface ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 取消授权用户角色
|
* 取消授权用户角色
|
||||||
*
|
*
|
||||||
* @param userRole 用户和角色关联信息
|
* @param userRole 用户和角色关联信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -155,7 +155,7 @@ public interface ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量取消授权用户角色
|
* 批量取消授权用户角色
|
||||||
*
|
*
|
||||||
* @param roleId 角色ID
|
* @param roleId 角色ID
|
||||||
* @param userIds 需要取消授权的用户数据ID
|
* @param userIds 需要取消授权的用户数据ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
|
@ -164,7 +164,7 @@ public interface ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量选择授权用户角色
|
* 批量选择授权用户角色
|
||||||
*
|
*
|
||||||
* @param roleId 角色ID
|
* @param roleId 角色ID
|
||||||
* @param userIds 需要删除的用户数据ID
|
* @param userIds 需要删除的用户数据ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
|
|
|
@ -23,7 +23,7 @@ import com.ruoyi.system.service.ISysDeptService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门管理 服务实现
|
* 部门管理 服务实现
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
@ -37,7 +37,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询部门管理数据
|
* 查询部门管理数据
|
||||||
*
|
*
|
||||||
* @param dept 部门信息
|
* @param dept 部门信息
|
||||||
* @return 部门信息集合
|
* @return 部门信息集合
|
||||||
*/
|
*/
|
||||||
|
@ -63,7 +63,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构建前端所需要树结构
|
* 构建前端所需要树结构
|
||||||
*
|
*
|
||||||
* @param depts 部门列表
|
* @param depts 部门列表
|
||||||
* @return 树结构列表
|
* @return 树结构列表
|
||||||
*/
|
*/
|
||||||
|
@ -90,7 +90,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构建前端所需要下拉树结构
|
* 构建前端所需要下拉树结构
|
||||||
*
|
*
|
||||||
* @param depts 部门列表
|
* @param depts 部门列表
|
||||||
* @return 下拉树结构列表
|
* @return 下拉树结构列表
|
||||||
*/
|
*/
|
||||||
|
@ -103,7 +103,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据角色ID查询部门树信息
|
* 根据角色ID查询部门树信息
|
||||||
*
|
*
|
||||||
* @param roleId 角色ID
|
* @param roleId 角色ID
|
||||||
* @return 选中部门列表
|
* @return 选中部门列表
|
||||||
*/
|
*/
|
||||||
|
@ -116,7 +116,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据部门ID查询信息
|
* 根据部门ID查询信息
|
||||||
*
|
*
|
||||||
* @param deptId 部门ID
|
* @param deptId 部门ID
|
||||||
* @return 部门信息
|
* @return 部门信息
|
||||||
*/
|
*/
|
||||||
|
@ -128,7 +128,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据ID查询所有子部门(正常状态)
|
* 根据ID查询所有子部门(正常状态)
|
||||||
*
|
*
|
||||||
* @param deptId 部门ID
|
* @param deptId 部门ID
|
||||||
* @return 子部门数
|
* @return 子部门数
|
||||||
*/
|
*/
|
||||||
|
@ -140,7 +140,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否存在子节点
|
* 是否存在子节点
|
||||||
*
|
*
|
||||||
* @param deptId 部门ID
|
* @param deptId 部门ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -153,7 +153,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询部门是否存在用户
|
* 查询部门是否存在用户
|
||||||
*
|
*
|
||||||
* @param deptId 部门ID
|
* @param deptId 部门ID
|
||||||
* @return 结果 true 存在 false 不存在
|
* @return 结果 true 存在 false 不存在
|
||||||
*/
|
*/
|
||||||
|
@ -166,7 +166,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验部门名称是否唯一
|
* 校验部门名称是否唯一
|
||||||
*
|
*
|
||||||
* @param dept 部门信息
|
* @param dept 部门信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -184,13 +184,13 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验部门是否有数据权限
|
* 校验部门是否有数据权限
|
||||||
*
|
*
|
||||||
* @param deptId 部门id
|
* @param deptId 部门id
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void checkDeptDataScope(Long deptId)
|
public void checkDeptDataScope(Long deptId)
|
||||||
{
|
{
|
||||||
if (!SysUser.isAdmin(SecurityUtils.getUserId()))
|
if (!SysUser.isAdmin(SecurityUtils.getUserId()) && StringUtils.isNotNull(deptId))
|
||||||
{
|
{
|
||||||
SysDept dept = new SysDept();
|
SysDept dept = new SysDept();
|
||||||
dept.setDeptId(deptId);
|
dept.setDeptId(deptId);
|
||||||
|
@ -204,7 +204,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增保存部门信息
|
* 新增保存部门信息
|
||||||
*
|
*
|
||||||
* @param dept 部门信息
|
* @param dept 部门信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -223,7 +223,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改保存部门信息
|
* 修改保存部门信息
|
||||||
*
|
*
|
||||||
* @param dept 部门信息
|
* @param dept 部门信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -251,7 +251,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改该部门的父级部门状态
|
* 修改该部门的父级部门状态
|
||||||
*
|
*
|
||||||
* @param dept 当前部门
|
* @param dept 当前部门
|
||||||
*/
|
*/
|
||||||
private void updateParentDeptStatusNormal(SysDept dept)
|
private void updateParentDeptStatusNormal(SysDept dept)
|
||||||
|
@ -263,7 +263,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改子元素关系
|
* 修改子元素关系
|
||||||
*
|
*
|
||||||
* @param deptId 被修改的部门ID
|
* @param deptId 被修改的部门ID
|
||||||
* @param newAncestors 新的父ID集合
|
* @param newAncestors 新的父ID集合
|
||||||
* @param oldAncestors 旧的父ID集合
|
* @param oldAncestors 旧的父ID集合
|
||||||
|
@ -283,7 +283,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除部门管理信息
|
* 删除部门管理信息
|
||||||
*
|
*
|
||||||
* @param deptId 部门ID
|
* @param deptId 部门ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -27,7 +27,7 @@ import com.ruoyi.system.service.ISysRoleService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色 业务层处理
|
* 角色 业务层处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
@ -47,7 +47,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询角色数据
|
* 根据条件分页查询角色数据
|
||||||
*
|
*
|
||||||
* @param role 角色信息
|
* @param role 角色信息
|
||||||
* @return 角色数据集合信息
|
* @return 角色数据集合信息
|
||||||
*/
|
*/
|
||||||
|
@ -60,7 +60,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户ID查询角色
|
* 根据用户ID查询角色
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 角色列表
|
* @return 角色列表
|
||||||
*/
|
*/
|
||||||
|
@ -85,7 +85,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户ID查询权限
|
* 根据用户ID查询权限
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 权限列表
|
* @return 权限列表
|
||||||
*/
|
*/
|
||||||
|
@ -106,7 +106,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有角色
|
* 查询所有角色
|
||||||
*
|
*
|
||||||
* @return 角色列表
|
* @return 角色列表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -117,7 +117,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户ID获取角色选择框列表
|
* 根据用户ID获取角色选择框列表
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 选中角色ID列表
|
* @return 选中角色ID列表
|
||||||
*/
|
*/
|
||||||
|
@ -129,7 +129,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过角色ID查询角色
|
* 通过角色ID查询角色
|
||||||
*
|
*
|
||||||
* @param roleId 角色ID
|
* @param roleId 角色ID
|
||||||
* @return 角色对象信息
|
* @return 角色对象信息
|
||||||
*/
|
*/
|
||||||
|
@ -141,7 +141,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验角色名称是否唯一
|
* 校验角色名称是否唯一
|
||||||
*
|
*
|
||||||
* @param role 角色信息
|
* @param role 角色信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -159,7 +159,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验角色权限是否唯一
|
* 校验角色权限是否唯一
|
||||||
*
|
*
|
||||||
* @param role 角色信息
|
* @param role 角色信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -177,7 +177,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验角色是否允许操作
|
* 校验角色是否允许操作
|
||||||
*
|
*
|
||||||
* @param role 角色信息
|
* @param role 角色信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -191,27 +191,30 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验角色是否有数据权限
|
* 校验角色是否有数据权限
|
||||||
*
|
*
|
||||||
* @param roleId 角色id
|
* @param roleIds 角色id
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void checkRoleDataScope(Long roleId)
|
public void checkRoleDataScope(Long... roleIds)
|
||||||
{
|
{
|
||||||
if (!SysUser.isAdmin(SecurityUtils.getUserId()))
|
if (!SysUser.isAdmin(SecurityUtils.getUserId()))
|
||||||
{
|
{
|
||||||
SysRole role = new SysRole();
|
for (Long roleId : roleIds)
|
||||||
role.setRoleId(roleId);
|
|
||||||
List<SysRole> roles = SpringUtils.getAopProxy(this).selectRoleList(role);
|
|
||||||
if (StringUtils.isEmpty(roles))
|
|
||||||
{
|
{
|
||||||
throw new ServiceException("没有权限访问角色数据!");
|
SysRole role = new SysRole();
|
||||||
|
role.setRoleId(roleId);
|
||||||
|
List<SysRole> roles = SpringUtils.getAopProxy(this).selectRoleList(role);
|
||||||
|
if (StringUtils.isEmpty(roles))
|
||||||
|
{
|
||||||
|
throw new ServiceException("没有权限访问角色数据!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过角色ID查询角色使用数量
|
* 通过角色ID查询角色使用数量
|
||||||
*
|
*
|
||||||
* @param roleId 角色ID
|
* @param roleId 角色ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -223,7 +226,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增保存角色信息
|
* 新增保存角色信息
|
||||||
*
|
*
|
||||||
* @param role 角色信息
|
* @param role 角色信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -238,7 +241,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改保存角色信息
|
* 修改保存角色信息
|
||||||
*
|
*
|
||||||
* @param role 角色信息
|
* @param role 角色信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -255,7 +258,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改角色状态
|
* 修改角色状态
|
||||||
*
|
*
|
||||||
* @param role 角色信息
|
* @param role 角色信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -267,7 +270,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改数据权限信息
|
* 修改数据权限信息
|
||||||
*
|
*
|
||||||
* @param role 角色信息
|
* @param role 角色信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -285,7 +288,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增角色菜单信息
|
* 新增角色菜单信息
|
||||||
*
|
*
|
||||||
* @param role 角色对象
|
* @param role 角色对象
|
||||||
*/
|
*/
|
||||||
public int insertRoleMenu(SysRole role)
|
public int insertRoleMenu(SysRole role)
|
||||||
|
@ -333,7 +336,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过角色ID删除角色
|
* 通过角色ID删除角色
|
||||||
*
|
*
|
||||||
* @param roleId 角色ID
|
* @param roleId 角色ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -350,7 +353,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除角色信息
|
* 批量删除角色信息
|
||||||
*
|
*
|
||||||
* @param roleIds 需要删除的角色ID
|
* @param roleIds 需要删除的角色ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -377,7 +380,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 取消授权用户角色
|
* 取消授权用户角色
|
||||||
*
|
*
|
||||||
* @param userRole 用户和角色关联信息
|
* @param userRole 用户和角色关联信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -389,7 +392,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量取消授权用户角色
|
* 批量取消授权用户角色
|
||||||
*
|
*
|
||||||
* @param roleId 角色ID
|
* @param roleId 角色ID
|
||||||
* @param userIds 需要取消授权的用户数据ID
|
* @param userIds 需要取消授权的用户数据ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
|
@ -402,7 +405,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量选择授权用户角色
|
* 批量选择授权用户角色
|
||||||
*
|
*
|
||||||
* @param roleId 角色ID
|
* @param roleId 角色ID
|
||||||
* @param userIds 需要授权的用户数据ID
|
* @param userIds 需要授权的用户数据ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
|
|
|
@ -4,6 +4,8 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import javax.validation.Validator;
|
import javax.validation.Validator;
|
||||||
|
|
||||||
|
import com.ruoyi.system.service.ISysDeptService;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -32,7 +34,7 @@ import com.ruoyi.system.service.ISysUserService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户 业务层处理
|
* 用户 业务层处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
@ -58,12 +60,15 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysConfigService configService;
|
private ISysConfigService configService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysDeptService deptService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
protected Validator validator;
|
protected Validator validator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询用户列表
|
* 根据条件分页查询用户列表
|
||||||
*
|
*
|
||||||
* @param user 用户信息
|
* @param user 用户信息
|
||||||
* @return 用户信息集合信息
|
* @return 用户信息集合信息
|
||||||
*/
|
*/
|
||||||
|
@ -76,7 +81,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询已分配用户角色列表
|
* 根据条件分页查询已分配用户角色列表
|
||||||
*
|
*
|
||||||
* @param user 用户信息
|
* @param user 用户信息
|
||||||
* @return 用户信息集合信息
|
* @return 用户信息集合信息
|
||||||
*/
|
*/
|
||||||
|
@ -89,7 +94,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询未分配用户角色列表
|
* 根据条件分页查询未分配用户角色列表
|
||||||
*
|
*
|
||||||
* @param user 用户信息
|
* @param user 用户信息
|
||||||
* @return 用户信息集合信息
|
* @return 用户信息集合信息
|
||||||
*/
|
*/
|
||||||
|
@ -102,7 +107,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过用户名查询用户
|
* 通过用户名查询用户
|
||||||
*
|
*
|
||||||
* @param userName 用户名
|
* @param userName 用户名
|
||||||
* @return 用户对象信息
|
* @return 用户对象信息
|
||||||
*/
|
*/
|
||||||
|
@ -114,7 +119,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过用户ID查询用户
|
* 通过用户ID查询用户
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 用户对象信息
|
* @return 用户对象信息
|
||||||
*/
|
*/
|
||||||
|
@ -126,7 +131,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询用户所属角色组
|
* 查询用户所属角色组
|
||||||
*
|
*
|
||||||
* @param userName 用户名
|
* @param userName 用户名
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -143,7 +148,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询用户所属岗位组
|
* 查询用户所属岗位组
|
||||||
*
|
*
|
||||||
* @param userName 用户名
|
* @param userName 用户名
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -160,7 +165,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验用户名称是否唯一
|
* 校验用户名称是否唯一
|
||||||
*
|
*
|
||||||
* @param user 用户信息
|
* @param user 用户信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -214,7 +219,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验用户是否允许操作
|
* 校验用户是否允许操作
|
||||||
*
|
*
|
||||||
* @param user 用户信息
|
* @param user 用户信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -228,7 +233,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验用户是否有数据权限
|
* 校验用户是否有数据权限
|
||||||
*
|
*
|
||||||
* @param userId 用户id
|
* @param userId 用户id
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -248,7 +253,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增保存用户信息
|
* 新增保存用户信息
|
||||||
*
|
*
|
||||||
* @param user 用户信息
|
* @param user 用户信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -267,7 +272,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 注册用户信息
|
* 注册用户信息
|
||||||
*
|
*
|
||||||
* @param user 用户信息
|
* @param user 用户信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -279,7 +284,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改保存用户信息
|
* 修改保存用户信息
|
||||||
*
|
*
|
||||||
* @param user 用户信息
|
* @param user 用户信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -301,7 +306,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户授权角色
|
* 用户授权角色
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @param roleIds 角色组
|
* @param roleIds 角色组
|
||||||
*/
|
*/
|
||||||
|
@ -315,7 +320,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改用户状态
|
* 修改用户状态
|
||||||
*
|
*
|
||||||
* @param user 用户信息
|
* @param user 用户信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -327,7 +332,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改用户基本信息
|
* 修改用户基本信息
|
||||||
*
|
*
|
||||||
* @param user 用户信息
|
* @param user 用户信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -339,7 +344,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改用户头像
|
* 修改用户头像
|
||||||
*
|
*
|
||||||
* @param userName 用户名
|
* @param userName 用户名
|
||||||
* @param avatar 头像地址
|
* @param avatar 头像地址
|
||||||
* @return 结果
|
* @return 结果
|
||||||
|
@ -352,7 +357,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重置用户密码
|
* 重置用户密码
|
||||||
*
|
*
|
||||||
* @param user 用户信息
|
* @param user 用户信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -364,7 +369,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重置用户密码
|
* 重置用户密码
|
||||||
*
|
*
|
||||||
* @param userName 用户名
|
* @param userName 用户名
|
||||||
* @param password 密码
|
* @param password 密码
|
||||||
* @return 结果
|
* @return 结果
|
||||||
|
@ -377,7 +382,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增用户角色信息
|
* 新增用户角色信息
|
||||||
*
|
*
|
||||||
* @param user 用户对象
|
* @param user 用户对象
|
||||||
*/
|
*/
|
||||||
public void insertUserRole(SysUser user)
|
public void insertUserRole(SysUser user)
|
||||||
|
@ -387,7 +392,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增用户岗位信息
|
* 新增用户岗位信息
|
||||||
*
|
*
|
||||||
* @param user 用户对象
|
* @param user 用户对象
|
||||||
*/
|
*/
|
||||||
public void insertUserPost(SysUser user)
|
public void insertUserPost(SysUser user)
|
||||||
|
@ -410,7 +415,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增用户角色信息
|
* 新增用户角色信息
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @param roleIds 角色组
|
* @param roleIds 角色组
|
||||||
*/
|
*/
|
||||||
|
@ -433,7 +438,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过用户ID删除用户
|
* 通过用户ID删除用户
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -450,7 +455,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除用户信息
|
* 批量删除用户信息
|
||||||
*
|
*
|
||||||
* @param userIds 需要删除的用户ID
|
* @param userIds 需要删除的用户ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -472,7 +477,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入用户数据
|
* 导入用户数据
|
||||||
*
|
*
|
||||||
* @param userList 用户数据列表
|
* @param userList 用户数据列表
|
||||||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
||||||
* @param operName 操作用户
|
* @param operName 操作用户
|
||||||
|
@ -489,7 +494,6 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
int failureNum = 0;
|
int failureNum = 0;
|
||||||
StringBuilder successMsg = new StringBuilder();
|
StringBuilder successMsg = new StringBuilder();
|
||||||
StringBuilder failureMsg = new StringBuilder();
|
StringBuilder failureMsg = new StringBuilder();
|
||||||
String password = configService.selectConfigByKey("sys.user.initPassword");
|
|
||||||
for (SysUser user : userList)
|
for (SysUser user : userList)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -499,6 +503,8 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
if (StringUtils.isNull(u))
|
if (StringUtils.isNull(u))
|
||||||
{
|
{
|
||||||
BeanValidators.validateWithException(validator, user);
|
BeanValidators.validateWithException(validator, user);
|
||||||
|
deptService.checkDeptDataScope(user.getDeptId());
|
||||||
|
String password = configService.selectConfigByKey("sys.user.initPassword");
|
||||||
user.setPassword(SecurityUtils.encryptPassword(password));
|
user.setPassword(SecurityUtils.encryptPassword(password));
|
||||||
user.setCreateBy(operName);
|
user.setCreateBy(operName);
|
||||||
userMapper.insertUser(user);
|
userMapper.insertUser(user);
|
||||||
|
@ -510,6 +516,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
BeanValidators.validateWithException(validator, user);
|
BeanValidators.validateWithException(validator, user);
|
||||||
checkUserAllowed(u);
|
checkUserAllowed(u);
|
||||||
checkUserDataScope(u.getUserId());
|
checkUserDataScope(u.getUserId());
|
||||||
|
deptService.checkDeptDataScope(user.getDeptId());
|
||||||
user.setUserId(u.getUserId());
|
user.setUserId(u.getUserId());
|
||||||
user.setUpdateBy(operName);
|
user.setUpdateBy(operName);
|
||||||
userMapper.updateUser(user);
|
userMapper.updateUser(user);
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.ruoyi.technicalConfirm.domain;
|
||||||
|
|
||||||
|
public class QuotJsqrXzRemark {
|
||||||
|
private String type;
|
||||||
|
private String quotJsqrCode;
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQuotJsqrCode() {
|
||||||
|
return quotJsqrCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQuotJsqrCode(String quotJsqrCode) {
|
||||||
|
this.quotJsqrCode = quotJsqrCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemark(String remark) {
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
}
|
|
@ -142,6 +142,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="quotCode != null and quotCode != ''"> and quot_code like concat('%', #{quotCode}, '%')</if>
|
<if test="quotCode != null and quotCode != ''"> and quot_code like concat('%', #{quotCode}, '%')</if>
|
||||||
<if test="quotCustomerName != null and quotCustomerName != ''"> and quot_customer_name like concat('%', #{quotCustomerName}, '%')</if>
|
<if test="quotCustomerName != null and quotCustomerName != ''"> and quot_customer_name like concat('%', #{quotCustomerName}, '%')</if>
|
||||||
<if test="quotProject != null and quotProject != ''"> and quot_project like concat('%', #{quotProject}, '%')</if>
|
<if test="quotProject != null and quotProject != ''"> and quot_project like concat('%', #{quotProject}, '%')</if>
|
||||||
|
<if test="quotQuotationRequire != null and quotQuotationRequire != ''"> and quot_quotation_require like concat('%', #{quotQuotationRequire}, '%')</if>
|
||||||
<if test="quotSalesmanName != null and quotSalesmanName != ''"> and quot_salesman_name like concat('%', #{quotSalesmanName}, '%')</if>
|
<if test="quotSalesmanName != null and quotSalesmanName != ''"> and quot_salesman_name like concat('%', #{quotSalesmanName}, '%')</if>
|
||||||
<if test="quotPrint != null and quotPrint != ''"> and quot_print = #{quotPrint}</if>
|
<if test="quotPrint != null and quotPrint != ''"> and quot_print = #{quotPrint}</if>
|
||||||
<if test="quotApprovalStatus != null and quotApprovalStatus != ''"> and quot_approval_status = #{quotApprovalStatus}</if>
|
<if test="quotApprovalStatus != null and quotApprovalStatus != ''"> and quot_approval_status = #{quotApprovalStatus}</if>
|
||||||
|
|
|
@ -94,6 +94,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="quotLxr != null and quotLxr != ''">quotLxr,</if>
|
<if test="quotLxr != null and quotLxr != ''">quotLxr,</if>
|
||||||
<if test="quotLxrdh != null and quotLxrdh != ''">quotLxrdh,</if>
|
<if test="quotLxrdh != null and quotLxrdh != ''">quotLxrdh,</if>
|
||||||
<if test="totalPrice != null and totalPrice != ''">totalPrice,</if>
|
<if test="totalPrice != null and totalPrice != ''">totalPrice,</if>
|
||||||
|
<if test="perc != null and perc != ''">perc,</if>
|
||||||
|
<if test="perc2 != null and perc2 != ''">perc2,</if>
|
||||||
<if test="rbDateUid != null and rbDateUid != ''">rbDateUid,</if>
|
<if test="rbDateUid != null and rbDateUid != ''">rbDateUid,</if>
|
||||||
<if test="createBy != null">create_by,</if>
|
<if test="createBy != null">create_by,</if>
|
||||||
<if test="createTime != null">create_time,</if>
|
<if test="createTime != null">create_time,</if>
|
||||||
|
@ -108,6 +110,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="quotLxr != null and quotLxr != ''">#{quotLxr},</if>
|
<if test="quotLxr != null and quotLxr != ''">#{quotLxr},</if>
|
||||||
<if test="quotLxrdh != null and quotLxrdh != ''">#{quotLxrdh},</if>
|
<if test="quotLxrdh != null and quotLxrdh != ''">#{quotLxrdh},</if>
|
||||||
<if test="totalPrice != null and totalPrice != ''">#{totalPrice},</if>
|
<if test="totalPrice != null and totalPrice != ''">#{totalPrice},</if>
|
||||||
|
<if test="perc != null and perc != ''">#{perc},</if>
|
||||||
|
<if test="perc2 != null and perc2 != ''">#{perc2},</if>
|
||||||
<if test="rbDateUid != null and rbDateUid != ''">#{rbDateUid},</if>
|
<if test="rbDateUid != null and rbDateUid != ''">#{rbDateUid},</if>
|
||||||
<if test="createBy != null">#{createBy},</if>
|
<if test="createBy != null">#{createBy},</if>
|
||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
@ -125,6 +129,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="quotLxr != null and quotLxr != ''">quotLxr = #{quotLxr},</if>
|
<if test="quotLxr != null and quotLxr != ''">quotLxr = #{quotLxr},</if>
|
||||||
<if test="quotLxrdh != null and quotLxrdh != ''">quotLxrdh = #{quotLxrdh},</if>
|
<if test="quotLxrdh != null and quotLxrdh != ''">quotLxrdh = #{quotLxrdh},</if>
|
||||||
<if test="totalPrice != null and totalPrice != ''">totalPrice = #{totalPrice},</if>
|
<if test="totalPrice != null and totalPrice != ''">totalPrice = #{totalPrice},</if>
|
||||||
|
<if test="perc != null and perc != ''">perc = #{perc},</if>
|
||||||
|
<if test="perc2 != null and perc2 != ''">perc2 = #{perc2},</if>
|
||||||
<if test="rbDateUid != null and rbDateUid != ''">rbDateUid = #{rbDateUid},</if>
|
<if test="rbDateUid != null and rbDateUid != ''">rbDateUid = #{rbDateUid},</if>
|
||||||
<if test="quotApprovalStatus != null and quotApprovalStatus != ''">quotApprovalStatus = #{quotApprovalStatus},</if>
|
<if test="quotApprovalStatus != null and quotApprovalStatus != ''">quotApprovalStatus = #{quotApprovalStatus},</if>
|
||||||
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
@ -136,9 +142,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<insert id="batchOAQuotProduct">
|
<insert id="batchOAQuotProduct">
|
||||||
insert into OAQuotProduct(quot_product_id, name_0, name_1, spec, voltage,stu,price,setPrice,count,allPrice,per,per2,quot_id,number) values
|
insert into OAQuotProduct(uid_0,quot_product_id, name_0, name_1, spec, voltage,stu,price,setPrice,count,allPrice,per,per2,quot_id,number) values
|
||||||
<foreach item="item" index="index" collection="list" separator=",">
|
<foreach item="item" index="index" collection="list" separator=",">
|
||||||
( #{item.quot_product_id}, #{item.name_0}, #{item.name_1}, #{item.spec}, #{item.voltage}, #{item.stu},cast(#{item.price,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.setPrice,jdbcType=DECIMAL} as decimal(18,2)), cast(#{item.count,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.allPrice,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.per,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.per2,jdbcType=DECIMAL} as decimal(18,2)), #{item.quot_id}, #{item.index})
|
(#{item.uid_0}, #{item.quot_product_id}, #{item.name_0}, #{item.name_1}, #{item.spec}, #{item.voltage}, #{item.stu},cast(#{item.price,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.setPrice,jdbcType=DECIMAL} as decimal(18,2)), cast(#{item.count,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.allPrice,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.per,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.per2,jdbcType=DECIMAL} as decimal(18,2)), #{item.quot_id}, #{item.index})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
@ -168,8 +174,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="getFixDatePrice" resultType="String">
|
<select id="getFixDatePrice" resultType="String">
|
||||||
select top 1 红本价格 from rb_product_price A
|
select top 1 红本价格 from rb_product_price A
|
||||||
inner join [rb_productVersion] B on A.version_uid_0=B.uid_0
|
inner join [rb_productVersion] B on A.version_uid_0=B.uid_0
|
||||||
where A.[namevoltage] = #{name_0} and A.规格 = #{spec}
|
where A.[namevoltage] = #{name_0}
|
||||||
and A.电压等级 = #{voltage} and B.uid_0 = #{uid_0}
|
and B.uid_0 = #{uid_0}
|
||||||
and (B.sta_0=1 or sta_0=0)
|
and (B.sta_0=1 or sta_0=0)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -230,6 +236,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="quotLxr" column="quotLxr" />
|
<result property="quotLxr" column="quotLxr" />
|
||||||
<result property="quotLxrdh" column="quotLxrdh" />
|
<result property="quotLxrdh" column="quotLxrdh" />
|
||||||
<result property="totalPrice" column="totalPrice" />
|
<result property="totalPrice" column="totalPrice" />
|
||||||
|
<result property="perc" column="perc" />
|
||||||
|
<result property="perc2" column="perc2" />
|
||||||
<result property="rbDateUid" column="rbDateUid" />
|
<result property="rbDateUid" column="rbDateUid" />
|
||||||
<result property="quotApprovalStatus" column="quotApprovalStatus" />
|
<result property="quotApprovalStatus" column="quotApprovalStatus" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
@ -239,6 +247,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap type="OAQuotProduct" id="QuotMaterialResult">
|
<resultMap type="OAQuotProduct" id="QuotMaterialResult">
|
||||||
|
<result property="uid_0" column="uid_0" />
|
||||||
<result property="quot_product_id" column="quot_product_id" />
|
<result property="quot_product_id" column="quot_product_id" />
|
||||||
<result property="name_0" column="name_0" />
|
<result property="name_0" column="name_0" />
|
||||||
<result property="name_1" column="name_1" />
|
<result property="name_1" column="name_1" />
|
||||||
|
@ -255,9 +264,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="selectQuotByQuotId" parameterType="String" resultMap="QuotQuotMaterialResult">
|
<select id="selectQuotByQuotId" parameterType="String" resultMap="QuotQuotMaterialResult">
|
||||||
select a.quot_id, a.quotCode, a.quotCustomer, a.quotProject, a.quotLxr,
|
select a.quot_id, a.quotCode, a.quotCustomer, a.quotProject, a.quotLxr,
|
||||||
a.quotLxrdh, a.totalPrice,a.rbDateUid,a.quotApprovalStatus,
|
a.quotLxrdh, a.totalPrice,a.perc,a.perc2,a.rbDateUid,a.quotApprovalStatus,
|
||||||
|
|
||||||
b.quot_product_id, b.name_0, b.name_1,
|
b.uid_0,b.quot_product_id, b.name_0, b.name_1,
|
||||||
b.spec, b.voltage, b.stu,
|
b.spec, b.voltage, b.stu,
|
||||||
b.per,b.per2,b.price,b.setPrice,b.count,b.allPrice,b.quot_id
|
b.per,b.per2,b.price,b.setPrice,b.count,b.allPrice,b.quot_id
|
||||||
from OAQuot a
|
from OAQuot a
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?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.ruoyi.system.mapper.SysChangeRecordMapper">
|
||||||
|
<insert id="insertChangeRecord" parameterType="SysChangeRecord">
|
||||||
|
insert into sys_change_record
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="changeTime != null">changeTime,</if>
|
||||||
|
<if test="createName != null and createName != ''">createName,</if>
|
||||||
|
<if test="changeField != null and changeField != ''">changeField,</if>
|
||||||
|
<if test="beforeChange != null and beforeChange != ''">beforeChange,</if>
|
||||||
|
<if test="afterChange != null and afterChange != ''">afterChange,</if>
|
||||||
|
<if test="typeId != null and typeId != ''">typeId,</if>
|
||||||
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="changeTime != null">#{changeTime},</if>
|
||||||
|
<if test="createName != null and createName != ''">#{createName},</if>
|
||||||
|
<if test="changeField != null and changeField != ''">#{changeField},</if>
|
||||||
|
<if test="beforeChange != null and beforeChange != ''">#{beforeChange},</if>
|
||||||
|
<if test="afterChange != null and afterChange != ''">#{afterChange},</if>
|
||||||
|
<if test="typeId != null and typeId != ''">#{typeId},</if>
|
||||||
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
</mapper>
|
|
@ -60,3 +60,12 @@ export function commitQuot(data) {
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 监听协助说明,有数据输入则加入redis
|
||||||
|
export function setRedisJsxz(param) {
|
||||||
|
return request({
|
||||||
|
url: '/jsqr/jsqr/setRedisJsxz',
|
||||||
|
method: 'post',
|
||||||
|
data: param
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -1,114 +1,120 @@
|
||||||
<template>
|
<template>
|
||||||
<el-form size="small">
|
<el-form size="small">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="1">
|
<el-radio v-model='radioValue' :label="1">
|
||||||
小时,允许的通配符[, - * /]
|
小时,允许的通配符[, - * /]
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="2">
|
<el-radio v-model='radioValue' :label="2">
|
||||||
周期从
|
周期从
|
||||||
<el-input-number v-model='cycle01' :min="0" :max="22" /> -
|
<el-input-number v-model='cycle01' :min="0" :max="22" /> -
|
||||||
<el-input-number v-model='cycle02' :min="cycle01 ? cycle01 + 1 : 1" :max="23" /> 小时
|
<el-input-number v-model='cycle02' :min="cycle01 ? cycle01 + 1 : 1" :max="23" /> 小时
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="3">
|
<el-radio v-model='radioValue' :label="3">
|
||||||
从
|
从
|
||||||
<el-input-number v-model='average01' :min="0" :max="22" /> 小时开始,每
|
<el-input-number v-model='average01' :min="0" :max="22" /> 小时开始,每
|
||||||
<el-input-number v-model='average02' :min="1" :max="23 - average01 || 0" /> 小时执行一次
|
<el-input-number v-model='average02' :min="1" :max="23 - average01 || 0" /> 小时执行一次
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="4">
|
<el-radio v-model='radioValue' :label="4">
|
||||||
指定
|
指定
|
||||||
<el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width:100%">
|
<el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width:100%">
|
||||||
<el-option v-for="item in 24" :key="item" :value="item-1">{{item-1}}</el-option>
|
<el-option v-for="item in 24" :key="item" :value="item-1">{{item-1}}</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
radioValue: 1,
|
radioValue: 1,
|
||||||
cycle01: 0,
|
cycle01: 0,
|
||||||
cycle02: 1,
|
cycle02: 1,
|
||||||
average01: 0,
|
average01: 0,
|
||||||
average02: 1,
|
average02: 1,
|
||||||
checkboxList: [],
|
checkboxList: [],
|
||||||
checkNum: this.$options.propsData.check
|
checkNum: this.$options.propsData.check
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
name: 'crontab-hour',
|
name: 'crontab-hour',
|
||||||
props: ['check', 'cron'],
|
props: ['check', 'cron'],
|
||||||
methods: {
|
methods: {
|
||||||
// 单选按钮值变化时
|
// 单选按钮值变化时
|
||||||
radioChange() {
|
radioChange() {
|
||||||
switch (this.radioValue) {
|
if (this.cron.min === '*') {
|
||||||
case 1:
|
this.$emit('update', 'min', '0', 'hour');
|
||||||
this.$emit('update', 'hour', '*')
|
}
|
||||||
break;
|
if (this.cron.second === '*') {
|
||||||
case 2:
|
this.$emit('update', 'second', '0', 'hour');
|
||||||
this.$emit('update', 'hour', this.cycleTotal);
|
}
|
||||||
break;
|
switch (this.radioValue) {
|
||||||
case 3:
|
case 1:
|
||||||
this.$emit('update', 'hour', this.averageTotal);
|
this.$emit('update', 'hour', '*')
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 2:
|
||||||
this.$emit('update', 'hour', this.checkboxString);
|
this.$emit('update', 'hour', this.cycleTotal);
|
||||||
break;
|
break;
|
||||||
}
|
case 3:
|
||||||
},
|
this.$emit('update', 'hour', this.averageTotal);
|
||||||
// 周期两个值变化时
|
break;
|
||||||
cycleChange() {
|
case 4:
|
||||||
if (this.radioValue == '2') {
|
this.$emit('update', 'hour', this.checkboxString);
|
||||||
this.$emit('update', 'hour', this.cycleTotal);
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 平均两个值变化时
|
// 周期两个值变化时
|
||||||
averageChange() {
|
cycleChange() {
|
||||||
if (this.radioValue == '3') {
|
if (this.radioValue == '2') {
|
||||||
this.$emit('update', 'hour', this.averageTotal);
|
this.$emit('update', 'hour', this.cycleTotal);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// checkbox值变化时
|
// 平均两个值变化时
|
||||||
checkboxChange() {
|
averageChange() {
|
||||||
if (this.radioValue == '4') {
|
if (this.radioValue == '3') {
|
||||||
this.$emit('update', 'hour', this.checkboxString);
|
this.$emit('update', 'hour', this.averageTotal);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
// checkbox值变化时
|
||||||
watch: {
|
checkboxChange() {
|
||||||
'radioValue': 'radioChange',
|
if (this.radioValue == '4') {
|
||||||
'cycleTotal': 'cycleChange',
|
this.$emit('update', 'hour', this.checkboxString);
|
||||||
'averageTotal': 'averageChange',
|
}
|
||||||
'checkboxString': 'checkboxChange'
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
watch: {
|
||||||
// 计算两个周期值
|
'radioValue': 'radioChange',
|
||||||
cycleTotal: function () {
|
'cycleTotal': 'cycleChange',
|
||||||
const cycle01 = this.checkNum(this.cycle01, 0, 22)
|
'averageTotal': 'averageChange',
|
||||||
const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : 1, 23)
|
'checkboxString': 'checkboxChange'
|
||||||
return cycle01 + '-' + cycle02;
|
},
|
||||||
},
|
computed: {
|
||||||
// 计算平均用到的值
|
// 计算两个周期值
|
||||||
averageTotal: function () {
|
cycleTotal: function () {
|
||||||
const average01 = this.checkNum(this.average01, 0, 22)
|
const cycle01 = this.checkNum(this.cycle01, 0, 22)
|
||||||
const average02 = this.checkNum(this.average02, 1, 23 - average01 || 0)
|
const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : 1, 23)
|
||||||
return average01 + '/' + average02;
|
return cycle01 + '-' + cycle02;
|
||||||
},
|
},
|
||||||
// 计算勾选的checkbox值合集
|
// 计算平均用到的值
|
||||||
checkboxString: function () {
|
averageTotal: function () {
|
||||||
let str = this.checkboxList.join();
|
const average01 = this.checkNum(this.average01, 0, 22)
|
||||||
return str == '' ? '*' : str;
|
const average02 = this.checkNum(this.average02, 1, 23 - average01 || 0)
|
||||||
}
|
return average01 + '/' + average02;
|
||||||
}
|
},
|
||||||
}
|
// 计算勾选的checkbox值合集
|
||||||
|
checkboxString: function () {
|
||||||
|
let str = this.checkboxList.join();
|
||||||
|
return str == '' ? '*' : str;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -100,6 +100,19 @@ export const constantRoutes = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
/* {
|
||||||
|
path: '/oaQuote',
|
||||||
|
component: Layout,
|
||||||
|
hidden: true,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'oaQuoteEdit',
|
||||||
|
component: () => import('@/views/redBook/productSelect'),
|
||||||
|
name: 'productSelect',
|
||||||
|
meta: { title: '报价单转报价', activeMenu: '/oaQuote/oaQuoteEdit'}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},*/
|
||||||
{
|
{
|
||||||
path: '/hainanOrder/index',
|
path: '/hainanOrder/index',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
|
|
|
@ -150,6 +150,7 @@
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<!--
|
||||||
<el-table-column label="状态" align="center" prop="cusState" v-if="$auth.hasPermi('customer:customer:changCusStatus')">
|
<el-table-column label="状态" align="center" prop="cusState" v-if="$auth.hasPermi('customer:customer:changCusStatus')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
|
@ -160,6 +161,7 @@
|
||||||
></el-switch>
|
></el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
-->
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
|
|
|
@ -25,6 +25,14 @@
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="报价要求" prop="quotQuotationRequire" v-if="checkRole(['SALES_MAN'])">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.quotQuotationRequire"
|
||||||
|
placeholder="请输入报价要求"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="业务员" prop="quotSalesmanName" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
<el-form-item label="业务员" prop="quotSalesmanName" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.quotSalesmanName"
|
v-model="queryParams.quotSalesmanName"
|
||||||
|
@ -129,7 +137,7 @@
|
||||||
plain
|
plain
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
size="mini"
|
size="mini"
|
||||||
:disabled="single"
|
:disabled="multiple"
|
||||||
@click="handleAllPass"
|
@click="handleAllPass"
|
||||||
v-hasPermi="['quot:quot:allPass']"
|
v-hasPermi="['quot:quot:allPass']"
|
||||||
>整单通过</el-button>
|
>整单通过</el-button>
|
||||||
|
@ -178,15 +186,16 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="打印人" align="center" prop="quotPrintUserNickName" width="150px" v-if="$auth.hasPermi('quot:quot:changQuotPrintStatus')"/>
|
<el-table-column label="打印人" align="center" prop="quotPrintUserNickName" width="150px" v-if="$auth.hasPermi('quot:quot:changQuotPrintStatus')"/>
|
||||||
<el-table-column label="OA提交状态" align="center" prop="quotOAApprovalStatus" width="150px" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
<el-table-column label="OA提交状态" align="center" prop="quotOAApprovalStatus" width="150px" v-if="checkRole(['QUOT','PRICE_VERIFICATION','SALES_MAN'])">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.quot_oa_approval_status" :value="scope.row.quotOAApprovalStatus" v-if="scope.row.quotOAApprovalStatus!=0"/>
|
<dict-tag :options="dict.type.quot_oa_approval_status" :value="scope.row.quotOAApprovalStatus" v-if="scope.row.quotOAApprovalStatus!=0"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="OA审批说明" align="center" prop="quotOAApprovalStatusRemark" width="150px" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])"/>
|
<el-table-column label="OA审批说明" align="center" prop="quotOAApprovalStatusRemark" width="150px" v-if="checkRole(['QUOT','PRICE_VERIFICATION','SALES_MAN'])"/>
|
||||||
<el-table-column label="业务员" align="center" prop="quotSalesmanName" width="150px"/>
|
<el-table-column label="业务员" align="center" prop="quotSalesmanName" width="150px"/>
|
||||||
<el-table-column label="客户名称" align="center" prop="quotCustomerName" width="250px"/>
|
<el-table-column label="客户名称" align="center" prop="quotCustomerName" width="250px"/>
|
||||||
<el-table-column label="项目名称" align="center" prop="quotProject" width="250px"/>
|
<el-table-column label="项目名称" align="center" prop="quotProject" width="250px"/>
|
||||||
|
<el-table-column label="报价要求" align="center" prop="quotQuotationRequire" width="250px"/>
|
||||||
<el-table-column label="金思维提交状态" align="center" prop="quotJswApprovalStatus" width="150px" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
<el-table-column label="金思维提交状态" align="center" prop="quotJswApprovalStatus" width="150px" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.quot_jsw_approval_status" :value="scope.row.quotJswApprovalStatus" v-if="scope.row.quotJswApprovalStatus!=0"/>
|
<dict-tag :options="dict.type.quot_jsw_approval_status" :value="scope.row.quotJswApprovalStatus" v-if="scope.row.quotJswApprovalStatus!=0"/>
|
||||||
|
@ -413,14 +422,12 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="8" v-if="checkRole(['QUOT','PRICE_VERIFICATION','SALES_MAN'])">
|
<el-row :gutter="8" v-if="checkRole(['QUOT','PRICE_VERIFICATION','SALES_MAN'])">
|
||||||
<el-col :span="24" v-if="this.form.quotApprovalStatus != '0' && this.form.quotApprovalStatus != null">
|
<el-col :span="14" v-if="this.form.quotApprovalStatus != '0' && this.form.quotApprovalStatus != null">
|
||||||
<el-form-item label="反馈说明" prop="quotFeedbackExplanation">
|
<el-form-item label="反馈说明" prop="quotFeedbackExplanation">
|
||||||
<el-input type="textarea" autosize v-model="form.quotFeedbackExplanation" placeholder="报价组填写" :disabled="this.form.quotApprovalStatus == 2"/>
|
<el-input type="textarea" autosize v-model="form.quotFeedbackExplanation" placeholder="报价组填写" :disabled="this.form.quotApprovalStatus == 2"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span="10" v-if="this.form.quotOAApprovalStatus == '2' || this.form.quotOAApprovalStatus == '3'">
|
||||||
<el-row :gutter="8" v-if="checkRole(['QUOT','PRICE_VERIFICATION','SALES_MAN'])">
|
|
||||||
<el-col :span="24" v-if="this.form.quotOAApprovalStatus == '2' || this.form.quotOAApprovalStatus == '3'">
|
|
||||||
<el-form-item label="OA审批说明" prop="quotOAApprovalStatusRemark">
|
<el-form-item label="OA审批说明" prop="quotOAApprovalStatusRemark">
|
||||||
<el-input type="textarea" autosize v-model="form.quotOAApprovalStatusRemark" :disabled="true"/>
|
<el-input type="textarea" autosize v-model="form.quotOAApprovalStatusRemark" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -1370,10 +1377,10 @@ export default {
|
||||||
// 整单通过
|
// 整单通过
|
||||||
handleAllPass(row) {
|
handleAllPass(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const quotId = row.quotId || this.ids
|
const quotIds = row.quotId || this.ids
|
||||||
this.$modal.confirm('是否确认修订所选报价单且更新状态为通过?').then(function() {
|
this.$modal.confirm('是否确认修订所选报价单且更新状态为通过?').then(function() {
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
getAllPass(quotId).then(response => {
|
getAllPass(quotIds).then(response => {
|
||||||
this.$modal.msgSuccess("更改成功");
|
this.$modal.msgSuccess("更改成功");
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
|
|
|
@ -92,56 +92,58 @@
|
||||||
<pane>
|
<pane>
|
||||||
<el-card id="scroll" class="box-card scrollable" :style="{'overflow': 'auto','max-height': scrollableHeight,'height': scrollableHeight}">
|
<el-card id="scroll" class="box-card scrollable" :style="{'overflow': 'auto','max-height': scrollableHeight,'height': scrollableHeight}">
|
||||||
<div style="min-width: 650px">
|
<div style="min-width: 650px">
|
||||||
<el-row :gutter="8">
|
<el-form ref="form" :model="form" label-width="100px">
|
||||||
<el-col :span="12">
|
<el-row :gutter="8">
|
||||||
<el-form-item label="询价单位" prop="quotCustomer" style="margin-bottom: 10px;">
|
<el-col :span="12">
|
||||||
<el-input v-model="form.quotCustomer" placeholder="请输入询价单位" />
|
<el-form-item label="询价单位" prop="quotCustomer" style="margin-bottom: 10px;">
|
||||||
</el-form-item>
|
<el-input v-model="form.quotCustomer" placeholder="请输入询价单位" />
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span="12">
|
</el-col>
|
||||||
<el-form-item label="项目名称" prop="quotProject" style="margin-bottom: 10px;">
|
<el-col :span="12">
|
||||||
<el-input v-model="form.quotProject" placeholder="请输入项目名称"/>
|
<el-form-item label="项目名称" prop="quotProject" style="margin-bottom: 10px;">
|
||||||
</el-form-item>
|
<el-input v-model="form.quotProject" placeholder="请输入项目名称"/>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
</el-row>
|
</el-col>
|
||||||
<el-row :gutter="8">
|
</el-row>
|
||||||
<el-col :span="8">
|
<el-row :gutter="8">
|
||||||
<el-form-item label="联系人" prop="quotLxr" style="margin-bottom: 10px;">
|
<el-col :span="8">
|
||||||
<el-input v-model="form.quotLxr" placeholder="请输入联系人" />
|
<el-form-item label="联系人" prop="quotLxr" style="margin-bottom: 10px;">
|
||||||
</el-form-item>
|
<el-input v-model="form.quotLxr" placeholder="请输入联系人" />
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span="8">
|
</el-col>
|
||||||
<el-form-item label="联系电话" prop="quotLxrdh" style="margin-bottom: 10px;">
|
<el-col :span="8">
|
||||||
<el-input v-model="form.quotLxrdh" placeholder="请输入联系电话"/>
|
<el-form-item label="联系电话" prop="quotLxrdh" style="margin-bottom: 10px;">
|
||||||
</el-form-item>
|
<el-input v-model="form.quotLxrdh" placeholder="请输入联系电话"/>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span="8">
|
</el-col>
|
||||||
<el-form-item label="总价" style="margin-bottom: 10px;">
|
<el-col :span="8">
|
||||||
<el-input class="totalPrice-input" v-model="sumSelectedResultData"/>
|
<el-form-item label="总价" style="margin-bottom: 10px;">
|
||||||
</el-form-item>
|
<el-input class="totalPrice-input" v-model="sumSelectedResultData"/>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
</el-row>
|
</el-col>
|
||||||
<el-row :gutter="8">
|
</el-row>
|
||||||
<el-col :span="24">
|
<el-row :gutter="8">
|
||||||
<el-form-item label="总金额" prop="totalPrice" v-if="false">
|
<el-col :span="24">
|
||||||
<el-input v-model="form.totalPrice"/>
|
<el-form-item label="总金额" prop="totalPrice" v-if="false">
|
||||||
</el-form-item>
|
<el-input v-model="form.totalPrice"/>
|
||||||
<el-form-item label="设置折扣率" label-width="100px" style="margin-bottom: 10px;">
|
</el-form-item>
|
||||||
<el-input style="width:65px" v-model="perc" size="small" @blur="changeData" @keyup.enter.native="changeData"></el-input>
|
<el-form-item label="设置折扣率" label-width="100px" style="margin-bottom: 10px;">
|
||||||
<el-input style="width:65px;margin-left: 5px" v-model="perc2" size="small" @blur="changeData" @keyup.enter.native="changeData"></el-input>
|
<el-input style="width:65px" v-model="form.perc" size="small" @blur="changeData" @keyup.enter.native="changeData"></el-input>
|
||||||
<!--总价:<span style="color:red;font-size: 15px">{{sumSelectedResultData}} 元</span>-->
|
<el-input style="width:65px;margin-left: 5px" v-model="form.perc2" size="small" @blur="changeData" @keyup.enter.native="changeData"></el-input>
|
||||||
<el-select v-model="form.rbDateUid" style="width: 235px;margin-left: 5px" :disabled="selectedResultData.length==0">
|
<!--总价:<span style="color:red;font-size: 15px">{{sumSelectedResultData}} 元</span>-->
|
||||||
<el-option
|
<el-select v-model="form.rbDateUid" style="width: 235px;margin-left: 5px" :disabled="selectedResultData.length==0">
|
||||||
v-for="item in versionList"
|
<el-option
|
||||||
:key="item.value"
|
v-for="item in versionList"
|
||||||
:label="item.label"
|
:key="item.value"
|
||||||
:value="item.value"
|
:label="item.label"
|
||||||
@click.native="selectRbDate(item.value)"/>
|
:value="item.value"
|
||||||
</el-select>
|
@click.native="selectRbDate(item.value)"/>
|
||||||
<el-button style="float: right;" size="mini" type="info" plain icon="el-icon-upload2" @click="handleExport">导出</el-button>
|
</el-select>
|
||||||
</el-form-item>
|
<el-button style="float: right;" size="mini" type="info" plain icon="el-icon-upload2" @click="handleExport">导出</el-button>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
</el-row>
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<!--
|
<!--
|
||||||
<p v-if="isColumn1ValuesEqual">存在与当前调价版本不一致的产品,请选择调价日期批量刷新</p>
|
<p v-if="isColumn1ValuesEqual">存在与当前调价版本不一致的产品,请选择调价日期批量刷新</p>
|
||||||
|
@ -263,14 +265,9 @@
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 表格行颜色CSS样式 */
|
|
||||||
.row-background-color {
|
|
||||||
background-color: red; /* 你想要的颜色 */
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import {toDecimal, productList,versionList,productRemarkList,productXinghList,judgeparent,productZlList,productYsxhListCheck,productYsxhList,productJmListCheck,productJmList,searchData,handleSearchData,saveQuot, madeQuot, madeXjQuot, updateSelectedResultData} from "@/api/redBook/redBook";
|
import {toDecimal, productList,versionList,getQuotDetail,productRemarkList,productXinghList,judgeparent,productZlList,productYsxhListCheck,productYsxhList,productJmListCheck,productJmList,searchData,handleSearchData,saveQuot, madeQuot, madeXjQuot, updateSelectedResultData} from "@/api/redBook/redBook";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
export default {
|
export default {
|
||||||
name: "productSelect",
|
name: "productSelect",
|
||||||
|
@ -329,6 +326,9 @@
|
||||||
searchResultCurrentPage: 1,
|
searchResultCurrentPage: 1,
|
||||||
searchResultPageSize: 10,
|
searchResultPageSize: 10,
|
||||||
searchResultData: [],
|
searchResultData: [],
|
||||||
|
errSlIndex: [],//保存/导出时校验数量格式,错误索引
|
||||||
|
errPercIndex: [],//保存/导出时校验一次折扣格式,错误索引
|
||||||
|
errPerc2Index: [],//保存/导出时校验二次折扣格式,错误索引
|
||||||
|
|
||||||
/**==============已选择结果========================= */
|
/**==============已选择结果========================= */
|
||||||
selectedResultLoading: false,
|
selectedResultLoading: false,
|
||||||
|
@ -353,11 +353,11 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
//折扣率 初始值
|
//折扣率 初始值
|
||||||
perc: 0.8,
|
/*perc: 0.8,
|
||||||
perc2: '',
|
perc2: '',*/
|
||||||
|
|
||||||
//表单
|
//表单
|
||||||
form: {totalPrice: ''},
|
form: {totalPrice: '',perc:0.8,perc2: ''},
|
||||||
|
|
||||||
//调价日期
|
//调价日期
|
||||||
versionList: [], // 调价版本数据列表
|
versionList: [], // 调价版本数据列表
|
||||||
|
@ -366,8 +366,17 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
const param = this.$route.query;
|
||||||
|
const that = this;
|
||||||
this.productList();
|
this.productList();
|
||||||
this.getVersionList();
|
this.getVersionList().then(function(){
|
||||||
|
if (param.quotId !== undefined && param.quotId !== null) {
|
||||||
|
that.handleRefreshClick();
|
||||||
|
|
||||||
|
const row = {'quotId':param.quotId}
|
||||||
|
that.handleQuotInfo(row);
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
/*设置内容高度*/
|
/*设置内容高度*/
|
||||||
|
@ -376,6 +385,16 @@
|
||||||
this.tableHeight = (window.innerHeight - 340) + 'px';
|
this.tableHeight = (window.innerHeight - 340) + 'px';
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
/** 查看报价单转报价操作 */
|
||||||
|
handleQuotInfo(row) {
|
||||||
|
const quotId = row.quotId;
|
||||||
|
getQuotDetail(quotId).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.selectedResultData = response.data.selectedResultData;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
//备注内容设置 展开 || 收起文本
|
//备注内容设置 展开 || 收起文本
|
||||||
toggleText(id) {
|
toggleText(id) {
|
||||||
if (this.expandedIndex === id) {
|
if (this.expandedIndex === id) {
|
||||||
|
@ -386,34 +405,34 @@
|
||||||
},
|
},
|
||||||
//目录选择
|
//目录选择
|
||||||
selModelTag(item) {
|
selModelTag(item) {
|
||||||
this.expandedIndex = -1;
|
this.expandedIndex = -1;//备注内容收起
|
||||||
this.showRemarkList = false,
|
this.showRemarkList = false,//备注内容清空隐藏
|
||||||
this.remarkList = [],
|
this.remarkList = [],
|
||||||
|
|
||||||
this.selectedXinghTag = '';
|
this.selectedXinghTag = '';//清空选中的型号
|
||||||
this.showXinghList = false,
|
this.showXinghList = false,
|
||||||
this.xinghList = [],
|
this.xinghList = [],
|
||||||
|
|
||||||
this.selectedZlTag = '';
|
this.selectedZlTag = '';//清空选中的子类
|
||||||
this.showZlList = false,
|
this.showZlList = false,
|
||||||
this.ZlList = [],
|
this.ZlList = [],
|
||||||
|
|
||||||
this.selectedYsxhTag = '';
|
this.selectedYsxhTag = '';//清空选中的衍生型号
|
||||||
this.showYsxhList = false,
|
this.showYsxhList = false,
|
||||||
this.ysxhList = [],
|
this.ysxhList = [],
|
||||||
|
|
||||||
this.selectedJmTag = '';
|
this.selectedJmTag = '';//清空选中的截面
|
||||||
this.showJmList = false,
|
this.showJmList = false,
|
||||||
this.jmList = [],
|
this.jmList = [],
|
||||||
|
|
||||||
this.searchResultCurrentPage = 1,
|
this.searchResultCurrentPage = 1,//清空结果列表数据
|
||||||
this.searchResultPageSize = 10,
|
this.searchResultPageSize = 10,
|
||||||
this.searchResultData = [],
|
this.searchResultData = [],
|
||||||
|
|
||||||
this.selectedModelTag = item.name_0;
|
this.selectedModelTag = item.name_0;//设置选中的目录
|
||||||
//显示备注信息
|
//显示备注信息
|
||||||
this.productRemarkList(item.uid_0)
|
this.productRemarkList(item.uid_0)
|
||||||
//显示型号
|
//显示型号信息
|
||||||
this.productXinghList(item.uid_0)
|
this.productXinghList(item.uid_0)
|
||||||
},
|
},
|
||||||
//获取目录
|
//获取目录
|
||||||
|
@ -440,24 +459,24 @@
|
||||||
},
|
},
|
||||||
//型号选择
|
//型号选择
|
||||||
selXinghTag(item) {
|
selXinghTag(item) {
|
||||||
this.selectedZlTag = '';
|
this.selectedZlTag = '';//清空选中的子类
|
||||||
this.showZlList = false,
|
this.showZlList = false,
|
||||||
this.ZlList = [],
|
this.ZlList = [],
|
||||||
|
|
||||||
this.selectedYsxhTag = '';
|
this.selectedYsxhTag = '';//清空选中的衍生型号
|
||||||
this.showYsxhList = false,
|
this.showYsxhList = false,
|
||||||
this.ysxhList = [],
|
this.ysxhList = [],
|
||||||
|
|
||||||
this.selectedJmTag = '';
|
this.selectedJmTag = '';//清空选中的截面
|
||||||
this.showJmList = false,
|
this.showJmList = false,
|
||||||
this.jmList = [],
|
this.jmList = [],
|
||||||
|
|
||||||
this.searchResultCurrentPage = 1,
|
this.searchResultCurrentPage = 1,//清空结果列表数据
|
||||||
this.searchResultPageSize = 10,
|
this.searchResultPageSize = 10,
|
||||||
this.searchResultData = [],
|
this.searchResultData = [],
|
||||||
|
|
||||||
this.selectedXinghUid = item.uid_0
|
this.selectedXinghUid = item.uid_0 //设置选中的型号uid
|
||||||
this.selectedXinghTag = item.name_0;
|
this.selectedXinghTag = item.name_0;//设置选中的型号名称
|
||||||
//判断是否为父节点,如果有说明下面还有子类显示,如果没有则直接显示衍生型号
|
//判断是否为父节点,如果有说明下面还有子类显示,如果没有则直接显示衍生型号
|
||||||
this.judgeparent(item)
|
this.judgeparent(item)
|
||||||
},
|
},
|
||||||
|
@ -467,7 +486,7 @@
|
||||||
judgeparent(this.params).then(response => {
|
judgeparent(this.params).then(response => {
|
||||||
if (response) {//存在子类
|
if (response) {//存在子类
|
||||||
this.productZlList(item.uid_0)
|
this.productZlList(item.uid_0)
|
||||||
} else {//判断是否存在衍生型号
|
} else {//不存在子类,则继续判断是否存在衍生型号
|
||||||
this.productYsxhListCheck(item.uid_0, item.name_0)
|
this.productYsxhListCheck(item.uid_0, item.name_0)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -505,15 +524,15 @@
|
||||||
|
|
||||||
//子类选择
|
//子类选择
|
||||||
selZlTag(item) {
|
selZlTag(item) {
|
||||||
this.selectedYsxhTag = '';
|
this.selectedYsxhTag = '';//清空选中的衍生型号
|
||||||
this.showYsxhList = false,
|
this.showYsxhList = false,
|
||||||
this.ysxhList = [],
|
this.ysxhList = [],
|
||||||
|
|
||||||
this.selectedJmTag = '';
|
this.selectedJmTag = '';//清空选中的截面
|
||||||
this.showJmList = false,
|
this.showJmList = false,
|
||||||
this.jmList = [],
|
this.jmList = [],
|
||||||
|
|
||||||
this.searchResultCurrentPage = 1,
|
this.searchResultCurrentPage = 1,//清空结果列表数据
|
||||||
this.searchResultPageSize = 10,
|
this.searchResultPageSize = 10,
|
||||||
this.searchResultData = [],
|
this.searchResultData = [],
|
||||||
|
|
||||||
|
@ -524,12 +543,12 @@
|
||||||
|
|
||||||
//衍生型号选择
|
//衍生型号选择
|
||||||
selYsxhTag(item) {
|
selYsxhTag(item) {
|
||||||
this.selectedJmTag = '';
|
this.selectedJmTag = '';//清空选中的截面
|
||||||
this.selectedYsxhUid = item.uid_0;
|
this.selectedYsxhUid = item.uid_0;
|
||||||
this.showJmList = false,
|
this.showJmList = false,
|
||||||
this.jmList = [],
|
this.jmList = [],
|
||||||
|
|
||||||
this.searchResultCurrentPage = 1,
|
this.searchResultCurrentPage = 1,//清空结果列表数据
|
||||||
this.searchResultPageSize = 10,
|
this.searchResultPageSize = 10,
|
||||||
this.searchResultData = [],
|
this.searchResultData = [],
|
||||||
|
|
||||||
|
@ -560,11 +579,11 @@
|
||||||
selJmTag(item) {
|
selJmTag(item) {
|
||||||
this.selectedJmTag = item.section;
|
this.selectedJmTag = item.section;
|
||||||
|
|
||||||
this.searchResultCurrentPage = 1,
|
this.searchResultCurrentPage = 1,//清空结果列表数据
|
||||||
this.searchResultPageSize = 10,
|
this.searchResultPageSize = 10,
|
||||||
this.searchResultData = [],
|
this.searchResultData = [],
|
||||||
|
|
||||||
this.searchResultLoading = true;
|
this.searchResultLoading = true;
|
||||||
this.searchData(this.selectedYsxhUid, item.section)
|
this.searchData(this.selectedYsxhUid, item.section)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -587,8 +606,8 @@
|
||||||
const voltage = row.voltage;
|
const voltage = row.voltage;
|
||||||
const price = row.price;
|
const price = row.price;
|
||||||
const stu = row.stu;
|
const stu = row.stu;
|
||||||
const per = this.perc;
|
const per = this.form.perc;
|
||||||
const per2 = this.perc2;
|
const per2 = this.form.perc2;
|
||||||
const count = '1';
|
const count = '1';
|
||||||
const setPrice = toDecimal(price * (per?per:1) * (per2?per2:1));
|
const setPrice = toDecimal(price * (per?per:1) * (per2?per2:1));
|
||||||
const allPrice = toDecimal(count * price * (per?per:1) * (per2?per2:1));
|
const allPrice = toDecimal(count * price * (per?per:1) * (per2?per2:1));
|
||||||
|
@ -684,14 +703,14 @@
|
||||||
changeData() {
|
changeData() {
|
||||||
// 校验折扣率格式
|
// 校验折扣率格式
|
||||||
const pattern = /^\d+(\.\d+)?$/;
|
const pattern = /^\d+(\.\d+)?$/;
|
||||||
if(this.perc) {
|
if(this.form.perc) {
|
||||||
if (!pattern.test(this.perc)) {
|
if (!pattern.test(this.form.perc)) {
|
||||||
this.$message.warning("折扣率格式错误!");
|
this.$message.warning("折扣率格式错误!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.perc2) {
|
if(this.form.perc2) {
|
||||||
if (!pattern.test(this.perc2)) {
|
if (!pattern.test(this.form.perc2)) {
|
||||||
this.$message.warning("折扣率格式错误!");
|
this.$message.warning("折扣率格式错误!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -702,10 +721,10 @@
|
||||||
// 进行其他计算
|
// 进行其他计算
|
||||||
this.$set(this.selectedResultData, index, {
|
this.$set(this.selectedResultData, index, {
|
||||||
...row,
|
...row,
|
||||||
per: this.perc,
|
per: this.form.perc,
|
||||||
per2: this.perc2,
|
per2: this.form.perc2,
|
||||||
setPrice: toDecimal(row.price * (this.perc?this.perc:1) * (this.perc2?this.perc2:1)),
|
setPrice: toDecimal(row.price * (this.form.perc?this.form.perc:1) * (this.form.perc2?this.form.perc2:1)),
|
||||||
allPrice: toDecimal(row.count * row.price * (this.perc?this.perc:1) * (this.perc2?this.perc2:1)),
|
allPrice: toDecimal(row.count * row.price * (this.form.perc?this.form.perc:1) * (this.form.perc2?this.form.perc2:1)),
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -728,66 +747,79 @@
|
||||||
this.form.quotLxr = '';
|
this.form.quotLxr = '';
|
||||||
this.form.quotLxrdh = '';
|
this.form.quotLxrdh = '';
|
||||||
|
|
||||||
this.perc = '0.8';
|
this.form.perc = '0.8';
|
||||||
this.perc2 = '';
|
this.form.perc2 = '';
|
||||||
this.form.rbDateUid = this.versionList[0].value
|
this.form.rbDateUid = this.versionList[0].value
|
||||||
this.selectedResultData = [];
|
this.selectedResultData = [];
|
||||||
//this.resetForm("form");
|
//this.resetForm("form");
|
||||||
},
|
},
|
||||||
// 报价单保存修改
|
// 报价单保存修改
|
||||||
handleSaveClick() {
|
handleSaveClick() {
|
||||||
if(!this.isColumn1ValuesEqual){
|
let flag = this.checkSlZk();
|
||||||
this.$modal.msgError("存在与当前调价版本不一致的产品,请选择调价日期批量刷新");
|
if(flag){
|
||||||
return;
|
if(!this.isColumn1ValuesEqual){
|
||||||
}
|
this.$modal.msgError("存在与当前调价版本不一致的产品,请选择调价日期批量刷新");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const allPrice = this.selectedResultData.reduce((sum, row) => sum + parseFloat(row.allPrice), 0);
|
const allPrice = this.selectedResultData.reduce((sum, row) => sum + parseFloat(row.allPrice), 0);
|
||||||
this.form.totalPrice = toDecimal(allPrice);
|
this.form.totalPrice = toDecimal(allPrice);
|
||||||
this.form.selectedResultData = this.selectedResultData;
|
this.form.selectedResultData = this.selectedResultData;
|
||||||
saveQuot(this.form).then(response => {
|
saveQuot(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("保存报价单成功,单号:"+response.data.quotCode);
|
if(this.form.quot_id){
|
||||||
})
|
this.$modal.msgSuccess("修改报价单成功,单号:"+response.data.quotCode);
|
||||||
|
}else{
|
||||||
|
this.$modal.msgSuccess("保存报价单成功,单号:"+response.data.quotCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 报价单生成
|
// 报价单生成
|
||||||
handleMadeQuotClick() {
|
handleMadeQuotClick() {
|
||||||
|
let flag = this.checkSlZk();
|
||||||
if(!this.isColumn1ValuesEqual){
|
if(flag){
|
||||||
this.$modal.msgError("存在与当前调价版本不一致的产品,请选择调价日期批量刷新");
|
if(!this.isColumn1ValuesEqual){
|
||||||
return;
|
this.$modal.msgError("存在与当前调价版本不一致的产品,请选择调价日期批量刷新");
|
||||||
}
|
return;
|
||||||
|
|
||||||
this.form.selectedResultData = this.selectedResultData;
|
|
||||||
madeQuot(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("生成报价单成功");
|
|
||||||
// 处理返回的文件流
|
|
||||||
const content = response;
|
|
||||||
const blob = new Blob([content]);
|
|
||||||
const fileName = "RB_BJD_"+this.getTodayCourse()+".xls";
|
|
||||||
if ("download" in document.createElement("a")) {
|
|
||||||
// 非IE下载
|
|
||||||
const elink = document.createElement("a");
|
|
||||||
elink.download = fileName;
|
|
||||||
elink.style.display = "none";
|
|
||||||
elink.href = URL.createObjectURL(blob);
|
|
||||||
document.body.appendChild(elink);
|
|
||||||
elink.click();
|
|
||||||
URL.revokeObjectURL(elink.href); // 释放URL 对象
|
|
||||||
document.body.removeChild(elink);
|
|
||||||
}else {
|
|
||||||
// IE10+下载
|
|
||||||
navigator.msSaveBlob(blob, fileName);
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
this.form.selectedResultData = this.selectedResultData;
|
||||||
|
madeQuot(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("生成报价单成功");
|
||||||
|
// 处理返回的文件流
|
||||||
|
const content = response;
|
||||||
|
const blob = new Blob([content]);
|
||||||
|
const fileName = "RB_BJD_"+this.getTodayCourse()+".xls";
|
||||||
|
if ("download" in document.createElement("a")) {
|
||||||
|
// 非IE下载
|
||||||
|
const elink = document.createElement("a");
|
||||||
|
elink.download = fileName;
|
||||||
|
elink.style.display = "none";
|
||||||
|
elink.href = URL.createObjectURL(blob);
|
||||||
|
document.body.appendChild(elink);
|
||||||
|
elink.click();
|
||||||
|
URL.revokeObjectURL(elink.href); // 释放URL 对象
|
||||||
|
document.body.removeChild(elink);
|
||||||
|
}else {
|
||||||
|
// IE10+下载
|
||||||
|
navigator.msSaveBlob(blob, fileName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 生成询价单
|
// 生成询价单
|
||||||
handleMadeXjQuotClick() {
|
handleMadeXjQuotClick() {
|
||||||
this.madeQuotDis = true;
|
let flag = this.checkSlZk();
|
||||||
this.form.selectedResultData = this.selectedResultData;
|
if(flag){
|
||||||
madeXjQuot(this.form).then(response => {
|
this.madeQuotDis = true;
|
||||||
this.$modal.msgSuccess("生成询价单成功,单号:"+response.data.quotCode);
|
this.form.selectedResultData = this.selectedResultData;
|
||||||
this.madeQuotDis = false;
|
madeXjQuot(this.form).then(response => {
|
||||||
});
|
this.$modal.msgSuccess("生成询价单成功,单号:"+response.data.quotCode);
|
||||||
|
this.madeQuotDis = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 产品数据导入按钮操作 */
|
/** 产品数据导入按钮操作 */
|
||||||
|
@ -830,15 +862,18 @@
|
||||||
|
|
||||||
// 导出明细
|
// 导出明细
|
||||||
handleExport(){
|
handleExport(){
|
||||||
const fileName = "RB_BJD_"+this.getTodayCourse();
|
let flag = this.checkSlZk();
|
||||||
this.download('redBook/redBook/exportProduct', {
|
if(flag){
|
||||||
selectedResultData: JSON.stringify(this.selectedResultData)
|
const fileName = "RB_BJD_"+this.getTodayCourse();
|
||||||
}, fileName +".xlsx")
|
this.download('redBook/redBook/exportProduct', {
|
||||||
|
selectedResultData: JSON.stringify(this.selectedResultData)
|
||||||
|
}, fileName +".xlsx")
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//获取调价日期
|
//获取调价日期
|
||||||
getVersionList(){
|
async getVersionList(){
|
||||||
versionList(this.queryParams).then(response => {
|
await versionList(this.queryParams).then(response => {
|
||||||
this.versionList = response.versionList;
|
this.versionList = response.versionList;
|
||||||
this.form.rbDateUid = this.versionList[0].value
|
this.form.rbDateUid = this.versionList[0].value
|
||||||
});
|
});
|
||||||
|
@ -861,9 +896,7 @@
|
||||||
for (let j = 0; j < response.data.length; j++) {
|
for (let j = 0; j < response.data.length; j++) {
|
||||||
// 检查型号、规格、电压等级是否相等
|
// 检查型号、规格、电压等级是否相等
|
||||||
if (
|
if (
|
||||||
this.selectedResultData[i].name_0 === response.data[j].name_0 &&
|
this.selectedResultData[i].name_0 === response.data[j].name_0
|
||||||
this.selectedResultData[i].spec === response.data[j].spec &&
|
|
||||||
this.selectedResultData[i].voltage === response.data[j].voltage
|
|
||||||
) {
|
) {
|
||||||
this.selectedResultData[i].price = response.data[j].price;
|
this.selectedResultData[i].price = response.data[j].price;
|
||||||
const setPrice = toDecimal(this.selectedResultData[i].price * (this.selectedResultData[i].per?this.selectedResultData[i].per:1) * (this.selectedResultData[i].per2?this.selectedResultData[i].per2:1));
|
const setPrice = toDecimal(this.selectedResultData[i].price * (this.selectedResultData[i].per?this.selectedResultData[i].per:1) * (this.selectedResultData[i].per2?this.selectedResultData[i].per2:1));
|
||||||
|
@ -895,6 +928,67 @@
|
||||||
},
|
},
|
||||||
p(s) {
|
p(s) {
|
||||||
return s < 10 ? '0' + s : s;
|
return s < 10 ? '0' + s : s;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// 校验明细行中-数量、一次折扣、二次折扣格式
|
||||||
|
checkSlZk(){
|
||||||
|
let flag = true;
|
||||||
|
this.errSlIndex = [];
|
||||||
|
this.errPercIndex = [];
|
||||||
|
this.errPerc2Index = [];
|
||||||
|
let errMsg = "";
|
||||||
|
|
||||||
|
const label = /^(\+)?\d+(\.\d+)?$/;
|
||||||
|
let reg = new RegExp(label);
|
||||||
|
this.selectedResultData.forEach((row, index) => {
|
||||||
|
//数量
|
||||||
|
let sl = row.count;
|
||||||
|
if(sl){
|
||||||
|
sl = String(sl).trim();
|
||||||
|
if (!reg.test(sl)) {
|
||||||
|
this.errSlIndex.push(index+1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//一次折扣
|
||||||
|
let perc = row.per;
|
||||||
|
if(perc){
|
||||||
|
perc = String(perc).trim();
|
||||||
|
if (!reg.test(perc)) {
|
||||||
|
this.errPercIndex.push(index+1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//二次折扣
|
||||||
|
let perc2 = row.per2;
|
||||||
|
if(perc2){
|
||||||
|
perc2 = String(perc2).trim();
|
||||||
|
if (!reg.test(perc2)) {
|
||||||
|
this.errPerc2Index.push(index+1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if(this.errPercIndex.length!=0){
|
||||||
|
flag = false;
|
||||||
|
errMsg = "第"+this.errPercIndex.join(",")+"行报价产品明细【一次折扣】格式错误";
|
||||||
|
this.$modal.msgError(errMsg);
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
if(this.errPerc2Index.length!=0){
|
||||||
|
flag = false;
|
||||||
|
errMsg = "第"+this.errPerc2Index.join(",")+"行报价产品明细【二次折扣】格式错误";
|
||||||
|
this.$modal.msgError(errMsg);
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
if(this.errSlIndex.length!=0){
|
||||||
|
flag = false;
|
||||||
|
errMsg = "第"+this.errSlIndex.join(",")+"行报价产品明细【数量调整】格式错误";
|
||||||
|
this.$modal.msgError(errMsg);
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -921,7 +1015,6 @@
|
||||||
isColumn1ValuesEqual() {
|
isColumn1ValuesEqual() {
|
||||||
if(this.selectedResultData.length > 0){
|
if(this.selectedResultData.length > 0){
|
||||||
const uid_0 = this.selectedResultData[0].uid_0;//版本uid
|
const uid_0 = this.selectedResultData[0].uid_0;//版本uid
|
||||||
console.log(this.selectedResultData)
|
|
||||||
return this.selectedResultData.every(row => row.uid_0 === uid_0);
|
return this.selectedResultData.every(row => row.uid_0 === uid_0);
|
||||||
}else{
|
}else{
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -20,16 +20,6 @@
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--<el-form-item label="提交状态" prop="quotApprovalStatus">
|
|
||||||
<el-select v-model="queryParams.quotApprovalStatus" placeholder="请选择提交状态" clearable>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict.type.rb_quot_approval_status"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>-->
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
@ -38,9 +28,11 @@
|
||||||
|
|
||||||
<el-table width="100%" v-loading="loading" :data="quotsList" :row-class-name="rowQuotsIndex">
|
<el-table width="100%" v-loading="loading" :data="quotsList" :row-class-name="rowQuotsIndex">
|
||||||
<el-table-column fixed="left" label="序号" align="center" prop="index" width="50"/>
|
<el-table-column fixed="left" label="序号" align="center" prop="index" width="50"/>
|
||||||
<el-table-column fixed="left" label="操作" align="center" width="60" class-name="small-padding fixed-width" v-if="checkRole(['SALES_MAN'])">
|
<el-table-column fixed="left" label="操作" align="center" width="100" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" @click="handleDeleteClick(scope.row)">删除</el-button>
|
<el-button type="text" @click="handleDeleteClick(scope.row)">删除</el-button>
|
||||||
|
|
||||||
|
<el-button type="text" @click="handleToOAQuotClick(scope.row)">转报价</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column fixed="left" label="quot_id" align="center" prop="quot_id" v-if="false"/>
|
<el-table-column fixed="left" label="quot_id" align="center" prop="quot_id" v-if="false"/>
|
||||||
|
@ -49,11 +41,6 @@
|
||||||
<el-link :underline="false" type="primary" @click="handleDetail(scope.row)">{{scope.row.quotCode}}</el-link>
|
<el-link :underline="false" type="primary" @click="handleDetail(scope.row)">{{scope.row.quotCode}}</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!--<el-table-column fixed="left" label="提交状态" align="center" prop="quotApprovalStatus" width="150px">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<dict-tag :options="dict.type.rb_quot_approval_status" :value="scope.row.quotApprovalStatus"/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>-->
|
|
||||||
<el-table-column label="报价客户" width="250" align="center" prop="quotCustomer" />
|
<el-table-column label="报价客户" width="250" align="center" prop="quotCustomer" />
|
||||||
<el-table-column label="报价项目" width="250" align="center" prop="quotProject" />
|
<el-table-column label="报价项目" width="250" align="center" prop="quotProject" />
|
||||||
<el-table-column label="总价" width="100" align="center" prop="totalPrice" />
|
<el-table-column label="总价" width="100" align="center" prop="totalPrice" />
|
||||||
|
@ -102,10 +89,10 @@
|
||||||
<el-input v-model="form.totalPrice"/>
|
<el-input v-model="form.totalPrice"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设置折扣率" label-width="100px">
|
<el-form-item label="设置折扣率" label-width="100px">
|
||||||
<el-input style="width:65px" v-model="perc" size="small" @blur="changeData" @keyup.enter.native="changeData"></el-input>
|
<el-input style="width:65px" v-model="form.perc" size="small" @blur="changeData" @keyup.enter.native="changeData"></el-input>
|
||||||
<el-input style="width:65px;margin-left: 5px" v-model="perc2" size="small" @blur="changeData" @keyup.enter.native="changeData"></el-input>
|
<el-input style="width:65px;margin-left: 5px" v-model="form.perc2" size="small" @blur="changeData" @keyup.enter.native="changeData"></el-input>
|
||||||
<!--总价:<span style="color:red;font-size: 15px">{{sumSelectedResultData}} 元</span>-->
|
<!--总价:<span style="color:red;font-size: 15px">{{sumSelectedResultData}} 元</span>-->
|
||||||
<el-select v-model="form.rbDateUid" style="margin-left: 20px;width: 235px;" :disabled="selectedResultData.length==0 || form.quotApprovalStatus!=0">
|
<el-select v-model="form.rbDateUid" style="margin-left: 20px;width: 235px;" :disabled="selectedResultData.length==0">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in versionList"
|
v-for="item in versionList"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
|
@ -114,13 +101,22 @@
|
||||||
@click.native="selectRbDate(item.value)"/>
|
@click.native="selectRbDate(item.value)"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button style="float: right;margin-left: 5px;" size="small" type="success" icon="el-icon-document" @click="handleMadeQuotClick" :disabled="selectedResultData.length==0 || madeQuotDis">生成报价单</el-button>
|
<el-button style="float: right;margin-left: 5px;" size="small" type="success" icon="el-icon-document" @click="handleMadeQuotClick" :disabled="selectedResultData.length==0 || madeQuotDis">生成报价单</el-button>
|
||||||
<el-button style="float: right;" size="small" type="warning" icon="el-icon-folder" @click="handleSaveOtherClick" v-if="this.form.quotApprovalStatus==0" :disabled="selectedResultData.length==0">另存为</el-button>
|
<el-button style="float: right;" size="small" type="warning" icon="el-icon-folder" @click="handleSaveOtherClick">另存为</el-button>
|
||||||
<el-button style="float: right;" size="small" type="warning" icon="el-icon-folder" @click="handleSaveClick" v-if="this.form.quotApprovalStatus==0" :disabled="selectedResultData.length==0">保存</el-button>
|
<el-button style="float: right;" size="small" type="warning" icon="el-icon-folder" @click="handleSaveClick">保存</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-button size="mini" type="info" plain icon="el-icon-upload2" @click="handleExport">导出</el-button>
|
|
||||||
<el-table v-loading="selectedResultLoading" width="100%;" :row-class-name="selectedResultIndex" :data="selectedResultData" style="margin-top: 10px">
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteQuotMaterial">删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button size="mini" type="info" plain icon="el-icon-upload2" @click="handleExport">导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-table v-loading="selectedResultLoading" width="100%;" :row-class-name="selectedResultIndex" :data="selectedResultData" @selection-change="handleQuotMaterialSelectionChange" style="margin-top: 10px">
|
||||||
|
<el-table-column type="selection" width="50" align="center"/>
|
||||||
<el-table-column fixed="left" label="" align="center" prop="index" width="50"/>
|
<el-table-column fixed="left" label="" align="center" prop="index" width="50"/>
|
||||||
<el-table-column label="版本uid" align="center" prop="uid_0" v-if="false"/>
|
<el-table-column label="版本uid" align="center" prop="uid_0" v-if="false"/>
|
||||||
<el-table-column fixed="left" label="产品型号" align="center" prop="name_0" width="180"/>
|
<el-table-column fixed="left" label="产品型号" align="center" prop="name_0" width="180"/>
|
||||||
|
@ -148,9 +144,6 @@
|
||||||
<el-table-column label="总价" align="center" prop="allPrice"/>
|
<el-table-column label="总价" align="center" prop="allPrice"/>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-form>
|
</el-form>
|
||||||
<!--<div slot="footer" class="dialog-footer" v-if="this.form.quotApprovalStatus==0">
|
|
||||||
<el-button type="primary" @click="handleCommitClick">提交报价</el-button>
|
|
||||||
</div>-->
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total>0"
|
||||||
|
@ -178,8 +171,7 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import { checkRole } from "@/utils/permission"; // 权限判断函数
|
import {toDecimal, versionList,listQuots,getQuotDetail,deleteQuots,updateSelectedResultData,madeQuot,saveQuot } from "@/api/redBook/redBook";
|
||||||
import {toDecimal, versionList,listQuots,getQuotDetail,deleteQuots,updateSelectedResultData,madeQuot,saveQuot,commitQuot } from "@/api/redBook/redBook";
|
|
||||||
/** 弹窗放大、拖拽 */
|
/** 弹窗放大、拖拽 */
|
||||||
import elDragDialog from "@/directive/dialog/dragDialog";
|
import elDragDialog from "@/directive/dialog/dragDialog";
|
||||||
|
|
||||||
|
@ -199,6 +191,8 @@
|
||||||
total: 0,
|
total: 0,
|
||||||
//报价单数据
|
//报价单数据
|
||||||
quotsList: [],
|
quotsList: [],
|
||||||
|
// 子表选中数据
|
||||||
|
checkedQuotMaterial: [],
|
||||||
// 时间范围
|
// 时间范围
|
||||||
dateRange: [],
|
dateRange: [],
|
||||||
//调价日期
|
//调价日期
|
||||||
|
@ -212,7 +206,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
//表单
|
//表单
|
||||||
form: {quotApprovalStatus:''},
|
form: {totalPrice: '',perc:0.8,perc2: ''},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
quotCustomer: [
|
quotCustomer: [
|
||||||
|
@ -235,22 +229,30 @@
|
||||||
// 列表数据
|
// 列表数据
|
||||||
selectedResultData: [],
|
selectedResultData: [],
|
||||||
|
|
||||||
//折扣率 初始值
|
/*//折扣率 初始值
|
||||||
perc: 0.8,
|
perc: 0.8,
|
||||||
perc2: '',
|
perc2: '',*/
|
||||||
selectedResultLoading: false,
|
selectedResultLoading: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
/*const roles = this.$store.state.user.roles;
|
|
||||||
if(roles && roles.indexOf('QUOT') !== -1 ){//报价组默认查看待审核 单据
|
|
||||||
this.queryParams.quotApprovalStatus = '1';
|
|
||||||
}*/
|
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getVersionList();
|
this.getVersionList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkRole,
|
// 刷新
|
||||||
|
handleRefreshClick() {
|
||||||
|
this.form.quotCustomer = '';
|
||||||
|
this.form.quotProject = '';
|
||||||
|
this.form.quotLxr = '';
|
||||||
|
this.form.quotLxrdh = '';
|
||||||
|
|
||||||
|
this.form.perc = '0.8';
|
||||||
|
this.form.perc2 = '';
|
||||||
|
this.form.rbDateUid = this.versionList[0].value
|
||||||
|
this.selectedResultData = [];
|
||||||
|
//this.resetForm("form");
|
||||||
|
},
|
||||||
/** 查询报价单列表 */
|
/** 查询报价单列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -261,8 +263,8 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取调价日期
|
//获取调价日期
|
||||||
getVersionList(){
|
async getVersionList(){
|
||||||
versionList(this.queryParams).then(response => {
|
await versionList(this.queryParams).then(response => {
|
||||||
this.versionList = response.versionList;
|
this.versionList = response.versionList;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -283,6 +285,7 @@
|
||||||
|
|
||||||
/** 查看详情按钮操作 */
|
/** 查看详情按钮操作 */
|
||||||
handleDetail(row) {
|
handleDetail(row) {
|
||||||
|
this.handleRefreshClick();
|
||||||
const quotId = row.quot_id;
|
const quotId = row.quot_id;
|
||||||
getQuotDetail(quotId).then(response => {
|
getQuotDetail(quotId).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
|
@ -305,18 +308,32 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/** 转报价 */
|
||||||
|
handleToOAQuotClick(row) {
|
||||||
|
const info = {quotId : row.quot_id}
|
||||||
|
|
||||||
|
this.$router.push({
|
||||||
|
path:'/redBook/productSelect',
|
||||||
|
name: 'ProductSelect',
|
||||||
|
query: info
|
||||||
|
})
|
||||||
|
/*
|
||||||
|
this.$router.push({ path: '/oaQuote/oaQuoteEdit', query: info});
|
||||||
|
*/
|
||||||
|
},
|
||||||
|
|
||||||
//一次折扣率变化时触发
|
//一次折扣率变化时触发
|
||||||
changeData() {
|
changeData() {
|
||||||
// 校验折扣率格式
|
// 校验折扣率格式
|
||||||
const pattern = /^\d+(\.\d+)?$/;
|
const pattern = /^\d+(\.\d+)?$/;
|
||||||
if(this.perc) {
|
if(this.form.perc) {
|
||||||
if (!pattern.test(this.perc)) {
|
if (!pattern.test(this.form.perc)) {
|
||||||
this.$message.warning("折扣率格式错误!");
|
this.$message.warning("折扣率格式错误!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.perc2) {
|
if(this.form.perc2) {
|
||||||
if (!pattern.test(this.perc2)) {
|
if (!pattern.test(this.form.perc2)) {
|
||||||
this.$message.warning("折扣率格式错误!");
|
this.$message.warning("折扣率格式错误!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -327,10 +344,10 @@
|
||||||
// 进行其他计算
|
// 进行其他计算
|
||||||
this.$set(this.selectedResultData, index, {
|
this.$set(this.selectedResultData, index, {
|
||||||
...row,
|
...row,
|
||||||
per: this.perc,
|
per: this.form.perc,
|
||||||
per2: this.perc2,
|
per2: this.form.perc2,
|
||||||
setPrice: toDecimal(row.price * (this.perc?this.perc:1) * (this.perc2?this.perc2:1)),
|
setPrice: toDecimal(row.price * (this.form.perc?this.form.perc:1) * (this.form.perc2?this.form.perc2:1)),
|
||||||
allPrice: toDecimal(row.count * row.price * (this.perc?this.perc:1) * (this.perc2?this.perc2:1)),
|
allPrice: toDecimal(row.count * row.price * (this.form.perc?this.form.perc:1) * (this.form.perc2?this.form.perc2:1)),
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -383,29 +400,35 @@
|
||||||
|
|
||||||
// 报价单保存修改
|
// 报价单保存修改
|
||||||
handleSaveClick() {
|
handleSaveClick() {
|
||||||
const allPrice = this.selectedResultData.reduce((sum, row) => sum + parseFloat(row.allPrice), 0);
|
let flag = this.checkSlZk();
|
||||||
this.form.totalPrice = toDecimal(allPrice);
|
if(flag){
|
||||||
this.form.selectedResultData = this.selectedResultData;
|
const allPrice = this.selectedResultData.reduce((sum, row) => sum + parseFloat(row.allPrice), 0);
|
||||||
saveQuot(this.form).then(response => {
|
this.form.totalPrice = toDecimal(allPrice);
|
||||||
this.$modal.msgSuccess("修改报价单成功");
|
this.form.selectedResultData = this.selectedResultData;
|
||||||
this.open = false;
|
saveQuot(this.form).then(response => {
|
||||||
this.getList();
|
this.$modal.msgSuccess("修改报价单成功");
|
||||||
})
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 报价单另存为
|
// 报价单另存为
|
||||||
handleSaveOtherClick() {
|
handleSaveOtherClick() {
|
||||||
this.$modal.confirm('是否确认生成新报价单?').then(function() {}).then(() => {
|
let flag = this.checkSlZk();
|
||||||
const allPrice = this.selectedResultData.reduce((sum, row) => sum + parseFloat(row.allPrice), 0);
|
if(flag){
|
||||||
this.form.totalPrice = toDecimal(allPrice);
|
this.$modal.confirm('是否确认生成新报价单?').then(function() {}).then(() => {
|
||||||
this.form.selectedResultData = this.selectedResultData;
|
const allPrice = this.selectedResultData.reduce((sum, row) => sum + parseFloat(row.allPrice), 0);
|
||||||
this.form.quot_id = "";
|
this.form.totalPrice = toDecimal(allPrice);
|
||||||
saveQuot(this.form).then(response => {
|
this.form.selectedResultData = this.selectedResultData;
|
||||||
this.$modal.msgSuccess("生成报价单成功,单号:"+response.data.quotCode);
|
this.form.quot_id = "";
|
||||||
this.open = false;
|
saveQuot(this.form).then(response => {
|
||||||
this.getList();
|
this.$modal.msgSuccess("生成报价单成功,单号:"+response.data.quotCode);
|
||||||
})
|
this.open = false;
|
||||||
}).catch(() => {});
|
this.getList();
|
||||||
|
})
|
||||||
|
}).catch(() => {});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 报价单提交报价组
|
// 报价单提交报价组
|
||||||
|
@ -426,44 +449,68 @@
|
||||||
|
|
||||||
// 报价单生成
|
// 报价单生成
|
||||||
handleMadeQuotClick() {
|
handleMadeQuotClick() {
|
||||||
this.form.selectedResultData = this.selectedResultData;
|
let flag = this.checkSlZk();
|
||||||
madeQuot(this.form).then(response => {
|
if(flag){
|
||||||
this.$modal.msgSuccess("生成报价单成功");
|
this.form.selectedResultData = this.selectedResultData;
|
||||||
// 处理返回的文件流
|
madeQuot(this.form).then(response => {
|
||||||
const content = response;
|
this.$modal.msgSuccess("生成报价单成功");
|
||||||
const blob = new Blob([content]);
|
// 处理返回的文件流
|
||||||
|
const content = response;
|
||||||
|
const blob = new Blob([content]);
|
||||||
|
|
||||||
let fileName = "RB_BJD_"+this.getTodayCourse()+".xls";
|
let fileName = "RB_BJD_"+this.getTodayCourse()+".xls";
|
||||||
if(this.form.quotCode){
|
if(this.form.quotCode){
|
||||||
fileName = this.form.quotCode+".xls";
|
fileName = this.form.quotCode+".xls";
|
||||||
}
|
}
|
||||||
if ("download" in document.createElement("a")) {
|
if ("download" in document.createElement("a")) {
|
||||||
// 非IE下载
|
// 非IE下载
|
||||||
const elink = document.createElement("a");
|
const elink = document.createElement("a");
|
||||||
elink.download = fileName;
|
elink.download = fileName;
|
||||||
elink.style.display = "none";
|
elink.style.display = "none";
|
||||||
elink.href = URL.createObjectURL(blob);
|
elink.href = URL.createObjectURL(blob);
|
||||||
document.body.appendChild(elink);
|
document.body.appendChild(elink);
|
||||||
elink.click();
|
elink.click();
|
||||||
URL.revokeObjectURL(elink.href); // 释放URL 对象
|
URL.revokeObjectURL(elink.href); // 释放URL 对象
|
||||||
document.body.removeChild(elink);
|
document.body.removeChild(elink);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// IE10+下载
|
// IE10+下载
|
||||||
navigator.msSaveBlob(blob, fileName);
|
navigator.msSaveBlob(blob, fileName);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 导出明细
|
// 导出明细
|
||||||
handleExport(){
|
handleExport(){
|
||||||
let fileName = "RB_BJD_"+this.getTodayCourse();
|
let flag = this.checkSlZk();
|
||||||
if(this.form.quotCode){
|
if(flag){
|
||||||
fileName = this.form.quotCode;
|
let fileName = "RB_BJD_"+this.getTodayCourse();
|
||||||
|
if(this.form.quotCode){
|
||||||
|
fileName = this.form.quotCode;
|
||||||
|
}
|
||||||
|
this.download('redBook/redBook/exportProduct', {
|
||||||
|
selectedResultData: JSON.stringify(this.selectedResultData)
|
||||||
|
}, fileName +".xlsx")
|
||||||
}
|
}
|
||||||
this.download('redBook/redBook/exportProduct', {
|
},
|
||||||
selectedResultData: JSON.stringify(this.selectedResultData)
|
|
||||||
}, fileName +".xlsx")
|
/** 报价单-产品删除按钮操作 */
|
||||||
|
handleDeleteQuotMaterial() {
|
||||||
|
if (this.checkedQuotMaterial.length == 0) {
|
||||||
|
this.$modal.msgError("请先选择要删除的报价单-产品数据");
|
||||||
|
} else {
|
||||||
|
const quotMaterialList = this.selectedResultData;
|
||||||
|
const checkedQuotMaterial = this.checkedQuotMaterial;
|
||||||
|
this.selectedResultData = quotMaterialList.filter(function(item) {
|
||||||
|
return checkedQuotMaterial.indexOf(item.index) == -1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 复选框选中数据 */
|
||||||
|
handleQuotMaterialSelectionChange(selection) {
|
||||||
|
this.checkedQuotMaterial = selection.map(item => item.index)
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取当前时间
|
// 获取当前时间
|
||||||
|
@ -482,6 +529,67 @@
|
||||||
},
|
},
|
||||||
p(s) {
|
p(s) {
|
||||||
return s < 10 ? '0' + s : s;
|
return s < 10 ? '0' + s : s;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// 校验明细行中-数量、一次折扣、二次折扣格式
|
||||||
|
checkSlZk(){
|
||||||
|
let flag = true;
|
||||||
|
this.errSlIndex = [];
|
||||||
|
this.errPercIndex = [];
|
||||||
|
this.errPerc2Index = [];
|
||||||
|
let errMsg = "";
|
||||||
|
|
||||||
|
const label = /^(\+)?\d+(\.\d+)?$/;
|
||||||
|
let reg = new RegExp(label);
|
||||||
|
this.selectedResultData.forEach((row, index) => {
|
||||||
|
//数量
|
||||||
|
let sl = row.count;
|
||||||
|
if(sl){
|
||||||
|
sl = String(sl).trim();
|
||||||
|
if (!reg.test(sl)) {
|
||||||
|
this.errSlIndex.push(index+1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//一次折扣
|
||||||
|
let perc = row.per;
|
||||||
|
if(perc){
|
||||||
|
perc = String(perc).trim();
|
||||||
|
if (!reg.test(perc)) {
|
||||||
|
this.errPercIndex.push(index+1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//二次折扣
|
||||||
|
let perc2 = row.per2;
|
||||||
|
if(perc2){
|
||||||
|
perc2 = String(perc2).trim();
|
||||||
|
if (!reg.test(perc2)) {
|
||||||
|
this.errPerc2Index.push(index+1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if(this.errPercIndex.length!=0){
|
||||||
|
flag = false;
|
||||||
|
errMsg = "第"+this.errPercIndex.join(",")+"行报价产品明细【一次折扣】格式错误";
|
||||||
|
this.$modal.msgError(errMsg);
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
if(this.errPerc2Index.length!=0){
|
||||||
|
flag = false;
|
||||||
|
errMsg = "第"+this.errPerc2Index.join(",")+"行报价产品明细【二次折扣】格式错误";
|
||||||
|
this.$modal.msgError(errMsg);
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
if(this.errSlIndex.length!=0){
|
||||||
|
flag = false;
|
||||||
|
errMsg = "第"+this.errSlIndex.join(",")+"行报价产品明细【数量调整】格式错误";
|
||||||
|
this.$modal.msgError(errMsg);
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
@ -802,7 +802,7 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import { getJsqr, doOperate, commitQuot } from "@/api/technicalConfirm/technicalConfirm";
|
import { getJsqr, doOperate, commitQuot, setRedisJsxz } from "@/api/technicalConfirm/technicalConfirm";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import { quotFileList,quotFileDelete } from "@/api/quot/quot";
|
import { quotFileList,quotFileDelete } from "@/api/quot/quot";
|
||||||
|
|
||||||
|
@ -1470,7 +1470,50 @@
|
||||||
//下载附件
|
//下载附件
|
||||||
downloadFile(fileUrl){
|
downloadFile(fileUrl){
|
||||||
window.open(fileUrl, "_blank");
|
window.open(fileUrl, "_blank");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
// 监听协助说明,有数据输入则加入redis
|
||||||
|
'form.quotJsqrTlRemark':function(newValue, oldValue) {
|
||||||
|
let param = {}
|
||||||
|
param.quotJsqrCode = this.form.quotJsqrCode;
|
||||||
|
param.type = "TL";// DY ZY TL QT
|
||||||
|
param.remark = this.form.quotJsqrTlRemark;
|
||||||
|
if(this.form.quotJsqrTlApprovalStatus=='1'&&this.form.quotJsqrTlOperateState==='0'){
|
||||||
|
setRedisJsxz(param).then(response => {
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
'form.quotJsqrDyRemark':function(newValue, oldValue) {
|
||||||
|
let param = {}
|
||||||
|
param.quotJsqrCode = this.form.quotJsqrCode;
|
||||||
|
param.type = "DY";// DY ZY TL QT
|
||||||
|
param.remark = this.form.quotJsqrDyRemark;
|
||||||
|
if(this.form.quotJsqrDyApprovalStatus=='1'&&this.form.quotJsqrDyOperateState==='0'){
|
||||||
|
setRedisJsxz(param).then(response => {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'form.quotJsqrZyRemark':function(newValue, oldValue) {
|
||||||
|
let param = {}
|
||||||
|
param.quotJsqrCode = this.form.quotJsqrCode;
|
||||||
|
param.type = "ZY";// DY ZY TL QT
|
||||||
|
param.remark = this.form.quotJsqrZyRemark;
|
||||||
|
if(this.form.quotJsqrZyApprovalStatus=='1'&&this.form.quotJsqrZyOperateState==='0'){
|
||||||
|
setRedisJsxz(param).then(response => {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'form.quotJsqrQtRemark':function(newValue, oldValue) {
|
||||||
|
let param = {}
|
||||||
|
param.quotJsqrCode = this.form.quotJsqrCode;
|
||||||
|
param.type = "QT";// DY ZY TL QT
|
||||||
|
param.remark = this.form.quotJsqrQtRemark;
|
||||||
|
if(this.form.quotJsqrQtApprovalStatus=='1'&&this.form.quotJsqrQtOperateState==='0'){
|
||||||
|
setRedisJsxz(param).then(response => {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue