分包商管理增加售前委托人
This commit is contained in:
parent
3408e349f7
commit
7bad0d8681
|
|
@ -76,6 +76,10 @@ public class ViolationBean {
|
|||
private String identification;
|
||||
@ApiModelProperty("部门名称")
|
||||
private String deptName;
|
||||
@ApiModelProperty("售前委托人")
|
||||
private String preSalesMan;
|
||||
@ApiModelProperty("售前委托人电话")
|
||||
private String preSalesPhone;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,6 +61,10 @@ public class ViolationController extends BaseController<ViolationBean> {
|
|||
if (StringUtils.isNotBlank(phone)) {
|
||||
violationBean.setPhone(AesCbcUtils.encrypt(phone));
|
||||
}
|
||||
String preSalesPhone = violationBean.getPreSalesPhone();
|
||||
if (StringUtils.isNotBlank(preSalesPhone)) {
|
||||
violationBean.setPreSalesPhone(AesCbcUtils.encrypt(preSalesPhone));
|
||||
}
|
||||
String idCard = violationBean.getIdCard();
|
||||
if (StringUtils.isNotBlank(idCard)) {
|
||||
violationBean.setIdCard(AesCbcUtils.encrypt(idCard));
|
||||
|
|
@ -186,6 +190,7 @@ public class ViolationController extends BaseController<ViolationBean> {
|
|||
o.setId(id);
|
||||
ViolationBean result = service.toViewOutsourceEnterprise(o);
|
||||
result.setPhone(AesCbcUtils.encrypt(result.getPhone()));
|
||||
result.setPreSalesPhone(AesCbcUtils.encrypt(result.getPreSalesPhone()));
|
||||
ar.setSucceed(result);
|
||||
|
||||
} catch (Exception e) {
|
||||
|
|
@ -251,7 +256,6 @@ public class ViolationController extends BaseController<ViolationBean> {
|
|||
if (hssfSheet != null) {
|
||||
// 遍历行row,continue只是终止本次循环,接着还执行后面的循环
|
||||
int rowNum = hssfSheet.getLastRowNum();
|
||||
boolean hasEmptyRow = false;
|
||||
// 从第三行开始
|
||||
for (int rownum = 2; rownum <= rowNum; rownum++) {
|
||||
// 获取到每一行
|
||||
|
|
@ -393,7 +397,9 @@ public class ViolationController extends BaseController<ViolationBean> {
|
|||
String corporateName = getValue(sheetRow.getCell(3)).trim();
|
||||
String idCard = getValue(sheetRow.getCell(4)).trim();
|
||||
String phone = translateToPlainStr(getValue(sheetRow.getCell(5)).trim());
|
||||
String address = translateToPlainStr(getValue(sheetRow.getCell(6)).trim());
|
||||
String address = getValue(sheetRow.getCell(6)).trim();
|
||||
String preSalesMan = getValue(sheetRow.getCell(7)).trim();
|
||||
String preSalesPhone = translateToPlainStr(getValue(sheetRow.getCell(8)).trim());
|
||||
bean.setEnterpriseName(enterpriseName);
|
||||
bean.setSocialCreditCode(socialCreditCode);
|
||||
bean.setSetTime(setTime);
|
||||
|
|
@ -401,6 +407,8 @@ public class ViolationController extends BaseController<ViolationBean> {
|
|||
bean.setIdCard(idCard);
|
||||
bean.setPhone(phone);
|
||||
bean.setAddress(address);
|
||||
bean.setPreSalesMan(preSalesMan);
|
||||
bean.setPreSalesPhone(preSalesPhone);
|
||||
ar = service.updateShopBaseInfo(bean, row);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
|
|
@ -578,6 +586,8 @@ public class ViolationController extends BaseController<ViolationBean> {
|
|||
maps.put("phone", bean.getPhone());
|
||||
maps.put("proNum", bean.getProNum());
|
||||
maps.put("address", bean.getAddress());
|
||||
maps.put("preSalesMan", bean.getPreSalesMan());
|
||||
maps.put("preSalesPhone", bean.getPreSalesPhone());
|
||||
break;
|
||||
case "人员违章记录表":
|
||||
maps.put("name", bean.getName());
|
||||
|
|
@ -658,6 +668,8 @@ public class ViolationController extends BaseController<ViolationBean> {
|
|||
list.add("法人手机号码");
|
||||
list.add("项目数量");
|
||||
list.add("单位地址");
|
||||
list.add("售前委托人姓名");
|
||||
list.add("售前委托人电话");
|
||||
break;
|
||||
case "人员违章记录表":
|
||||
list.add("姓名");
|
||||
|
|
|
|||
|
|
@ -17,241 +17,242 @@ import java.util.List;
|
|||
@Service("ViolationService")
|
||||
public class ViolationServiceImpl implements ViolationService {
|
||||
|
||||
@Autowired
|
||||
private ViolationDao dao;
|
||||
@Autowired
|
||||
private ViolationDao dao;
|
||||
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxRes addOutsourceEnterprise(ViolationBean o) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
if(!isValidChineseMobileNumber(o.getPhone())){
|
||||
ar.setFailMsg("手机号码格式不正确!");
|
||||
return ar;
|
||||
}
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxRes addOutsourceEnterprise(ViolationBean o) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
if (!isValidChineseMobileNumber(o.getPhone()) || !isValidChineseMobileNumber(o.getPreSalesPhone())) {
|
||||
ar.setFailMsg("手机号码格式不正确!");
|
||||
return ar;
|
||||
}
|
||||
|
||||
ViolationBean selected=new ViolationBean();
|
||||
ViolationBean selected = new ViolationBean();
|
||||
|
||||
selected.setIdCard(o.getIdCard());
|
||||
int isAc =dao.getOutSourceNumById(selected);
|
||||
selected.setIdCard(o.getIdCard());
|
||||
int isAc = dao.getOutSourceNumById(selected);
|
||||
/*if(isAc>0){
|
||||
ar.setFailMsg("身份证号码已存在!");
|
||||
return ar;
|
||||
}*/
|
||||
|
||||
selected=new ViolationBean();
|
||||
selected.setEnterpriseName(o.getEnterpriseName());
|
||||
isAc =dao.getOutSourceNumById(selected);
|
||||
if(isAc>0){
|
||||
ar.setFailMsg("企业名称已存在!");
|
||||
return ar;
|
||||
}
|
||||
selected = new ViolationBean();
|
||||
selected.setEnterpriseName(o.getEnterpriseName());
|
||||
isAc = dao.getOutSourceNumById(selected);
|
||||
if (isAc > 0) {
|
||||
ar.setFailMsg("企业名称已存在!");
|
||||
return ar;
|
||||
}
|
||||
|
||||
selected=new ViolationBean();
|
||||
selected.setSocialCreditCode(o.getSocialCreditCode());
|
||||
isAc =dao.getOutSourceNumById(selected);
|
||||
if(isAc>0){
|
||||
ar.setFailMsg("统一社会信用代码已存在!");
|
||||
return ar;
|
||||
}
|
||||
selected=new ViolationBean();
|
||||
selected.setPhone(o.getPhone());
|
||||
isAc =dao.getOutSourceNumById(selected);
|
||||
if(isAc>0){
|
||||
ar.setFailMsg("手机号码已存在!");
|
||||
return ar;
|
||||
}
|
||||
selected = new ViolationBean();
|
||||
selected.setSocialCreditCode(o.getSocialCreditCode());
|
||||
isAc = dao.getOutSourceNumById(selected);
|
||||
if (isAc > 0) {
|
||||
ar.setFailMsg("统一社会信用代码已存在!");
|
||||
return ar;
|
||||
}
|
||||
selected = new ViolationBean();
|
||||
selected.setPhone(o.getPhone());
|
||||
isAc = dao.getOutSourceNumById(selected);
|
||||
if (isAc > 0) {
|
||||
ar.setFailMsg("手机号码已存在!");
|
||||
return ar;
|
||||
}
|
||||
|
||||
int num=dao.addOutsourceEnterprise(o);
|
||||
if(num>0){
|
||||
ar.setSucceedMsg("违章新增成功!");
|
||||
}else {
|
||||
ar.setFailMsg("新增失败!");
|
||||
}
|
||||
int num = dao.addOutsourceEnterprise(o);
|
||||
if (num > 0) {
|
||||
ar.setSucceedMsg("分包商新增成功!");
|
||||
} else {
|
||||
ar.setFailMsg("新增失败!");
|
||||
}
|
||||
|
||||
return ar;
|
||||
}
|
||||
public static boolean isValidChineseMobileNumber(String number) {
|
||||
String regex = "^1[3-9]\\d{9}$";
|
||||
return number.matches(regex);
|
||||
}
|
||||
return ar;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ViolationBean toViewOutsourceEnterprise(ViolationBean o) {
|
||||
return dao.toViewOutsourceEnterprise(o);
|
||||
}
|
||||
public static boolean isValidChineseMobileNumber(String number) {
|
||||
String regex = "^1[3-9]\\d{9}$";
|
||||
return number.matches(regex);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxRes updateOutsourceEnterprise(ViolationBean o) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
if(!isValidChineseMobileNumber(o.getPhone())){
|
||||
ar.setFailMsg("手机号码格式不正确!");
|
||||
return ar;
|
||||
}
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ViolationBean toViewOutsourceEnterprise(ViolationBean o) {
|
||||
return dao.toViewOutsourceEnterprise(o);
|
||||
}
|
||||
|
||||
ViolationBean selected=new ViolationBean();
|
||||
selected.setId(o.getId());
|
||||
selected.setIdCard(o.getIdCard());
|
||||
int isAc =dao.getOutSourceNumById(selected);
|
||||
/**
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxRes updateOutsourceEnterprise(ViolationBean o) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
if (!isValidChineseMobileNumber(o.getPhone()) || !isValidChineseMobileNumber(o.getPreSalesPhone())) {
|
||||
ar.setFailMsg("手机号码格式不正确!");
|
||||
return ar;
|
||||
}
|
||||
|
||||
ViolationBean selected = new ViolationBean();
|
||||
selected.setId(o.getId());
|
||||
selected.setIdCard(o.getIdCard());
|
||||
int isAc = dao.getOutSourceNumById(selected);
|
||||
/*if(isAc>0){
|
||||
ar.setFailMsg("身份证号码已存在!");
|
||||
return ar;
|
||||
}*/
|
||||
|
||||
selected=new ViolationBean();
|
||||
selected.setId(o.getId());
|
||||
selected.setEnterpriseName(o.getEnterpriseName());
|
||||
isAc =dao.getOutSourceNumById(selected);
|
||||
if(isAc>0){
|
||||
ar.setFailMsg("企业名称已存在!");
|
||||
return ar;
|
||||
}
|
||||
selected = new ViolationBean();
|
||||
selected.setId(o.getId());
|
||||
selected.setEnterpriseName(o.getEnterpriseName());
|
||||
isAc = dao.getOutSourceNumById(selected);
|
||||
if (isAc > 0) {
|
||||
ar.setFailMsg("企业名称已存在!");
|
||||
return ar;
|
||||
}
|
||||
|
||||
selected=new ViolationBean();
|
||||
selected.setId(o.getId());
|
||||
selected.setSocialCreditCode(o.getSocialCreditCode());
|
||||
isAc =dao.getOutSourceNumById(selected);
|
||||
if(isAc>0){
|
||||
ar.setFailMsg("统一社会信用代码已存在!");
|
||||
return ar;
|
||||
}
|
||||
selected=new ViolationBean();
|
||||
selected.setId(o.getId());
|
||||
selected.setPhone(o.getPhone());
|
||||
isAc =dao.getOutSourceNumById(selected);
|
||||
if(isAc>0){
|
||||
ar.setFailMsg("手机号码已存在!");
|
||||
return ar;
|
||||
}
|
||||
selected = new ViolationBean();
|
||||
selected.setId(o.getId());
|
||||
selected.setSocialCreditCode(o.getSocialCreditCode());
|
||||
isAc = dao.getOutSourceNumById(selected);
|
||||
if (isAc > 0) {
|
||||
ar.setFailMsg("统一社会信用代码已存在!");
|
||||
return ar;
|
||||
}
|
||||
selected = new ViolationBean();
|
||||
selected.setId(o.getId());
|
||||
selected.setPhone(o.getPhone());
|
||||
isAc = dao.getOutSourceNumById(selected);
|
||||
if (isAc > 0) {
|
||||
ar.setFailMsg("手机号码已存在!");
|
||||
return ar;
|
||||
}
|
||||
|
||||
int num=dao.updateOutsourceEnterprise(o);
|
||||
if(num>0){
|
||||
ar.setSucceedMsg("修改成功!");
|
||||
}else {
|
||||
ar.setFailMsg("修改失败!");
|
||||
}
|
||||
int num = dao.updateOutsourceEnterprise(o);
|
||||
if (num > 0) {
|
||||
ar.setSucceedMsg("修改成功!");
|
||||
} else {
|
||||
ar.setFailMsg("修改失败!");
|
||||
}
|
||||
|
||||
ar.setSucceedMsg("外包企业修改成功!");
|
||||
return ar;
|
||||
}
|
||||
ar.setSucceedMsg("外包企业修改成功!");
|
||||
return ar;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int outsourceEnterpriseDelete(String[] id) {
|
||||
return dao.outsourceEnterpriseDelete(id);
|
||||
}
|
||||
/**
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int outsourceEnterpriseDelete(String[] id) {
|
||||
return dao.outsourceEnterpriseDelete(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ViolationBean> exportOutsourceEnterprise(ViolationBean bean) {
|
||||
return dao.exportOutsourceEnterprise(bean);
|
||||
}
|
||||
/**
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ViolationBean> exportOutsourceEnterprise(ViolationBean bean) {
|
||||
return dao.exportOutsourceEnterprise(bean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ViolationBean> getOutsourceEnterpriseByPage(ViolationBean o) {
|
||||
return dao.getOutsourceEnterpriseByPage(o);
|
||||
}
|
||||
@Override
|
||||
public List<ViolationBean> getOutsourceEnterpriseByPage(ViolationBean o) {
|
||||
return dao.getOutsourceEnterpriseByPage(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入数据校验
|
||||
* @param socialCreditCode
|
||||
* @param idCard
|
||||
* @param phone
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Integer getImportDataCheck(ImportUserDataVo dataVo) {
|
||||
return dao.getImportDataCheck(dataVo);
|
||||
}
|
||||
/**
|
||||
* 导入数据校验
|
||||
*
|
||||
* @param socialCreditCode
|
||||
* @param idCard
|
||||
* @param phone
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Integer getImportDataCheck(ImportUserDataVo dataVo) {
|
||||
return dao.getImportDataCheck(dataVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param enterpriseName
|
||||
* @return
|
||||
*/
|
||||
/**
|
||||
* @param enterpriseName
|
||||
* @return
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param bean
|
||||
*/
|
||||
@Override
|
||||
public AjaxRes updateShopBaseInfo(ViolationBean bean,int row) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
if(!RegularCheckUtils.verificationPhone(bean.getPhone())){
|
||||
ar.setFailMsg("第" + row + "行手机号码格式不正确!");
|
||||
return ar;
|
||||
}
|
||||
if (!RegularCheckUtils.verificationIdCard(bean.getIdCard())) {
|
||||
ar.setFailMsg("第" + row + "行身份证号码格式不正确!");
|
||||
return ar;
|
||||
}
|
||||
ViolationBean selected=new ViolationBean();
|
||||
selected.setIdCard(bean.getIdCard());
|
||||
int isAc =dao.getOutSourceNumById(selected);
|
||||
if(isAc>0){
|
||||
ar.setFailMsg("第" + row + "行身份证号码已存在!");
|
||||
return ar;
|
||||
}
|
||||
/**
|
||||
* @param bean
|
||||
*/
|
||||
@Override
|
||||
public AjaxRes updateShopBaseInfo(ViolationBean bean, int row) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
if (!RegularCheckUtils.verificationPhone(bean.getPhone()) || !RegularCheckUtils.verificationPhone(bean.getPreSalesPhone())) {
|
||||
ar.setFailMsg("第" + row + "行手机号码格式不正确!");
|
||||
return ar;
|
||||
}
|
||||
if (!RegularCheckUtils.verificationIdCard(bean.getIdCard())) {
|
||||
ar.setFailMsg("第" + row + "行身份证号码格式不正确!");
|
||||
return ar;
|
||||
}
|
||||
ViolationBean selected = new ViolationBean();
|
||||
selected.setIdCard(bean.getIdCard());
|
||||
int isAc = dao.getOutSourceNumById(selected);
|
||||
if (isAc > 0) {
|
||||
ar.setFailMsg("第" + row + "行身份证号码已存在!");
|
||||
return ar;
|
||||
}
|
||||
|
||||
selected=new ViolationBean();
|
||||
selected.setEnterpriseName(bean.getEnterpriseName());
|
||||
isAc =dao.getOutSourceNumById(selected);
|
||||
if(isAc>0){
|
||||
ar.setFailMsg("第" + row + "企业名称已存在!");
|
||||
return ar;
|
||||
}
|
||||
selected = new ViolationBean();
|
||||
selected.setEnterpriseName(bean.getEnterpriseName());
|
||||
isAc = dao.getOutSourceNumById(selected);
|
||||
if (isAc > 0) {
|
||||
ar.setFailMsg("第" + row + "企业名称已存在!");
|
||||
return ar;
|
||||
}
|
||||
|
||||
selected=new ViolationBean();
|
||||
selected.setSocialCreditCode(bean.getSocialCreditCode());
|
||||
isAc =dao.getOutSourceNumById(selected);
|
||||
if(isAc>0){
|
||||
ar.setFailMsg("第" + row + "统一社会信用代码已存在!");
|
||||
return ar;
|
||||
}
|
||||
selected=new ViolationBean();
|
||||
selected.setPhone(bean.getPhone());
|
||||
isAc =dao.getOutSourceNumById(selected);
|
||||
if(isAc>0){
|
||||
ar.setFailMsg("第" + row + "手机号码已存在!");
|
||||
return ar;
|
||||
}
|
||||
int num=dao.addShopBaseInfo(bean);
|
||||
if(num>0){
|
||||
ar.setSucceedMsg("第" + row + "新增成功!");
|
||||
}else {
|
||||
ar.setFailMsg("第" + row + "新增失败!,前几行数据新增成功");
|
||||
}
|
||||
return ar;
|
||||
selected = new ViolationBean();
|
||||
selected.setSocialCreditCode(bean.getSocialCreditCode());
|
||||
isAc = dao.getOutSourceNumById(selected);
|
||||
if (isAc > 0) {
|
||||
ar.setFailMsg("第" + row + "统一社会信用代码已存在!");
|
||||
return ar;
|
||||
}
|
||||
selected = new ViolationBean();
|
||||
selected.setPhone(bean.getPhone());
|
||||
isAc = dao.getOutSourceNumById(selected);
|
||||
if (isAc > 0) {
|
||||
ar.setFailMsg("第" + row + "手机号码已存在!");
|
||||
return ar;
|
||||
}
|
||||
int num = dao.addShopBaseInfo(bean);
|
||||
if (num > 0) {
|
||||
ar.setSucceedMsg("第" + row + "新增成功!");
|
||||
} else {
|
||||
ar.setFailMsg("第" + row + "新增失败!,前几行数据新增成功");
|
||||
}
|
||||
return ar;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ViolationBean> exportSubpageList(ViolationBean bean) {
|
||||
return dao.exportSubpageList(bean);
|
||||
}
|
||||
/**
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ViolationBean> exportSubpageList(ViolationBean bean) {
|
||||
return dao.exportSubpageList(bean);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -14,6 +14,8 @@
|
|||
create_time,
|
||||
update_time,
|
||||
address,
|
||||
pre_sales_man,
|
||||
pre_sales_phone,
|
||||
is_active
|
||||
)
|
||||
values(
|
||||
|
|
@ -28,6 +30,8 @@
|
|||
now(),
|
||||
now(),
|
||||
#{address},
|
||||
#{preSalesMan},
|
||||
#{preSalesPhone},
|
||||
'1'
|
||||
)
|
||||
</insert>
|
||||
|
|
@ -40,6 +44,8 @@
|
|||
idCard,
|
||||
phone,
|
||||
address,
|
||||
pre_sales_man,
|
||||
pre_sales_phone,
|
||||
inThoseDays,
|
||||
currentScore,
|
||||
create_time,
|
||||
|
|
@ -54,6 +60,8 @@
|
|||
#{idCard},
|
||||
#{phone},
|
||||
#{address},
|
||||
#{preSalesMan},
|
||||
#{preSalesPhone},
|
||||
YEAR(NOW()),
|
||||
'12',
|
||||
now(),
|
||||
|
|
@ -72,6 +80,8 @@
|
|||
inThoseDays = #{inThoseDays},
|
||||
currentScore = #{currentScore},
|
||||
address = #{address},
|
||||
pre_sales_man = #{preSalesMan},
|
||||
pre_sales_phone = #{preSalesPhone},
|
||||
update_time = now()
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
|
@ -119,7 +129,9 @@
|
|||
pa.corporateName as corporateName,
|
||||
pa.idCard as idCard,
|
||||
pa.phone as phone,
|
||||
pa.address as address
|
||||
pa.address as address,
|
||||
pa.pre_sales_man as preSalesMan,
|
||||
pa.pre_sales_phone as preSalesPhone
|
||||
FROM project_assignment pa
|
||||
LEFT JOIN(SELECT count(1) num, lk_id
|
||||
FROM pm_org_info
|
||||
|
|
@ -138,6 +150,8 @@
|
|||
pa.idCard as idCard,
|
||||
pa.phone as phone,
|
||||
pa.address as address,
|
||||
pa.pre_sales_man as preSalesMan,
|
||||
pa.pre_sales_phone as preSalesPhone,
|
||||
ifnull(pro.num,'0') as proNum
|
||||
FROM project_assignment pa
|
||||
LEFT JOIN(
|
||||
|
|
@ -302,7 +316,9 @@
|
|||
pa.corporateName as corporateName,
|
||||
pa.idCard as idCard,ifnull(pro.num,'0') proNum,
|
||||
pa.phone as phone,
|
||||
pa.address as address
|
||||
pa.address as address,
|
||||
pa.pre_sales_man as preSalesMan,
|
||||
pa.pre_sales_phone as preSalesPhone
|
||||
FROM project_assignment pa
|
||||
LEFT JOIN(
|
||||
SELECT count(1) num ,lk_id FROM pm_org_info GROUP BY lk_id
|
||||
|
|
|
|||
|
|
@ -93,6 +93,20 @@
|
|||
autocomplete="off" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline" style="width: 50%">
|
||||
<label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>售前委托人:</label>
|
||||
<div class="layui-input-inline" style="width: 60%">
|
||||
<input type="text" maxlength="10" lay-affix="clear" id="preSalesMan" name="preSalesMan"
|
||||
autocomplete="off" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline" style="width: 50%">
|
||||
<label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>售前委托人电话:</label>
|
||||
<div class="layui-input-inline" style="width: 60%">
|
||||
<input type="text" maxlength="11" lay-affix="clear" id="preSalesPhone" name="preSalesPhone"
|
||||
autocomplete="off" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" style="display: none">
|
||||
<div class="layui-input-block">
|
||||
|
|
@ -136,6 +150,8 @@
|
|||
$("#idCard").val(obj.idCard);
|
||||
$("#phone").val(decryptCBC(obj.phone));
|
||||
$("#address").val(obj.address);
|
||||
$("#preSalesMan").val(obj.preSalesMan);
|
||||
$("#preSalesPhone").val(decryptCBC(obj.preSalesPhone));
|
||||
} else {
|
||||
layer.msg(data.resMsg, {icon: 2, time: 2000});
|
||||
}
|
||||
|
|
@ -176,7 +192,11 @@
|
|||
// return false;
|
||||
// }
|
||||
if (!phone_reg($("#phone").val())) {
|
||||
layer.msg("手机号码格式不正确", {icon: 2, time: 2000});
|
||||
layer.msg("法人手机号码格式不正确", {icon: 2, time: 2000});
|
||||
return false;
|
||||
}
|
||||
if (!phone_reg($("#preSalesPhone").val())) {
|
||||
layer.msg("售前委托人手机号码格式不正确", {icon: 2, time: 2000});
|
||||
return false;
|
||||
}
|
||||
checkLoginNameIsExist($("#enterpriseName").val(),data);
|
||||
|
|
@ -195,6 +215,8 @@
|
|||
params.phone = encryptCBC(data.phone)
|
||||
params.setTime = encryptCBC(data.setTime)
|
||||
params.socialCreditCode = encryptCBC(data.socialCreditCode)
|
||||
params.preSalesMan = encryptCBC(data.preSalesMan)
|
||||
params.preSalesPhone = encryptCBC(data.preSalesPhone)
|
||||
params.id = encryptCBC(getUrlParam("id"))
|
||||
var idx = layer.msg('正在提交保存,请稍等...', {
|
||||
icon: 16
|
||||
|
|
|
|||
|
|
@ -37,12 +37,14 @@
|
|||
<div class="layui-container" style="width: 100%;height: 100%;padding: 10px">
|
||||
<form id="baseForm" class="layui-form" method="POST" onsubmit="return false;">
|
||||
<div class="layui-inline" style="width: 100%;display: flex;flex-direction: row">
|
||||
<input type="text" name="keyWord" id="keyWord" autocomplete="off" placeholder="请输入企业名称" class="layui-input"
|
||||
<input type="text" name="keyWord" id="keyWord" autocomplete="off" placeholder="请输入企业名称"
|
||||
class="layui-input"
|
||||
style="width: 15%"
|
||||
maxlength="30">
|
||||
<input id="socialCreditCode" type="text" name="socialCreditCode" placeholder="请输入统一社会信用代码"
|
||||
class="layui-input" autocomplete="off" style="margin-left: 10px;width: 15%"/>
|
||||
<input id="corporateName" type="text" autocomplete="off" name="corporateName" placeholder="请输入法人姓名" class="layui-input"
|
||||
<input id="corporateName" type="text" autocomplete="off" name="corporateName" placeholder="请输入法人姓名"
|
||||
class="layui-input"
|
||||
style="margin-left: 10px;width: 15%"/>
|
||||
|
||||
<button id='searchBtn' class="layui-btn layui-btn-warm" title="过滤" type="button"
|
||||
|
|
@ -138,13 +140,29 @@
|
|||
// return maskSensitiveInfo(idCard, "idCard");
|
||||
// }
|
||||
// },
|
||||
{ field: 'phone', title: '联系电话', width: '15%', align: "center",
|
||||
{
|
||||
field: 'phone', title: '联系电话', width: '15%', align: "center",
|
||||
templet: function (d) {
|
||||
let phone = decryptCBC(d.phone);
|
||||
return maskSensitiveInfo(phone, "phone");
|
||||
}
|
||||
},
|
||||
{ field: 'address', title: '单位地址', width: '15%', align: "center" },
|
||||
{field: 'address', title: '单位地址', align: "center"},
|
||||
{field: 'preSalesMan', title: '售前委托人', align: "center"},
|
||||
{
|
||||
field: 'preSalesPhone',
|
||||
title: '售前委托人电话',
|
||||
width: '10%',
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
if (d.preSalesPhone) {
|
||||
let preSalesPhone = decryptCBC(d.preSalesPhone);
|
||||
return maskSensitiveInfo(preSalesPhone, "phone");
|
||||
}else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
},
|
||||
{field: 'proNum', align: 'center', title: '项目数量'},
|
||||
{
|
||||
fixed: 'right', width: 180, title: '操作', align: 'center', templet: d => {
|
||||
|
|
@ -311,21 +329,21 @@
|
|||
// 告诉jQuery不要去设置Content-Type请求头
|
||||
contentType: false,
|
||||
success: function (data) {
|
||||
/* layer.close(idx);
|
||||
layer.msg('导入成功', {icon: 1, time: 2000});
|
||||
search(1)*/
|
||||
/* layer.close(idx);
|
||||
layer.msg('导入成功', {icon: 1, time: 2000});
|
||||
search(1)*/
|
||||
if (data.res === 0) {
|
||||
layer.close(idx);
|
||||
layer.msg('导入失败' + data.resMsg, { icon: 2, time: 2000 });
|
||||
layer.msg('导入失败' + data.resMsg, {icon: 2, time: 2000});
|
||||
} else {
|
||||
layer.close(idx);
|
||||
layer.msg('导入成功', { icon: 1, time: 2000 });
|
||||
layer.msg('导入成功', {icon: 1, time: 2000});
|
||||
search(1)
|
||||
}
|
||||
},
|
||||
error: function (data) {
|
||||
alert(data);
|
||||
console.log("我不好",data)
|
||||
console.log("我不好", data)
|
||||
layer.close(idx);
|
||||
layer.msg('导入成功', {icon: 2, time: 2000});
|
||||
}
|
||||
|
|
@ -335,7 +353,7 @@
|
|||
|
||||
function importTemplate() {
|
||||
let token = localStorage.getItem("token");
|
||||
window.location.href =ctxPath + "/backstage/download?filename=外包企业导入模板.xls&token=" + token;
|
||||
window.location.href = ctxPath + "/backstage/download?filename=外包企业导入模板.xls&token=" + token;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue