Browse Source

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

dev
王晓迪 3 months ago
parent
commit
1eb2ceea5e
  1. 25
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java
  2. 21
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java
  3. 1
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomer.java
  4. 1
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomerQuote.java
  5. 29
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java
  6. 5
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysCustomerMapper.java
  7. 10
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesOrderMapper.java
  8. 5
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerService.java
  9. 10
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesOrderService.java
  10. 33
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java
  11. 17
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderServiceImpl.java
  12. 17
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerMapper.xml
  13. 58
      ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderMapper.xml
  14. 32
      ruoyi-admin/src/main/resources/templates/system/customer/cancel.html
  15. 78
      ruoyi-admin/src/main/resources/templates/system/customer/customer.html
  16. 18
      ruoyi-admin/src/main/resources/templates/system/customer/taskModifyApply.html
  17. 26
      ruoyi-admin/src/main/resources/templates/system/customer/taskYwjlVerify.html
  18. 18
      ruoyi-admin/src/main/resources/templates/system/customer/taskYwzgVerify.html
  19. 17
      ruoyi-admin/src/main/resources/templates/system/customer/taskZozjVerify.html
  20. 66
      ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html
  21. 11
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java

25
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java

@ -530,18 +530,33 @@ public class SysCustomerController extends BaseController
}
return new SysCustomerVo();
}
/**
* 作废物料信息
* 加载作废客户信息弹窗
*/
@GetMapping("/cancel/{id}")
public String cancel(@PathVariable("id") Long id, ModelMap mmap) {
SysCustomer sysCustomer = sysCustomerService.selectSysCustomerById(id);
mmap.put("sysCustomer", sysCustomer);
return prefix + "/cancel";
}
/**
* 作废客户信息
*/
@RequiresPermissions("system:customer:cancel")
@Log(title = "客户信息", businessType = BusinessType.CANCEL)
@GetMapping( "/cancel/{id}")
@PostMapping( "/cancel")
@ResponseBody
public AjaxResult cancel(@PathVariable("id") Long id){
sysCustomerService.cancelSysCustomerById(id);
return AjaxResult.success();
public AjaxResult cancel(SysCustomer sysCustomer){
return toAjax(sysCustomerService.cancelSysCustomerByObject(sysCustomer));
}
/**
* 恢复物料信息
*/

21
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java

@ -148,6 +148,22 @@ public class SysSalesOrderController extends BaseController
return getDataTable(list);
}
/**
* 导出销售订单列表
*/
@RequiresPermissions("system:salesOrder:export")
@Log(title = "销售订单", businessType = BusinessType.EXPORT)
@PostMapping("/exportAll")
@ResponseBody
public AjaxResult exportAll(SysSalesOrderVo sysSalesOrder)
{
List<SysSalesOrderVo> list = sysSalesOrderService.selectSysSalesOrderAllList(sysSalesOrder);
ExcelUtil<SysSalesOrderVo> util = new ExcelUtil<SysSalesOrderVo>(SysSalesOrderVo.class);
return util.exportExcel(list, "销售订单数据");
}
/**
* 导出销售订单列表
*/
@ -156,15 +172,16 @@ public class SysSalesOrderController extends BaseController
@Log(title = "销售订单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysSalesOrderVo sysSalesOrder)
public AjaxResult export(@RequestBody String[] salesOrderCodes)
{
List<SysSalesOrderVo> list = sysSalesOrderService.selectSysSalesOrderList(sysSalesOrder);
List<SysSalesOrderVo> list = sysSalesOrderService.selectSysSalesOrderListByCodes(salesOrderCodes);
ExcelUtil<SysSalesOrderVo> util = new ExcelUtil<SysSalesOrderVo>(SysSalesOrderVo.class);
return util.exportExcel(list, "销售订单数据");
}
/**
* 修改保存销售订单
* */

1
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomer.java

@ -759,6 +759,7 @@ public class SysCustomer extends BaseEntity
.append("customerId",getCustomerId())
.append("customerName",getCustomerName())
.append("createTime", getCreateTime())
.append("cancelRemark",getCancelRemark())
.toString();
}
}

1
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomerQuote.java

@ -86,7 +86,6 @@ public class SysCustomerQuote extends BaseEntity
private BigDecimal usdSum;
private String businessMembers;
@Excel(name = "审核标志: 0未审核 1审核成功 2审核拒绝")
private String deginFlag;
/** 删除标志(0代表存在 1代表删除) */

29
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java

@ -21,15 +21,25 @@ public class SysSalesOrder extends BaseEntity {
/* 订单id*/
private Long salesOrderId;
/*使用状态 0未使用,1使用,2已作废*/
@Excel(name = "使用状态", dictType = "useStatus")
private String useStatus;
/*审核状态 (0未审核,1审核通过,2审核拒绝)*/
@Excel(name = "审核状态", dictType = "auditStatus")
private String auditStatus;
/*出货状态(0待出货通知,1待准备货,2待出货,3部分收货,4全部收货,5部分出货,6全部出货,7部分验收,8全部验收)*/
@Excel(name = "出货状态", dictType = "sys_delivery_status")
private String deliveryStatus;
/*收款结案状态(0待收款,1部分收款,2全部收款,3已结案)*/
@Excel(name = "收款结案状态", dictType = "sys_close_status")
private String closeStatus;
/**生产状态(0待评审、1待部门主管确认、2待工程审核、3待生产、4生产中、5部分完成、6全部完成)*/
@Excel(name = "生产状态", dictType = "sys_erp_makeStatus")
private String makeStatus;
/* 订单编号*/
@Excel(name = "销售订单编号")
@ -37,7 +47,7 @@ public class SysSalesOrder extends BaseEntity {
/*订单号码*/
@Excel(name = "客户订单编号")
private String salesOrderNumber;
@Excel(name = "订单类型")
@Excel(name = "订单类型", dictType = "sys_order_type")
private String salesOrderType;
/* 客户代码*/
@Excel(name = "客户代码")
@ -45,41 +55,58 @@ public class SysSalesOrder extends BaseEntity {
@Excel(name="币种")
private String commonCurrency;
/*美元汇率*/
@Excel(name = "美元汇率")
private Double usdTax;
/*税率*/
@Excel(name = "税率")
private Double taxRate;
/*是否开票*/
@Excel(name = "是否开票", dictType = "sys_whether")
private String invoice;
/* 客户名称*/
@Excel(name = "客户名称")
private String enterpriseName;
/*事业部*/
@Excel(name = "事业部")
private String customerPurser;
/*客户电话*/
@Excel(name = "客户电话")
private String customerPhone;
/*物料合计*/
@Excel(name = "物料合计")
private Long materialSum;
/*数量合计*/
@Excel(name = "数量合计")
private Long enterpriseSum;
/*不含税单价(RMB)*/
@Excel(name = "不含税单价(RMB)")
private Double noRmbPrice;
/*不含税总价(RMB)*/
@Excel(name = "不含税总价(RMB)")
private Double noRmbSum;
/*含税单价(RMB)*/
@Excel(name = "含税单价(RMB)")
private Double rmbPrice;
/*含税总价(RMB)*/
@Excel(name = "含税总价(RMB)")
private Double rmbTaxSum;
/*不含税单价(美元)*/
@Excel(name = "不含税单价(美元)")
private Double noUsdPrice;
/*不含税总价(美元)*/
@Excel(name = "不含税总价(美元)")
private Double noUsdSum;
/*含税单价(美元)*/
@Excel(name = "含税单价(美元)")
private Double usdPrice;
/*含税总价(美元)*/
@Excel(name = "含税总价(美元)")
private Double usdTaxSum;
/*计划交付时间*/
@Excel(name = "计划交付时间")
private String deliveryTime;
/*客户收货人*/
@Excel(name = "客户收货人")
private String customerDelivery;
/*客户收货人(Bill to)*/

5
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysCustomerMapper.java

@ -79,6 +79,11 @@ public interface SysCustomerMapper
int deleteSysCustomerByIds(String[] ids);
/**
* 根据客户资料对象作废客户资料
* */
int cancelSysCustomerByObject(SysCustomer sysCustomer);
List<SysCustomer> selectSysCustomerBycode();
SysCustomerVo selectSysCustomerByEnterpriseCode(String enterpriseCode);

10
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesOrderMapper.java

@ -76,4 +76,14 @@ public interface SysSalesOrderMapper
* @return 结果
* */
int updateSysSalesOrderBySalesOrderCode(SysSalesOrder sysSalesOrder);
/**
* 根据销售单号数组查询销售订单集合
* */
List<SysSalesOrderVo> selectSysSalesOrderListByCodes(String[] salesOrderCodes);
/**
* 导出查询所有的销售订单
* */
List<SysSalesOrderVo> selectSysSalesOrderAllList(SysSalesOrderVo sysSalesOrder);
}

5
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerService.java

@ -110,4 +110,9 @@ public interface ISysCustomerService
* 通过开票公司名称查询开票公司信息
* */
SysInvoice getSysInvoiceInfoByName(String invoiceCompanyName);
/**
* 根据客户资料对象作废客户资料
* */
int cancelSysCustomerByObject(SysCustomer sysCustomer);
}

10
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesOrderService.java

@ -115,4 +115,14 @@ public interface ISysSalesOrderService
* 导出销售订单数据
*/
void exportSalesOrderByCode(String salesOrderCode, HttpServletResponse response);
/**
* 根据销售单号数组查询销售订单集合
* */
List<SysSalesOrderVo> selectSysSalesOrderListByCodes(String[] salesOrderCodes);
/**
* 查询所有可使用的销售订单
* */
List<SysSalesOrderVo> selectSysSalesOrderAllList(SysSalesOrderVo sysSalesOrder);
}

33
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java

@ -516,4 +516,37 @@ public class SysCustomerServiceImpl implements ISysCustomerService
}
/**
* 根据客户资料对象作废客户资料
* */
@Transactional(rollbackFor = Exception.class)
@Override
public int cancelSysCustomerByObject(SysCustomer sysCustomer) {
SysCustomerVo sysCustomerVo = sysCustomerMapper.selectSysCustomerById(sysCustomer.getId());
// 审核状态-待审核
sysCustomerVo.setAuditStatus("0");
SysUser user = ShiroUtils.getSysUser();
// 启动流程
String applyTitle = user.getUserName()+"发起了客户信息作废审批-"+ DateUtils.dateTimeNow();
String instanceType = "cancel";
SysCustomer tempSysCustomer = new SysCustomer();
BeanUtils.copyProperties(sysCustomerVo,tempSysCustomer);
ProcessInstance processInstance = startProcessInstance(applyTitle,instanceType,tempSysCustomer, user);
String processInstanceId = processInstance.getProcessInstanceId();
// 作废实例id
tempSysCustomer.setCancelInstanceId(processInstanceId);
// 存在提交完就流程结束的情况
boolean processIsFinish = processService.judgeProcessIsFinish(processInstanceId);
if(processIsFinish){
// 审核状态-审核通过
tempSysCustomer.setAuditStatus("1");
// 使用状态-已作废
tempSysCustomer.setUseStatus("2");
}
tempSysCustomer.setCancelRemark(sysCustomer.getCancelRemark());
return sysCustomerMapper.updateSysCustomer(tempSysCustomer);
}
}

17
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderServiceImpl.java

@ -206,6 +206,23 @@ public class SysSalesOrderServiceImpl implements ISysSalesOrderService
return returnList;
}
/**
* 根据销售单号数组查询销售订单集合
* */
@Override
public List<SysSalesOrderVo> selectSysSalesOrderListByCodes(String[] salesOrderCodes) {
return sysSalesOrderMapper.selectSysSalesOrderListByCodes(salesOrderCodes);
}
/**
* 导出查询所有的销售订单
* */
@Override
public List<SysSalesOrderVo> selectSysSalesOrderAllList(SysSalesOrderVo sysSalesOrder) {
return sysSalesOrderMapper.selectSysSalesOrderAllList(sysSalesOrder);
}
/**
* 新增销售订单
*

17
ruoyi-admin/src/main/resources/mapper/system/SysCustomerMapper.xml

@ -62,6 +62,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="rmbFlag" column="rmb_flag" />
<result property="usdFlag" column="usd_flag" />
<result property="cancelRemark" column="cancel_remark" />
</resultMap>
<sql id="selectSysCustomerVo">
select id,enterprise_code,enterprise_name,english_name,customer_abbreviation ,customer_purser ,
@ -71,7 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
customer_contact_id,customer_contact,customer_office,contact_number,customer_email,customer_fax,
delivery_address_id,delivery_customer_person,delivery_customer_phone,
delivery_address,delivery_customer_postal,delivery_customer_fax,business_members,
identifying_people,first_add_time,update_info_time, create_time ,audit_status,use_status,update_by,rmb_flag,usd_flag,
identifying_people,first_add_time,update_info_time, create_time ,audit_status,use_status,update_by,rmb_flag,usd_flag, cancel_remark,
apply_user,apply_time , instance_id , instance_type from sys_customer
</sql>
@ -220,6 +222,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if>
<if test="rmbFlag != null">rmb_flag,</if>
<if test="usdFlag != null">usd_flag</if>
<if test="cancelRemark != null">cancel_remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseCode!=null and enterpriseCode != ''">#{enterpriseCode},</if>
@ -274,6 +277,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null"> #{createTime},</if>
<if test="rmbFlag != null"> #{rmbFlag},</if>
<if test="usdFlag != null"> #{usdFlag} </if>
<if test="cancelRemark != null">#{cancelRemark},</if>
</trim>
</insert>
@ -323,6 +327,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="customerRemarks!=null">customer_remarks = #{customerRemarks},</if>
<if test="customerSign!=null">customer_sign = #{customer_sign},</if>
<if test="updateBy!=null">update_by = #{updateBy},</if>
<if test="updateTime!=null">update_time = #{updateTime},</if>
<if test="instanceId != null">instance_id = #{instanceId},</if>
<if test="instanceType != null">instance_type = #{instanceType},</if>
<if test="submitInstanceId != null">submit_instance_id = #{submitInstanceId},</if>
@ -332,7 +337,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyUser != null">apply_user = #{applyUser},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="rmbFlag != null">rmb_flag = #{rmbFlag},</if>
<if test="usdFlag != null">usd_flag = #{usdFlag} </if>
<if test="usdFlag != null">usd_flag = #{usdFlag},</if>
<if test="cancelRemark != null">cancel_remark = #{cancelRemark},</if>
</trim>
where id = #{id}
</update>
@ -346,6 +352,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<update id="cancelSysCustomerByObject" parameterType="SysCustomer">
update sys_customer set del_flag = '1', use_status = '2',cancel_remark = #{cancelRemark}
where enterprise_code = #{enterpriseCode}
</update>
<update id="cancelSysCustomerById" parameterType="Long">
update sys_customer set del_flag = '1' where id = #{id}
</update>

58
ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderMapper.xml

@ -146,6 +146,64 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where sales_order_code = #{salesOrderCode}
</select>
<select id="selectSysSalesOrderListByCodes" parameterType="String" resultMap="SysSalesOrderResult">
<include refid="selectSysSalesOrderVo"/>
where sales_order_code in
<foreach item="salesOrderCode" index="index" collection="array" open="(" separator="," close=")">
#{salesOrderCode}
</foreach>
</select>
<select id="selectSysSalesOrderAllList" parameterType="SysSalesOrderVo" resultMap="SysSalesOrderResult">
select s.sales_order_id, s.use_status, s.audit_status, s.make_status, s.delivery_status,
s.close_status, s.sales_order_code, s.sales_order_number, s.sales_order_type,s.enterprise_code,
s.customer_purser,s.common_currency,s.enterprise_name,s.enterprise_material_no, s.material_sum, s.enterprise_sum,
s.noRmbPrice, s.noRmbSum, s.rmbPrice, s.rmbTaxSum,s.noUsdPrice, s.noUsdSum, s.usdPrice, s.usdTaxSum,
s.payment_terms, s.delivery_time,s.delivery_conditions, s.delivery_method, s.delivery_address,s.delivery_phone,
s.customer_delivery,s.order_receiving_mode,s.order_receiving_time,s.customer_contact, s.contact_number,s.contact_email, s.contact_post,
s.customer_fax,s.business_members, s.confirm_tax, s.tax_rate, s.usd_tax,s.invoice,s.total_amount, s.billing_time,
s.modification_time,s.standby_one,s.standby_two, s.first_add_time,s.update_info_time, s.file_upload, s.create_by,
s.create_time, s.update_by, s.update_time, s.remark,s.out_bound_quantity, s.un_bound_quantity, s.trade_clause,
s.instance_id, s.instance_type,s.submit_instance_id, s.cancel_instance_id, s.restore_instance_id, s.apply_title, s.apply_user,
s.apply_time,p.dict_value as instance_type_name
from sys_sales_order as s
left join(
select dict_value,dict_label from sys_dict_data
where dict_type = 'processType'
) as p
on s.instance_type = p.dict_value
<where>
<if test="createBy != null and createBy !=''"> and s.create_by = #{createBy}</if>
<if test="salesOrderCode != null and salesOrderCode != ''"> and s.sales_order_code like concat('%', #{salesOrderCode}, '%')</if>
<if test="salesOrderNumber != null and salesOrderNumber != ''"> and s.sales_order_number like concat('%', #{salesOrderNumber}, '%')</if>
<if test="enterpriseCode != null and enterpriseCode != ''"> and s.enterprise_code like concat('%', #{enterpriseCode}, '%')</if>
<if test="enterpriseName != null and enterpriseName != ''"> and s.enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="enterpriseMaterialNo != null and enterpriseMaterialNo != ''"> and s.enterprise_material_no like concat('%', #{enterpriseMaterialNo}, '%')</if>
<if test="customerContact != null and customerContact != ''"> and s.customer_contact = #{customerContact}</if>
<if test="contactNumber != null and contactNumber != ''"> and s.contact_number = #{contactNumber}</if>
<if test="businessMembers != null and businessMembers != ''"> and s.business_members = #{businessMembers}</if>
<if test="useStatus != null and useStatus != ''"> and s.use_status = #{useStatus}</if>
<if test="auditStatus != null and auditStatus != ''"> and s.audit_status = #{auditStatus}</if>
<if test="makeStatus != null and makeStatus != ''"> and s.make_status = #{makeStatus}</if>
<if test="deliveryStatus != null and deliveryStatus != ''"> and s.delivery_status = #{deliveryStatus}</if>
<if test="closeStatus != null and closeStatus != ''"> and s.close_status = #{closeStatus}</if>
<if test="invoice != null and invoice != ''"> and s.invoice = #{invoice}</if>
<if test="instanceType != null and instanceType != ''"> and s.instance_type = #{instanceType}</if>
<if test="instanceId != null and instanceId != ''"> and s.instance_id = #{instanceId}</if>
<if test="applyUser != null and applyUser != ''"> and s.apply_user = #{applyUser}</if>
<if test="applyTime != null and applyTime != ''"> and s.apply_time = #{applyTime}</if>
<if test="applyTitle != null and applyTitle != ''"> and s.apply_title = #{applyTitle}</if>
<if test="applyUsers != null and applyUsers != ''"> and s.apply_user in
<foreach item="user" index="index" collection="applyUsers" open="(" separator="," close=")">
#{user}
</foreach>
</if>
</where>
order by s.audit_status,s.create_time desc
</select>
<insert id="insertSysSalesOrder" parameterType="SysSalesOrder" useGeneratedKeys="true" keyProperty="salesOrderId">
insert into sys_sales_order
<trim prefix="(" suffix=")" suffixOverrides=",">

32
ruoyi-admin/src/main/resources/templates/system/customer/cancel.html

@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('作废')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal" id="form-customer-cancel" th:object="${sysCustomer}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">作废理由:</label>
<div class="col-sm-8">
<textarea name="cancelRemark" th:field="*{cancelRemark}" class="form-control" required></textarea>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/customer";
$("#form-customer-cancel").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/cancel", $('#form-customer-cancel').serialize());
}
}
</script>
</body>
</html>

78
ruoyi-admin/src/main/resources/templates/system/customer/customer.html

@ -160,47 +160,83 @@
<input name="id" id="customerContactsId" class="form-control">
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">客户代码:</label>
<div class="col-sm-8">
<label class="col-sm-6 control-label is-required">客户代码:</label>
<div class="col-sm-6">
<input name="enterpriseCode" class="form-control" type="text" readonly required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">客户名称:</label>
<div class="col-sm-8">
<label class="col-sm-6 control-label is-required">客户名称:</label>
<div class="col-sm-6">
<input name="enterpriseName" class="form-control" type="text" readonly required>
</div>
</div>
<div class="form-group" >
<label class="col-sm-6 control-label is-required is-required" >客户第一联系人</label>
<div class="form-group">
<label class="col-sm-6 control-label is-required">姓名</label>
<div class="col-sm-6">
<input name="customerContact" class="form-control" type="text" required>
<input name="customerName" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">第一联系人职务:</label>
<label class="col-sm-6 control-label">职务:</label>
<div class="col-sm-6">
<input name="customerPosition" class="form-control" type="text">
</div>
</div>
<div class="form-group" hidden>
<label class="col-sm-6 control-label">生日:</label>
<div class="col-sm-6">
<input name="customerOffice" class="form-control" type="text">
<input name="customerBirthday" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label is-required">第一联系人电话:</label>
<label class="col-sm-6 control-label">办公电话:</label>
<div class="col-sm-6">
<input name="customerPhone" class="form-control" type="text" required>
<input name="officeTelephone" class="form-control" type="text">
</div>
</div>
<div class="form-group" hidden>
<label class="col-sm-6 control-label">家中电话:</label>
<div class="col-sm-6">
<input name="homePhone" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">第一联系人邮箱:</label>
<label class="col-sm-6 control-label">手机号</label>
<div class="col-sm-6">
<input name="customerEmail" class="form-control" type="text">
<input name="cellPhone" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">第一联系人传真:</label>
<label class="col-sm-6 control-label">传真:</label>
<div class="col-sm-6">
<input name="customerFax" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">备用电话1:</label>
<div class="col-sm-6">
<input name="standbyTelephoneOne" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">备用电话2:</label>
<div class="col-sm-6">
<input name="standbyTelephoneTwo" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">常用Email:</label>
<div class="col-sm-6">
<input name="commonEmail" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">备用Email:</label>
<div class="col-sm-6">
<input name="alternateEmail" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">备注:</label>
<div class="col-sm-6">
@ -510,14 +546,14 @@
if (value == null) {return " ";} else { return value;}
}
},
{title: '上次修改时间',field: 'updateInfoTime',},
{title: '上次修改时间',field: 'updateTime',},
{title: '操作',align: 'center',
formatter: function(value, row, index) {
var actions = [];
// 审核状态-审核通过 使用状态-是 未发起作废流程
if((row.auditStatus=="1" || row.auditStatus=="2") && !row.cancelInstanceId){
// 作废
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i> 作废</a>');
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i> 作废</a>');
// 编辑
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
}else{
@ -602,6 +638,16 @@
});
});
//作废
function cancel(id) {
$.modal.confirm("确认要作废该客户资料吗?", function () {
var url = prefix + '/cancel/' + id;
$.modal.open("作废", url);
})
}
//导出
function exportCustomerInfo() {
// rows为选中行的id

18
ruoyi-admin/src/main/resources/templates/system/customer/taskModifyApply.html

@ -262,27 +262,27 @@
shiro:haspermission="customer:selectBusinessMembers"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">是否作废:</label>
<div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<label th:for="${'useStatus_' + dict.dictCode}" th:text="${dict.dictLabel}" th:field="*{useStatus}"></label>
<input type="radio" name="useStatus" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">客户标识:</label>
<div class="col-sm-6">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_customer_sign')}">
<label th:for="${'customerSign_' + dict.dictCode}" th:text="${dict.dictLabel}" th:field="*{customerSign}"></label>
<input type="radio" name="customerSign" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled />
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">备注内容:</label>
<div class="col-sm-6">
<textarea th:field="*{customerRemarks}" name="customerRemarks" class="form-control"></textarea>
<textarea name="customerRemarks" th:text="*{customerRemarks}" class="form-control" readonly></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">作废理由:</label>
<div class="col-sm-6">
<textarea name="cancelRemark" th:text="*{cancelRemark}" class="form-control"></textarea>
</div>
</div>
<br/>
<div class="form-group">
<label class="col-sm-6 control-label is-required" for="reApply">是否继续申请:</label>
<div class="col-sm-6">

26
ruoyi-admin/src/main/resources/templates/system/customer/taskYwjlVerify.html

@ -270,28 +270,29 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">是否作废:</label>
<div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<label th:for="${'useStatus_' + dict.dictCode}" th:text="${dict.dictLabel}" th:field="*{useStatus}"></label>
<input type="radio" name="useStatus" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled>
<label class="col-sm-6 control-label">客户标识:</label>
<div class="col-sm-6">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_customer_sign')}">
<label th:for="${'customerSign_' + dict.dictCode}" th:text="${dict.dictLabel}" th:field="*{customerSign}"></label>
<input type="radio" name="customerSign" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled />
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">客户标识:</label>
<div class="radio-box" th:each="dict : ${@dict.getType('sys_customer_sign')}">
<label th:for="${'customerSign_' + dict.dictCode}" th:text="${dict.dictLabel}" th:field="*{customerSign}"></label>
<input type="radio" name="customerSign" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled />
<label class="col-sm-6 control-label">备注内容:</label>
<div class="col-sm-6">
<textarea name="customerRemarks" th:text="*{customerRemarks}" class="form-control" readonly></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">备注内容</label>
<label class="col-sm-6 control-label">作废理由</label>
<div class="col-sm-6">
<textarea name="customerRemarks" class="form-control" readonly></textarea>
<textarea name="cancelRemark" th:text="*{cancelRemark}" class="form-control"></textarea>
</div>
</div>
<br/>
<div class="form-group">
<label class="col-sm-3 control-label is-required" for="ywjlVerifyApproved">审批意见:</label>
<label class="col-sm-6 control-label is-required" for="ywjlVerifyApproved">审批意见:</label>
<div class="col-sm-6">
<select name="p_B_ywjlVerifyApproved" id="ywjlVerifyApproved" class="form-control" required>
<option value=""></option>
@ -306,6 +307,7 @@
<textarea name="comment" class="form-control"></textarea>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />

18
ruoyi-admin/src/main/resources/templates/system/customer/taskYwzgVerify.html

@ -269,27 +269,27 @@
<input name="businessMembers" class="form-control m-b" th:field="*{businessMembers}" readonly/>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">是否作废:</label>
<div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<label th:for="${'useStatus_' + dict.dictCode}" th:text="${dict.dictLabel}" th:field="*{useStatus}"></label>
<input type="radio" name="useStatus" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">客户标识:</label>
<div class="col-sm-6">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_customer_sign')}">
<label th:for="${'customerSign_' + dict.dictCode}" th:text="${dict.dictLabel}" th:field="*{customerSign}"></label>
<input type="radio" name="customerSign" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled />
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">备注内容:</label>
<div class="col-sm-6">
<textarea name="customerRemarks" class="form-control" readonly></textarea>
<textarea name="customerRemarks" th:text="*{customerRemarks}" class="form-control" readonly></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">作废理由:</label>
<div class="col-sm-6">
<textarea name="cancelRemark" th:text="*{cancelRemark}" class="form-control" readonly></textarea>
</div>
</div>
<br />
<div class="form-group">
<label class="col-sm-6 control-label" for="ywzgVerifyApproved"><span style="color: red; ">*</span>审批意见:</label>
<div class="col-sm-6">

17
ruoyi-admin/src/main/resources/templates/system/customer/taskZozjVerify.html

@ -268,24 +268,25 @@
<input name="businessMembers" class="form-control m-b" th:field="*{businessMembers}" readonly />
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">是否作废:</label>
<div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<label th:for="${'useStatus_' + dict.dictCode}" th:text="${dict.dictLabel}" th:field="*{useStatus}"></label>
<input type="radio" name="useStatus" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">客户标识:</label>
<div class="col-sm-6">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_customer_sign')}">
<label th:for="${'customerSign_' + dict.dictCode}" th:text="${dict.dictLabel}" th:field="*{customerSign}"></label>
<input type="radio" name="customerSign" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled />
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">备注内容:</label>
<div class="col-sm-6">
<textarea name="customerRemarks" class="form-control" readonly></textarea>
<textarea name="customerRemarks" th:text="*{customerRemarks}" class="form-control" readonly></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">作废理由:</label>
<div class="col-sm-6">
<textarea name="cancelRemark" th:text="*{cancelRemark}" class="form-control" readonly></textarea>
</div>
</div>
<div class="form-group">

66
ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html

@ -185,11 +185,12 @@
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-warning" onclick="exportSalesOrder()" shiro:hasPermission="system:salesOrder:exportSalesOrder">
<a class="btn btn-warning" onclick="exportExcel()" shiro:hasPermission="system:salesOrder:export">
<i class="fa fa-download"></i> 导出
</a>
<a class="btn btn-warning" onclick="exportSalesOrder()" shiro:hasPermission="system:salesOrder:exportSalesOrder">
<i class="fa fa-download"></i> 导出销售订单
</a>
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:salesOrder:add">
<i class="fa fa-plus"></i> 添加
</a>
@ -452,6 +453,65 @@
}
// 导出
function exportExcel(formId) {
// $.table.set();
var salesOrderCodeData = [];
var selections = $("#bootstrap-table").bootstrapTable("getSelections");
if(selections.length === 0){
$.modal.confirm("确定导出所有出货通知吗?", function() {
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
var params = $("#bootstrap-table").bootstrapTable('getOptions');
var dataParam = $("#" + currentId).serializeArray();
dataParam.push({ "name": "orderByColumn", "value": params.sortName });
dataParam.push({ "name": "isAsc", "value": params.sortOrder });
$.modal.loading("正在导出数据,请稍后...");
$.post(prefix + '/exportAll', dataParam, function(result) {
if (result.code == web_status.SUCCESS) {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
} else if (result.code == web_status.WARNING) {
$.modal.alertWarning(result.msg)
} else {
$.modal.alertError(result.msg);
}
$.modal.closeLoading();
});
});
}else {
$.modal.confirm("确定导出选中的所有出货通知吗?", function () {
//·拼接单号
for(let i=0;i<selections.length;i++){
salesOrderCodeData.push(selections[i].salesOrderCode);
}
var salesOrderCodes = JSON.stringify(salesOrderCodeData);
// console.log(bomNos);
$.modal.loading("正在导出数据,请稍后...");
var config = {
url: prefix + '/export',
type: "post",
dataType: "json",
contentType: "application/json;charset=utf-8",
data: salesOrderCodes,
success: function(result) {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
$.modal.alertSuccess("导出成功!")
$.modal.closeLoading();
},
error: function (result){
$.modal.alertError(result.msg);
}
};
$.ajax(config)
});
}
};
/*旧导出销售订单模板*/
// function exportSalesOrder(){
//

11
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java

@ -35,6 +35,9 @@ public class BaseEntity implements Serializable
/** 备注 */
private String remark;
/** 作废理由*/
private String cancelRemark;
/** 请求参数 */
private Map<String, Object> params;
@ -98,6 +101,14 @@ public class BaseEntity implements Serializable
this.remark = remark;
}
public String getCancelRemark() {
return cancelRemark;
}
public void setCancelRemark(String cancelRemark) {
this.cancelRemark = cancelRemark;
}
public Map<String, Object> getParams()
{
if (params == null)

Loading…
Cancel
Save