'123'
This commit is contained in:
parent
b1beb49d54
commit
9948083d9b
|
@ -3,7 +3,6 @@ package com.ruoyi.web.controller.quot;
|
|||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
|
@ -98,6 +97,7 @@ public class QuotController extends BaseController
|
|||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Quot quot)
|
||||
{
|
||||
quot.setUpdateBy(getUsername());
|
||||
return toAjax(quotService.updateQuot(quot));
|
||||
}
|
||||
|
||||
|
@ -117,22 +117,28 @@ public class QuotController extends BaseController
|
|||
*/
|
||||
@Log(title = "上传报价附件", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/quotFile")
|
||||
public AjaxResult quotFile(@RequestParam("quotFile") MultipartFile file,@RequestParam("quotId") String quotId) throws Exception
|
||||
public AjaxResult quotFile(@RequestParam("quotFile") MultipartFile file,@RequestParam("relation_id") String relation_id,@RequestParam("file_type") String file_type) throws Exception
|
||||
{
|
||||
if(!StringUtils.isEmpty(quotId)){
|
||||
if(!StringUtils.isEmpty(relation_id)){
|
||||
if (!file.isEmpty())
|
||||
{
|
||||
QuotFile quotFile= new QuotFile();
|
||||
quotFile.setFileId(UUID.fastUUID().toString());
|
||||
|
||||
String url = FileUploadUtils.uploadMinio(file,"quot-manage", "quot/"+quotId);
|
||||
String url = FileUploadUtils.uploadMinio(file,"quot-manage", "quot/"+relation_id);
|
||||
int index = url.lastIndexOf("/")+1;
|
||||
String fileName = url.substring(index);
|
||||
|
||||
int index2 = url.indexOf("/quot/");
|
||||
String fileBucketName = url.substring(index2);
|
||||
|
||||
quotFile.setFileName(fileName);
|
||||
quotFile.setFileBucketName(fileBucketName);
|
||||
quotFile.setFileUrl(url);
|
||||
quotFile.setFileSize(file.getSize());
|
||||
quotFile.setFileTime(DateUtils.getTime());
|
||||
quotFile.setQuotId(quotId);
|
||||
quotFile.setFileType(file_type);
|
||||
quotFile.setRelationId(relation_id);
|
||||
quotFileService.insertQuotFile(quotFile);
|
||||
}
|
||||
}else{
|
||||
|
@ -163,7 +169,7 @@ public class QuotController extends BaseController
|
|||
try {
|
||||
QuotFile quotfile = quotFileService.selectQuotFileByFileId(fileId);
|
||||
quotFileService.deleteQuotFileByFileId(fileId);
|
||||
MinioUtil.removeObject("quot-manage", quotfile.getFileName());
|
||||
MinioUtil.removeObject("quot-manage", quotfile.getFileBucketName());
|
||||
}catch(Exception e){
|
||||
return error("系统异常!");
|
||||
}
|
||||
|
|
|
@ -0,0 +1,107 @@
|
|||
package com.ruoyi.web.controller.sysSapUser;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.utils.uuid.UUID;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.sysSapUser.domain.SysSapUser;
|
||||
import com.ruoyi.sysSapUser.service.ISysSapUserService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* SAP账户Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-02
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sysSapUser/sysSapUser")
|
||||
public class SysSapUserController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISysSapUserService sysSapUserService;
|
||||
|
||||
/**
|
||||
* 查询SAP账户列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sysSapUser:sysSapUser:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysSapUser sysSapUser)
|
||||
{
|
||||
startPage();
|
||||
List<SysSapUser> list = sysSapUserService.selectSysSapUserList(sysSapUser);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出SAP账户列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sysSapUser:sysSapUser:export')")
|
||||
@Log(title = "SAP账户", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysSapUser sysSapUser)
|
||||
{
|
||||
List<SysSapUser> list = sysSapUserService.selectSysSapUserList(sysSapUser);
|
||||
ExcelUtil<SysSapUser> util = new ExcelUtil<SysSapUser>(SysSapUser.class);
|
||||
util.exportExcel(response, list, "SAP账户数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取SAP账户详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sysSapUser:sysSapUser:query')")
|
||||
@GetMapping(value = "/{sapUserId}")
|
||||
public AjaxResult getInfo(@PathVariable("sapUserId") String sapUserId)
|
||||
{
|
||||
return success(sysSapUserService.selectSysSapUserBySapUserId(sapUserId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增SAP账户
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sysSapUser:sysSapUser:add')")
|
||||
@Log(title = "SAP账户", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SysSapUser sysSapUser)
|
||||
{
|
||||
sysSapUser.setSapUserId(UUID.fastUUID().toString());
|
||||
return toAjax(sysSapUserService.insertSysSapUser(sysSapUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改SAP账户
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sysSapUser:sysSapUser:edit')")
|
||||
@Log(title = "SAP账户", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SysSapUser sysSapUser)
|
||||
{
|
||||
return toAjax(sysSapUserService.updateSysSapUser(sysSapUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除SAP账户
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sysSapUser:sysSapUser:remove')")
|
||||
@Log(title = "SAP账户", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{sapUserIds}")
|
||||
public AjaxResult remove(@PathVariable String[] sapUserIds)
|
||||
{
|
||||
return toAjax(sysSapUserService.deleteSysSapUserBySapUserIds(sapUserIds));
|
||||
}
|
||||
}
|
|
@ -2,6 +2,9 @@ package com.ruoyi.web.controller.system;
|
|||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.ruoyi.sysSapUser.domain.SysSapUser;
|
||||
import com.ruoyi.sysSapUser.service.ISysSapUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
@ -34,6 +37,9 @@ public class SysLoginController
|
|||
@Autowired
|
||||
private SysPermissionService permissionService;
|
||||
|
||||
@Autowired
|
||||
private ISysSapUserService sysSapUserService;
|
||||
|
||||
/**
|
||||
* 登录方法
|
||||
*
|
||||
|
@ -69,7 +75,14 @@ public class SysLoginController
|
|||
ajax.put("roles", roles);
|
||||
ajax.put("permissions", permissions);
|
||||
|
||||
//获取SAP编码 和 名称 TODO
|
||||
//获取SAP编码 和 名称
|
||||
SysSapUser su = new SysSapUser();
|
||||
su.setSysUserName(user.getUserName());
|
||||
List<SysSapUser> list = sysSapUserService.selectSysSapUserList(su);
|
||||
if(list!=null && list.size()>0){
|
||||
su = list.get(0);
|
||||
}
|
||||
ajax.put("sapUser", su);
|
||||
return ajax;
|
||||
}
|
||||
|
||||
|
|
|
@ -90,6 +90,10 @@ public class Quot extends BaseEntity
|
|||
@Excel(name = "提交状态")
|
||||
private String quotApprovalStatus;
|
||||
|
||||
/** 创建人 */
|
||||
@Excel(name = "创建人")
|
||||
private String createName;
|
||||
|
||||
/** 报价单-产品信息 */
|
||||
private List<QuotMaterial> quotMaterialList;
|
||||
|
||||
|
@ -276,7 +280,9 @@ public class Quot extends BaseEntity
|
|||
{
|
||||
return quotApprovalStatus;
|
||||
}
|
||||
public String getCreateName() {return createName;}
|
||||
|
||||
public void setCreateName(String createName) {this.createName = createName;}
|
||||
public List<QuotMaterial> getQuotMaterialList()
|
||||
{
|
||||
return quotMaterialList;
|
||||
|
|
|
@ -21,6 +21,9 @@ public class QuotFile extends BaseEntity
|
|||
/** 文件名称 */
|
||||
private String fileName;
|
||||
|
||||
/** MINIO文件名称 */
|
||||
private String fileBucketName;
|
||||
|
||||
/** 文件地址 */
|
||||
private String fileUrl;
|
||||
|
||||
|
@ -30,8 +33,11 @@ public class QuotFile extends BaseEntity
|
|||
/** 上传时间 */
|
||||
private String fileTime;
|
||||
|
||||
/** 类别 */
|
||||
private String fileType;
|
||||
|
||||
/** */
|
||||
private String quotId;
|
||||
private String relationId;
|
||||
|
||||
public void setFileId(String fileId)
|
||||
{
|
||||
|
@ -51,6 +57,9 @@ public class QuotFile extends BaseEntity
|
|||
{
|
||||
return fileName;
|
||||
}
|
||||
public String getFileBucketName() {return fileBucketName;}
|
||||
|
||||
public void setFileBucketName(String fileBucketName) {this.fileBucketName = fileBucketName;}
|
||||
public void setFileUrl(String fileUrl)
|
||||
{
|
||||
this.fileUrl = fileUrl;
|
||||
|
@ -78,14 +87,17 @@ public class QuotFile extends BaseEntity
|
|||
{
|
||||
return fileTime;
|
||||
}
|
||||
public void setQuotId(String quotId)
|
||||
public String getFileType() {return fileType;}
|
||||
|
||||
public void setFileType(String fileType) {this.fileType = fileType;}
|
||||
public void setRelationId(String relationId)
|
||||
{
|
||||
this.quotId = quotId;
|
||||
this.relationId = relationId;
|
||||
}
|
||||
|
||||
public String getQuotId()
|
||||
public String getRelationId()
|
||||
{
|
||||
return quotId;
|
||||
return relationId;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -96,7 +108,7 @@ public class QuotFile extends BaseEntity
|
|||
.append("fileUrl", getFileUrl())
|
||||
.append("fileSize", getFileSize())
|
||||
.append("fileTime", getFileTime())
|
||||
.append("quotId", getQuotId())
|
||||
.append("relationId", getRelationId())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package com.ruoyi.quot.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.uuid.UUID;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.ArrayList;
|
||||
|
@ -43,6 +46,7 @@ public class QuotServiceImpl implements IQuotService
|
|||
* @return 报价
|
||||
*/
|
||||
@Override
|
||||
@DataScope(deptAlias = "d", userAlias = "u")
|
||||
public List<Quot> selectQuotList(Quot quot)
|
||||
{
|
||||
return quotMapper.selectQuotList(quot);
|
||||
|
@ -122,6 +126,7 @@ public class QuotServiceImpl implements IQuotService
|
|||
List<QuotMaterial> list = new ArrayList<QuotMaterial>();
|
||||
for (QuotMaterial quotMaterial : quotMaterialList)
|
||||
{
|
||||
quotMaterial.setMatId(UUID.fastUUID().toString());
|
||||
quotMaterial.setQuotId(quotId);
|
||||
list.add(quotMaterial);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,93 @@
|
|||
package com.ruoyi.sysSapUser.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* SAP账户对象 sys_sap_user
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-02
|
||||
*/
|
||||
public class SysSapUser extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID */
|
||||
private String sapUserId;
|
||||
|
||||
/** SAP账户 */
|
||||
@Excel(name = "SAP账户")
|
||||
private String sapUserBm;
|
||||
|
||||
/** SAP账户名称 */
|
||||
@Excel(name = "SAP账户名称")
|
||||
private String sapUserName;
|
||||
|
||||
/** 系统账户 */
|
||||
@Excel(name = "系统账户")
|
||||
private String sysUserName;
|
||||
|
||||
/** 系统账户名称 */
|
||||
@Excel(name = "系统账户名称")
|
||||
private String sysUserNickName;
|
||||
|
||||
public void setSapUserId(String sapUserId)
|
||||
{
|
||||
this.sapUserId = sapUserId;
|
||||
}
|
||||
|
||||
public String getSapUserId()
|
||||
{
|
||||
return sapUserId;
|
||||
}
|
||||
public void setSapUserBm(String sapUserBm)
|
||||
{
|
||||
this.sapUserBm = sapUserBm;
|
||||
}
|
||||
|
||||
public String getSapUserBm()
|
||||
{
|
||||
return sapUserBm;
|
||||
}
|
||||
public void setSapUserName(String sapUserName)
|
||||
{
|
||||
this.sapUserName = sapUserName;
|
||||
}
|
||||
|
||||
public String getSapUserName()
|
||||
{
|
||||
return sapUserName;
|
||||
}
|
||||
public void setSysUserName(String sysUserName)
|
||||
{
|
||||
this.sysUserName = sysUserName;
|
||||
}
|
||||
|
||||
public String getSysUserName()
|
||||
{
|
||||
return sysUserName;
|
||||
}
|
||||
public void setSysUserNickName(String sysUserNickName)
|
||||
{
|
||||
this.sysUserNickName = sysUserNickName;
|
||||
}
|
||||
|
||||
public String getSysUserNickName()
|
||||
{
|
||||
return sysUserNickName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("sapUserId", getSapUserId())
|
||||
.append("sapUserBm", getSapUserBm())
|
||||
.append("sapUserName", getSapUserName())
|
||||
.append("sysUserName", getSysUserName())
|
||||
.append("sysUserNickName", getSysUserNickName())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.sysSapUser.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.sysSapUser.domain.SysSapUser;
|
||||
|
||||
/**
|
||||
* SAP账户Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-02
|
||||
*/
|
||||
public interface SysSapUserMapper
|
||||
{
|
||||
/**
|
||||
* 查询SAP账户
|
||||
*
|
||||
* @param sapUserId SAP账户主键
|
||||
* @return SAP账户
|
||||
*/
|
||||
public SysSapUser selectSysSapUserBySapUserId(String sapUserId);
|
||||
|
||||
/**
|
||||
* 查询SAP账户列表
|
||||
*
|
||||
* @param sysSapUser SAP账户
|
||||
* @return SAP账户集合
|
||||
*/
|
||||
public List<SysSapUser> selectSysSapUserList(SysSapUser sysSapUser);
|
||||
|
||||
/**
|
||||
* 新增SAP账户
|
||||
*
|
||||
* @param sysSapUser SAP账户
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysSapUser(SysSapUser sysSapUser);
|
||||
|
||||
/**
|
||||
* 修改SAP账户
|
||||
*
|
||||
* @param sysSapUser SAP账户
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysSapUser(SysSapUser sysSapUser);
|
||||
|
||||
/**
|
||||
* 删除SAP账户
|
||||
*
|
||||
* @param sapUserId SAP账户主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysSapUserBySapUserId(String sapUserId);
|
||||
|
||||
/**
|
||||
* 批量删除SAP账户
|
||||
*
|
||||
* @param sapUserIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysSapUserBySapUserIds(String[] sapUserIds);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.sysSapUser.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.sysSapUser.domain.SysSapUser;
|
||||
|
||||
/**
|
||||
* SAP账户Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-02
|
||||
*/
|
||||
public interface ISysSapUserService
|
||||
{
|
||||
/**
|
||||
* 查询SAP账户
|
||||
*
|
||||
* @param sapUserId SAP账户主键
|
||||
* @return SAP账户
|
||||
*/
|
||||
public SysSapUser selectSysSapUserBySapUserId(String sapUserId);
|
||||
|
||||
/**
|
||||
* 查询SAP账户列表
|
||||
*
|
||||
* @param sysSapUser SAP账户
|
||||
* @return SAP账户集合
|
||||
*/
|
||||
public List<SysSapUser> selectSysSapUserList(SysSapUser sysSapUser);
|
||||
|
||||
/**
|
||||
* 新增SAP账户
|
||||
*
|
||||
* @param sysSapUser SAP账户
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysSapUser(SysSapUser sysSapUser);
|
||||
|
||||
/**
|
||||
* 修改SAP账户
|
||||
*
|
||||
* @param sysSapUser SAP账户
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysSapUser(SysSapUser sysSapUser);
|
||||
|
||||
/**
|
||||
* 批量删除SAP账户
|
||||
*
|
||||
* @param sapUserIds 需要删除的SAP账户主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysSapUserBySapUserIds(String[] sapUserIds);
|
||||
|
||||
/**
|
||||
* 删除SAP账户信息
|
||||
*
|
||||
* @param sapUserId SAP账户主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysSapUserBySapUserId(String sapUserId);
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
package com.ruoyi.sysSapUser.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.sysSapUser.mapper.SysSapUserMapper;
|
||||
import com.ruoyi.sysSapUser.domain.SysSapUser;
|
||||
import com.ruoyi.sysSapUser.service.ISysSapUserService;
|
||||
|
||||
/**
|
||||
* SAP账户Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-02
|
||||
*/
|
||||
@Service
|
||||
public class SysSapUserServiceImpl implements ISysSapUserService
|
||||
{
|
||||
@Autowired
|
||||
private SysSapUserMapper sysSapUserMapper;
|
||||
|
||||
/**
|
||||
* 查询SAP账户
|
||||
*
|
||||
* @param sapUserId SAP账户主键
|
||||
* @return SAP账户
|
||||
*/
|
||||
@Override
|
||||
public SysSapUser selectSysSapUserBySapUserId(String sapUserId)
|
||||
{
|
||||
return sysSapUserMapper.selectSysSapUserBySapUserId(sapUserId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询SAP账户列表
|
||||
*
|
||||
* @param sysSapUser SAP账户
|
||||
* @return SAP账户
|
||||
*/
|
||||
@Override
|
||||
public List<SysSapUser> selectSysSapUserList(SysSapUser sysSapUser)
|
||||
{
|
||||
return sysSapUserMapper.selectSysSapUserList(sysSapUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增SAP账户
|
||||
*
|
||||
* @param sysSapUser SAP账户
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSysSapUser(SysSapUser sysSapUser)
|
||||
{
|
||||
return sysSapUserMapper.insertSysSapUser(sysSapUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改SAP账户
|
||||
*
|
||||
* @param sysSapUser SAP账户
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSysSapUser(SysSapUser sysSapUser)
|
||||
{
|
||||
return sysSapUserMapper.updateSysSapUser(sysSapUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除SAP账户
|
||||
*
|
||||
* @param sapUserIds 需要删除的SAP账户主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysSapUserBySapUserIds(String[] sapUserIds)
|
||||
{
|
||||
return sysSapUserMapper.deleteSysSapUserBySapUserIds(sapUserIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除SAP账户信息
|
||||
*
|
||||
* @param sapUserId SAP账户主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysSapUserBySapUserId(String sapUserId)
|
||||
{
|
||||
return sysSapUserMapper.deleteSysSapUserBySapUserId(sapUserId);
|
||||
}
|
||||
}
|
|
@ -67,7 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="cusApprovalStatus != null and cusApprovalStatus != ''"> and cus_approval_status = #{cusApprovalStatus}</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</where>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCustomerByCusId" parameterType="java.lang.String" resultMap="CustomerBankResult">
|
||||
|
|
|
@ -7,21 +7,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<resultMap type="QuotFile" id="QuotFileResult">
|
||||
<result property="fileId" column="file_id" />
|
||||
<result property="fileName" column="file_name" />
|
||||
<result property="fileBucketName" column="file_bucket_name" />
|
||||
<result property="fileUrl" column="file_url" />
|
||||
<result property="fileSize" column="file_size" />
|
||||
<result property="fileTime" column="file_time" />
|
||||
<result property="quotId" column="quot_id" />
|
||||
<result property="fileType" column="file_type" />
|
||||
<result property="relationId" column="relation_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectQuotFileVo">
|
||||
select file_id, file_name, file_url, file_size, file_time, quot_id from quot_file
|
||||
select file_id, file_name, file_bucket_name, file_url, file_size, file_time, file_type, relation_id from quot_file
|
||||
</sql>
|
||||
|
||||
<select id="selectQuotFileList" parameterType="QuotFile" resultMap="QuotFileResult">
|
||||
<include refid="selectQuotFileVo"/>
|
||||
<where>
|
||||
<if test="quotId != null and quotId != ''"> and quot_id = #{quotId}</if>
|
||||
<if test="relationId != null and relationId != ''"> and relation_id = #{relationId}</if>
|
||||
<if test="fileType != null and fileType != ''"> and file_type = #{fileType}</if>
|
||||
</where>
|
||||
order by file_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectQuotFileByFileId" parameterType="String" resultMap="QuotFileResult">
|
||||
|
@ -34,18 +38,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="fileId != null">file_id,</if>
|
||||
<if test="fileName != null">file_name,</if>
|
||||
<if test="fileBucketName != null">file_bucket_name,</if>
|
||||
<if test="fileUrl != null">file_url,</if>
|
||||
<if test="fileSize != null">file_size,</if>
|
||||
<if test="fileTime != null">file_time,</if>
|
||||
<if test="quotId != null">quot_id,</if>
|
||||
<if test="fileType != null">file_type,</if>
|
||||
<if test="relationId != null">relation_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="fileId != null">#{fileId},</if>
|
||||
<if test="fileName != null">#{fileName},</if>
|
||||
<if test="fileBucketName != null">#{fileBucketName},</if>
|
||||
<if test="fileUrl != null">#{fileUrl},</if>
|
||||
<if test="fileSize != null">#{fileSize},</if>
|
||||
<if test="fileTime != null">#{fileTime},</if>
|
||||
<if test="quotId != null">#{quotId},</if>
|
||||
<if test="fileType != null">#{fileType},</if>
|
||||
<if test="relationId != null">#{relationId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="quotCheckUserNickname" column="quot_check_user_nickname" />
|
||||
<result property="quotApprovalStatus" column="quot_approval_status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createName" column="create_name" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
|
@ -46,13 +47,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="quotId" column="sub_quot_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="quotJoins">
|
||||
LEFT JOIN sys_user u on u.user_name=a.create_by
|
||||
</sql>
|
||||
|
||||
<sql id="selectQuotVo">
|
||||
select quot_id, quot_code, quot_salesman_bm, quot_salesman_name, quot_customer_bm,
|
||||
quot_customer_name,quot_salesman_dept_id, quot_salesman_dept_name, quot_address,
|
||||
quot_phone, quot_inquiry_date, quot_project, quot_quotation_date, quot_quotation_from,
|
||||
quot_quotation_require, quot_feedback_explanation, quot_quantity, quot_total_price,
|
||||
quot_check_user_name, quot_check_user_nickname, quot_approval_status,
|
||||
create_by, create_time, update_by, update_time from quot
|
||||
select a.quot_id, a.quot_code, a.quot_salesman_bm, a.quot_salesman_name, a.quot_customer_bm,
|
||||
a.quot_customer_name,a.quot_salesman_dept_id, a.quot_salesman_dept_name, a.quot_address,
|
||||
a.quot_phone, a.quot_inquiry_date, a.quot_project, a.quot_quotation_date, a.quot_quotation_from,
|
||||
a.quot_quotation_require, a.quot_feedback_explanation, a.quot_quantity, a.quot_total_price,
|
||||
a.quot_check_user_name, a.quot_check_user_nickname, a.quot_approval_status,
|
||||
a.create_by, a.create_time, a.update_by, a.update_time, u.nick_name create_name
|
||||
from quot a
|
||||
<include refid="quotJoins"/>
|
||||
</sql>
|
||||
|
||||
<select id="selectQuotList" parameterType="Quot" resultMap="QuotResult">
|
||||
|
@ -62,6 +69,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<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="quotApprovalStatus != null and quotApprovalStatus != ''"> and quot_approval_status = #{quotApprovalStatus}</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
<?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.sysSapUser.mapper.SysSapUserMapper">
|
||||
|
||||
<resultMap type="SysSapUser" id="SysSapUserResult">
|
||||
<result property="sapUserId" column="sap_user_id" />
|
||||
<result property="sapUserBm" column="sap_user_bm" />
|
||||
<result property="sapUserName" column="sap_user_name" />
|
||||
<result property="sysUserName" column="sys_user_name" />
|
||||
<result property="sysUserNickName" column="sys_user_nick_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysSapUserVo">
|
||||
select sap_user_id, sap_user_bm, sap_user_name, sys_user_name, sys_user_nick_name from sys_sap_user
|
||||
</sql>
|
||||
|
||||
<select id="selectSysSapUserList" parameterType="SysSapUser" resultMap="SysSapUserResult">
|
||||
<include refid="selectSysSapUserVo"/>
|
||||
<where>
|
||||
<if test="sapUserBm != null and sapUserBm != ''"> and sap_user_bm like concat('%', #{sapUserBm}, '%')</if>
|
||||
<if test="sapUserName != null and sapUserName != ''"> and sap_user_name like concat('%', #{sapUserName}, '%')</if>
|
||||
<if test="sysUserName != null and sysUserName != ''"> and sys_user_name like concat('%', #{sysUserName}, '%')</if>
|
||||
<if test="sysUserNickName != null and sysUserNickName != ''"> and sys_user_nick_name like concat('%', #{sysUserNickName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysSapUserBySapUserId" parameterType="String" resultMap="SysSapUserResult">
|
||||
<include refid="selectSysSapUserVo"/>
|
||||
where sap_user_id = #{sapUserId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysSapUser" parameterType="SysSapUser">
|
||||
insert into sys_sap_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="sapUserId != null">sap_user_id,</if>
|
||||
<if test="sapUserBm != null and sapUserBm != ''">sap_user_bm,</if>
|
||||
<if test="sapUserName != null and sapUserName != ''">sap_user_name,</if>
|
||||
<if test="sysUserName != null and sysUserName != ''">sys_user_name,</if>
|
||||
<if test="sysUserNickName != null and sysUserNickName != ''">sys_user_nick_name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sapUserId != null">#{sapUserId},</if>
|
||||
<if test="sapUserBm != null and sapUserBm != ''">#{sapUserBm},</if>
|
||||
<if test="sapUserName != null and sapUserName != ''">#{sapUserName},</if>
|
||||
<if test="sysUserName != null and sysUserName != ''">#{sysUserName},</if>
|
||||
<if test="sysUserNickName != null and sysUserNickName != ''">#{sysUserNickName},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysSapUser" parameterType="SysSapUser">
|
||||
update sys_sap_user
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="sapUserBm != null and sapUserBm != ''">sap_user_bm = #{sapUserBm},</if>
|
||||
<if test="sapUserName != null and sapUserName != ''">sap_user_name = #{sapUserName},</if>
|
||||
<if test="sysUserName != null and sysUserName != ''">sys_user_name = #{sysUserName},</if>
|
||||
<if test="sysUserNickName != null and sysUserNickName != ''">sys_user_nick_name = #{sysUserNickName},</if>
|
||||
</trim>
|
||||
where sap_user_id = #{sapUserId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysSapUserBySapUserId" parameterType="String">
|
||||
delete from sys_sap_user where sap_user_id = #{sapUserId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysSapUserBySapUserIds" parameterType="String">
|
||||
delete from sys_sap_user where sap_user_id in
|
||||
<foreach item="sapUserId" collection="array" open="(" separator="," close=")">
|
||||
#{sapUserId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
|
@ -44,11 +44,11 @@ export function delQuot(quotId) {
|
|||
}
|
||||
|
||||
// 查询附件列表
|
||||
export function quotFileList(query) {
|
||||
export function quotFileList(data) {
|
||||
return request({
|
||||
url: '/quot/quot/quotFileList',
|
||||
method: 'get',
|
||||
params: query
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询SAP账户列表
|
||||
export function listSysSapUser(query) {
|
||||
return request({
|
||||
url: '/sysSapUser/sysSapUser/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询SAP账户详细
|
||||
export function getSysSapUser(sapUserId) {
|
||||
return request({
|
||||
url: '/sysSapUser/sysSapUser/' + sapUserId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增SAP账户
|
||||
export function addSysSapUser(data) {
|
||||
return request({
|
||||
url: '/sysSapUser/sysSapUser',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改SAP账户
|
||||
export function updateSysSapUser(data) {
|
||||
return request({
|
||||
url: '/sysSapUser/sysSapUser',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除SAP账户
|
||||
export function delSysSapUser(sapUserId) {
|
||||
return request({
|
||||
url: '/sysSapUser/sysSapUser/' + sapUserId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -87,6 +87,7 @@ const user = {
|
|||
return new Promise((resolve, reject) => {
|
||||
getInfo().then(res => {
|
||||
const user = res.user
|
||||
const sapUser = res.sapUser
|
||||
//const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar;
|
||||
const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : user.avatar;
|
||||
if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
|
||||
|
@ -99,8 +100,8 @@ const user = {
|
|||
commit('SET_NAME', user.userName)
|
||||
commit('SET_AVATAR', avatar)
|
||||
|
||||
commit('SET_SAPBM', '4100000058')
|
||||
commit('SET_SAPUSERNAME', '薛建梅')
|
||||
commit('SET_SAPBM', sapUser.sapUserBm)
|
||||
commit('SET_SAPUSERNAME', sapUser.sapUserName)
|
||||
commit('SET_DEPTID', user.dept.deptId)
|
||||
commit('SET_DEPTNAME', user.dept.deptName)
|
||||
resolve(res)
|
||||
|
|
|
@ -90,20 +90,21 @@
|
|||
<el-table v-loading="loading" :data="quotList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="报价单ID" align="center" prop="quotId" v-if="false"/>
|
||||
<el-table-column label="报价单号" align="center" prop="quotCode">
|
||||
<el-table-column fixed label="报价单号" align="center" prop="quotCode" width="250px">
|
||||
<template slot-scope="scope">
|
||||
<el-link v-hasPermi="['quot:quot:edit']" :underline="false" type="primary" @click="handleUpdate(scope.row)">{{scope.row.quotCode}}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="业务员" align="center" prop="quotSalesmanName" />
|
||||
<el-table-column label="客户名称" align="center" prop="quotCustomerName" />
|
||||
<el-table-column label="询价日期" align="center" prop="quotInquiryDate" />
|
||||
<el-table-column label="项目名称" align="center" prop="quotProject" />
|
||||
<el-table-column label="报价日期" align="center" prop="quotQuotationDate" />
|
||||
<el-table-column label="报价要求" align="center" prop="quotQuotationRequire" />
|
||||
<el-table-column label="反馈说明" align="center" prop="quotFeedbackExplanation" />
|
||||
<el-table-column label="数量" align="center" prop="quotQuantity" />
|
||||
<el-table-column label="总价" align="center" prop="quotTotalPrice" />
|
||||
<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="quotInquiryDate" width="150px"/>
|
||||
<el-table-column label="项目名称" align="center" prop="quotProject" width="250px"/>
|
||||
<el-table-column label="创建人" align="center" prop="createName" width="150px"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核人" align="center" prop="quotCheckUserNickname" />
|
||||
<el-table-column label="提交状态" align="center" prop="quotApprovalStatus">
|
||||
<template slot-scope="scope">
|
||||
|
@ -149,7 +150,7 @@
|
|||
<el-form-item label="客户" prop="quotCustomerName">
|
||||
<el-input v-model="form.quotCustomerBm" v-if="false"/>
|
||||
<el-input v-model="form.quotCustomerName" placeholder="请输入客户" :disabled="true">
|
||||
<el-button slot="append" icon="el-icon-search"></el-button>
|
||||
<el-button slot="append" icon="el-icon-search" v-if="this.form.quot_approval_status == '0' || this.form.quot_approval_status == null"></el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -160,47 +161,40 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="8">
|
||||
<el-col :span="24">
|
||||
<el-col :span="16">
|
||||
<el-form-item label="地址" prop="quotAddress">
|
||||
<el-input v-model="form.quotAddress" placeholder="请输入地址" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目名称" prop="quotProject">
|
||||
<el-input v-model="form.quotProject" placeholder="请输入项目名称" />
|
||||
<el-col :span="8">
|
||||
<el-form-item label="询价日期" prop="quotInquiryDate">
|
||||
<el-input v-model="form.quotInquiryDate" placeholder="系统自动生成" :disabled="true"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报价来源" prop="quotQuotationFrom">
|
||||
<el-input v-model="form.quotQuotationFrom" placeholder="请输入报价来源" />
|
||||
</el-row>
|
||||
<el-row :gutter="8">
|
||||
<el-col :span="16">
|
||||
<el-form-item label="项目名称" prop="quotProject">
|
||||
<el-input type="textarea" autosize v-model="form.quotProject" placeholder="请输入项目名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="报价日期" prop="quotQuotationDate">
|
||||
<el-input v-model="form.quotQuotationDate" placeholder="报价组填写" :disabled="true"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="8">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="报价要求" prop="quotQuotationRequire">
|
||||
<el-input v-model="form.quotQuotationRequire" placeholder="请输入报价要求" />
|
||||
<el-input type="textarea" autosize v-model="form.quotQuotationRequire" placeholder="请输入报价要求" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="8">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="反馈说明" prop="quotFeedbackExplanation">
|
||||
<el-input v-model="form.quotFeedbackExplanation" placeholder="请输入反馈说明" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="8">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="数量" prop="quotQuantity">
|
||||
<el-input v-model="form.quotQuantity" placeholder="请输入数量" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="总价" prop="quotTotalPrice">
|
||||
<el-input v-model="form.quotTotalPrice" placeholder="请输入总价" />
|
||||
<el-input type="textarea" autosize v-model="form.quotFeedbackExplanation" placeholder="报价组填写" :disabled="true"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -208,13 +202,13 @@
|
|||
<el-tab-pane label="产品" name="matInfo">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddQuotMaterial">添加</el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddQuotMaterial" v-if="this.form.quot_approval_status == '0' || this.form.quot_approval_status == null">添加</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteQuotMaterial">删除</el-button>
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteQuotMaterial" v-if="this.form.quot_approval_status == '0' || this.form.quot_approval_status == null">删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table :data="quotMaterialList" :row-class-name="rowQuotMaterialIndex" @selection-change="handleQuotMaterialSelectionChange" ref="quotMaterial">
|
||||
<el-table :data="quotMaterialList" :row-class-name="rowQuotMaterialIndex" @selection-change="handleQuotMaterialSelectionChange" ref="quotMaterial" height="300px">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="序号" align="center" prop="index" width="50"/>
|
||||
<el-table-column label="型号" prop="matXingh">
|
||||
|
@ -244,19 +238,40 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="附件" name="fileInfo">
|
||||
<el-tab-pane label="询价附件" name="quotXjFile">
|
||||
<el-upload class="upload-demo"
|
||||
ref="upload"
|
||||
name="quotFile"
|
||||
:action="uploadUrl"
|
||||
:headers="headers"
|
||||
:data="{ quotId: this.form.quotId }"
|
||||
:data="{ relation_id: this.form.quotId,file_type: 'quotXjFile' }"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:show-file-list="false"
|
||||
:limit="1">
|
||||
:limit="1"
|
||||
v-if="this.form.quot_approval_status == '0'">
|
||||
<el-button slot="trigger" size="small" type="primary">上传文件</el-button>
|
||||
</el-upload>
|
||||
<el-table class="down" :data="dataList" border stripe style="width: 100%;margin-top: 20px;" height="300px">
|
||||
<el-table class="down" :data="quotXjFileList" border stripe style="width: 100%;margin-top: 20px;" height="300px">
|
||||
<el-table-column prop="fileName" label="文件名称" width="500px"></el-table-column>
|
||||
<el-table-column prop="fileSize" label="文件大小" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.fileSize / 1024 / 1024 < 1">{{(scope.row.fileSize / 1024).toFixed(2) + 'KB'}}</span>
|
||||
<span v-else>{{(scope.row.fileSize / 1024 / 1024).toFixed(2) + 'MB'}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="fileTime" label="上传时间"></el-table-column>
|
||||
<el-table-column width="150px" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="small" type="text">
|
||||
<a @click="downloadFile(scope.row.fileUrl)">下载</a>
|
||||
</el-button>
|
||||
<el-button size="small" type="text" @click="deleteFile(scope.row.fileId)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="反馈附件" name="quotFkFile">
|
||||
<el-table class="down" :data="quotFkFileList" border stripe style="width: 100%;margin-top: 20px;" height="300px">
|
||||
<el-table-column prop="fileName" label="文件名称" width="500px"></el-table-column>
|
||||
<el-table-column prop="fileSize" label="文件大小" width="150px">
|
||||
<template slot-scope="scope">
|
||||
|
@ -277,7 +292,7 @@
|
|||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<div slot="footer" class="dialog-footer" v-if="this.form.quot_approval_status == '0' || this.form.quot_approval_status == null">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
|
@ -285,14 +300,24 @@
|
|||
</div>
|
||||
</template>
|
||||
<style>
|
||||
/*弹窗设置*/
|
||||
.el-dialog__body {
|
||||
padding: 10px 10px;
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
word-break: break-all;
|
||||
overflow-y: auto; /* 自动显示垂直滚动条 */
|
||||
max-height: 560px; /* 设置最大高度,根据需要调整 */
|
||||
max-height: 580px; /* 设置最大高度,根据需要调整 */
|
||||
}
|
||||
|
||||
/*el-textarea设置*/
|
||||
.el-textarea__inner::placeholder {
|
||||
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
|
||||
}
|
||||
.el-textarea__inner {
|
||||
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script>
|
||||
import { listQuot, getQuot, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete } from "@/api/quot/quot";
|
||||
|
@ -323,8 +348,10 @@ export default {
|
|||
quotList: [],
|
||||
// 报价单-产品表格数据
|
||||
quotMaterialList: [],
|
||||
// 报价单-附件列表数据
|
||||
dataList: [],
|
||||
// 报价单-询价附件列表数据
|
||||
quotXjFileList: [],
|
||||
// 报价单-反馈附件列表数据
|
||||
quotFkFileList: [],
|
||||
//上传地址
|
||||
uploadUrl: process.env.VUE_APP_BASE_API + "/quot/quot/quotFile",
|
||||
headers: {
|
||||
|
@ -351,9 +378,6 @@ export default {
|
|||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
quotSalesmanBm: [
|
||||
{ required: true, message: "业务员编码不能为空", trigger: "blur" }
|
||||
],
|
||||
quotSalesmanName: [
|
||||
{ required: true, message: "业务员不能为空", trigger: "blur" }
|
||||
],
|
||||
|
@ -417,6 +441,8 @@ export default {
|
|||
updateTime: null
|
||||
};
|
||||
this.quotMaterialList = [];
|
||||
this.quotXjFileList = [];
|
||||
this.quotFkFileList = [];
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
|
@ -440,11 +466,14 @@ export default {
|
|||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加报价";
|
||||
|
||||
this.activeName = "quotInfo";
|
||||
this.form.quotSalesmanName = this.$store.state.user.sapUserName;
|
||||
this.form.quotSalesmanBm = this.$store.state.user.sapBm;
|
||||
this.form.quotSalesmanDeptId = this.$store.state.user.deptId;
|
||||
this.form.quotSalesmanDeptName = this.$store.state.user.deptName;
|
||||
this.quotMaterialList = [];
|
||||
this.quotXjFileList = [];
|
||||
this.quotFkFileList = [];
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
|
@ -455,7 +484,9 @@ export default {
|
|||
this.quotMaterialList = response.data.quotMaterialList;
|
||||
this.open = true;
|
||||
this.title = "修改报价";
|
||||
this.getQuotFileList();
|
||||
this.activeName = "quotInfo";
|
||||
this.getQuotXjFileList();
|
||||
this.getQuotFkFileList();
|
||||
|
||||
});
|
||||
},
|
||||
|
@ -528,10 +559,18 @@ export default {
|
|||
},
|
||||
|
||||
/*********************************附件上传*****************************************/
|
||||
//获取附件列表
|
||||
getQuotFileList(){
|
||||
quotFileList(this.form.quotId).then(response => {
|
||||
this.dataList = response.rows;
|
||||
//获取报价单-询价附件列表
|
||||
getQuotXjFileList(){
|
||||
const param = {relation_id:this.form.quotId,file_type:'quotXjFile'}
|
||||
quotFileList(param).then(response => {
|
||||
this.quotXjFileList = response.rows;
|
||||
});
|
||||
},
|
||||
//获取报价单-反馈附件列表
|
||||
getQuotFkFileList(){
|
||||
const param = {relation_id:this.form.quotId,file_type:'quotFkFile'}
|
||||
quotFileList(param).then(response => {
|
||||
this.quotFkFileList = response.rows;
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -540,7 +579,7 @@ export default {
|
|||
// 如果上传成功
|
||||
if (res.code == 200) {
|
||||
this.$modal.msgSuccess(res.msg);
|
||||
this.getQuotFileList();
|
||||
this.getQuotXjFileList();
|
||||
} else {
|
||||
this.$message.msgError(res.msg);
|
||||
}
|
||||
|
@ -555,7 +594,7 @@ export default {
|
|||
//删除附件
|
||||
deleteFile(fileId){
|
||||
quotFileDelete(fileId).then(response => {
|
||||
this.getQuotFileList();
|
||||
this.getQuotXjFileList();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,311 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item label="SAP账户" prop="sapUserBm">
|
||||
<el-input
|
||||
v-model="queryParams.sapUserBm"
|
||||
placeholder="请输入SAP账户"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="SAP账户名称" prop="sapUserName">
|
||||
<el-input
|
||||
v-model="queryParams.sapUserName"
|
||||
placeholder="请输入SAP账户名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="系统账户" prop="sysUserName">
|
||||
<el-input
|
||||
v-model="queryParams.sysUserName"
|
||||
placeholder="请输入系统账户"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="系统账户名称" prop="sysUserNickName">
|
||||
<el-input
|
||||
v-model="queryParams.sysUserNickName"
|
||||
placeholder="请输入系统账户名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['sysSapUser:sysSapUser:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['sysSapUser:sysSapUser:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['sysSapUser:sysSapUser:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['sysSapUser:sysSapUser:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="sysSapUserList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label=" ID" align="center" prop="sapUserId" v-if="false"/>
|
||||
<el-table-column label="SAP账户" align="center" prop="sapUserBm" />
|
||||
<el-table-column label="SAP账户名称" align="center" prop="sapUserName" />
|
||||
<el-table-column label="系统账户" align="center" prop="sysUserName" />
|
||||
<el-table-column label="系统账户名称" align="center" prop="sysUserNickName" />
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['sysSapUser:sysSapUser:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['sysSapUser:sysSapUser:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改SAP账户对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row :gutter="8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="SAP账户" prop="sapUserBm">
|
||||
<el-input v-model="form.sapUserBm" placeholder="请输入SAP账户" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="SAP账户名称" prop="sapUserName">
|
||||
<el-input v-model="form.sapUserName" placeholder="请输入SAP账户名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="系统账户" prop="sysUserName">
|
||||
<el-input v-model="form.sysUserName" placeholder="请输入系统账户" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="系统账户名称" prop="sysUserNickName">
|
||||
<el-input v-model="form.sysUserNickName" placeholder="请输入系统账户名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listSysSapUser, getSysSapUser, delSysSapUser, addSysSapUser, updateSysSapUser } from "@/api/sysSapUser/sysSapUser";
|
||||
|
||||
export default {
|
||||
name: "SysSapUser",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// SAP账户表格数据
|
||||
sysSapUserList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sapUserBm: null,
|
||||
sapUserName: null,
|
||||
sysUserName: null,
|
||||
sysUserNickName: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
sapUserBm: [
|
||||
{ required: true, message: "SAP账户不能为空", trigger: "blur" }
|
||||
],
|
||||
sapUserName: [
|
||||
{ required: true, message: "SAP账户名称不能为空", trigger: "blur" }
|
||||
],
|
||||
sysUserName: [
|
||||
{ required: true, message: "系统账户不能为空", trigger: "blur" }
|
||||
],
|
||||
sysUserNickName: [
|
||||
{ required: true, message: "系统账户名称不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询SAP账户列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listSysSapUser(this.queryParams).then(response => {
|
||||
this.sysSapUserList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
sapUserId: null,
|
||||
sapUserBm: null,
|
||||
sapUserName: null,
|
||||
sysUserName: null,
|
||||
sysUserNickName: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.sapUserId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加SAP账户";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const sapUserId = row.sapUserId || this.ids
|
||||
getSysSapUser(sapUserId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改SAP账户";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.sapUserId != null) {
|
||||
updateSysSapUser(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addSysSapUser(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const sapUserIds = row.sapUserId || this.ids;
|
||||
this.$modal.confirm('是否确认删除SAP账户编号为"' + sapUserIds + '"的数据项?').then(function() {
|
||||
return delSysSapUser(sapUserIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('sysSapUser/sysSapUser/export', {
|
||||
...this.queryParams
|
||||
}, `sysSapUser_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue