Browse Source

修改:采购订单添加审核实体类型,修改查询方法SQL返回类型为新增SysSupplierVo类型。

dev
zhangsiqi 4 months ago
parent
commit
f9ce85d192
  1. 6
      ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseOrderController.java
  2. 6
      ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseOrderMapper.java
  3. 7
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseOrderService.java
  4. 123
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java
  5. 100
      ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderMapper.xml
  6. 16
      ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/add.html
  7. 156
      ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/edit.html
  8. 2
      ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/purchaseOrder.html

6
ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseOrderController.java

@ -114,7 +114,7 @@ public class PurchaseOrderController extends BaseController
{
// 采购角色只能看到自己创建的数据
startPage();
List<PurchaseOrder> list = purchaseOrderService.selectPurchaseOrderList(purchaseOrder);
List<PurchaseOrderVo> list = purchaseOrderService.selectPurchaseOrderList(purchaseOrder);
return getDataTable(list);
}
@ -128,8 +128,8 @@ public class PurchaseOrderController extends BaseController
@ResponseBody
public AjaxResult export(PurchaseOrder purchaseOrder)
{
List<PurchaseOrder> list = purchaseOrderService.selectPurchaseOrderList(purchaseOrder);
ExcelUtil<PurchaseOrder> util = new ExcelUtil<PurchaseOrder>(PurchaseOrder.class);
List<PurchaseOrderVo> list = purchaseOrderService.selectPurchaseOrderList(purchaseOrder);
ExcelUtil<PurchaseOrderVo> util = new ExcelUtil<PurchaseOrderVo>(PurchaseOrderVo.class);
return util.exportExcel(list, "采购订单数据");
}

6
ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseOrderMapper.java

@ -19,7 +19,7 @@ public interface PurchaseOrderMapper
* @param purchaseOrderId 采购订单ID
* @return 采购订单
*/
public PurchaseOrder selectPurchaseOrderById(Long purchaseOrderId);
public PurchaseOrderVo selectPurchaseOrderById(Long purchaseOrderId);
/**
* 查询采购订单列表
@ -27,7 +27,7 @@ public interface PurchaseOrderMapper
* @param purchaseOrder 采购订单
* @return 采购订单集合
*/
public List<PurchaseOrder> selectPurchaseOrderList(PurchaseOrder purchaseOrder);
public List<PurchaseOrderVo> selectPurchaseOrderList(PurchaseOrder purchaseOrder);
/**
* 新增采购订单
@ -62,7 +62,7 @@ public interface PurchaseOrderMapper
public int deletePurchaseOrderByIds(String[] purchaseOrderIds);
//查询关联类型为生产订单的采购订单列表
public List<PurchaseOrderVo> selectOrderByIdDesc();
public List<PurchaseOrder> selectOrderByIdDesc();
//根据采购订单编号查询采购订单
PurchaseOrder selectPurchaseOrderByOrderCode(String purchaseOrderCode);

7
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseOrderService.java

@ -1,6 +1,7 @@
package com.ruoyi.purchase.service;
import com.ruoyi.purchase.domain.PurchaseOrder;
import com.ruoyi.purchase.domain.PurchaseOrderVo;
import com.ruoyi.warehouse.domain.WarehouseStorageOrder;
import org.activiti.engine.runtime.ProcessInstance;
import org.springframework.transaction.annotation.Transactional;
@ -29,7 +30,7 @@ public interface IPurchaseOrderService
* @param purchaseOrder 采购订单
* @return 采购订单集合
*/
public List<PurchaseOrder> selectPurchaseOrderList(PurchaseOrder purchaseOrder);
public List<PurchaseOrderVo> selectPurchaseOrderList(PurchaseOrder purchaseOrder);
/**
* 新增采购订单
@ -79,7 +80,7 @@ public interface IPurchaseOrderService
ProcessInstance submitApply(PurchaseOrder purchaseOrder);
@Transactional(rollbackFor = Exception.class)
ProcessInstance cancelPurchaseOrderById(Long id);
public ProcessInstance cancelPurchaseOrderById(Long id);
ProcessInstance restorePurchaseOrderById(Long id);
public ProcessInstance restorePurchaseOrderById(Long id);
}

123
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java

@ -3,22 +3,24 @@ package com.ruoyi.purchase.service.impl;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.exception.BusinessException;
import com.ruoyi.common.service.ICommonService;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.financial.domain.FinancialAccountsPayable;
import com.ruoyi.financial.service.IFinancialAccountsPayableService;
import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper;
import com.ruoyi.purchase.domain.PurchaseOrder;
import com.ruoyi.purchase.domain.PurchaseOrderChild;
import com.ruoyi.purchase.domain.PurchaseOrderVo;
import com.ruoyi.purchase.domain.PurchasePlan;
import com.ruoyi.purchase.mapper.PurchaseOrderChildMapper;
import com.ruoyi.purchase.mapper.PurchaseOrderMapper;
import com.ruoyi.purchase.mapper.PurchasePlanMapper;
import com.ruoyi.purchase.service.IPurchaseOrderService;
import com.ruoyi.system.domain.SysSupplier;
import com.ruoyi.system.domain.Vo.SysSupplierVo;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.ISysAttachFileService;
import com.ruoyi.system.service.ISysAttachService;
@ -124,7 +126,7 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
* @return 采购订单
*/
@Override
public List<PurchaseOrder> selectPurchaseOrderList(PurchaseOrder purchaseOrder)
public List<PurchaseOrderVo> selectPurchaseOrderList(PurchaseOrder purchaseOrder)
{
return purchaseOrderMapper.selectPurchaseOrderList(purchaseOrder);
}
@ -490,7 +492,7 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
//每当当前供应商完成一次循环,生成一条供应商应付账款
SysSupplier sysSupplier = new SysSupplier();
sysSupplier.setSupplierCode(purchaseOrderChild.getSupplierCode());
List<SysSupplier> sysSupplierList = sysSupplierService.selectSysSupplierList(sysSupplier);
List<SysSupplierVo> sysSupplierList = sysSupplierService.selectSysSupplierList(sysSupplier);
int supplierListSize = sysSupplierList.size();
if(supplierListSize == 0){
continue;
@ -525,6 +527,7 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
return 1; // 返回成功标识
}
@Transactional(rollbackFor = Exception.class)
@Override
public ProcessInstance submitApply(PurchaseOrder purchaseOrder) {
SysUser user = ShiroUtils.getSysUser();
purchaseOrder.setApplyUser(user.getLoginName());
@ -549,69 +552,61 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
return processInstance;
}
@Override
@Transactional(rollbackFor = Exception.class)
public ProcessInstance cancelPurchaseOrderById(Long id) {
return null;
PurchaseOrderVo purchaseOrderVo = purchaseOrderMapper.selectPurchaseOrderById(id);
// 审核状态-待审核
purchaseOrderVo.setAuditStatus("0");
SysUser user = ShiroUtils.getSysUser();
// 启动流程
String applyTitle = user.getUserName()+"发起了物料信息作废审批-"+DateUtils.dateTimeNow();
String instanceType = "cancel";
PurchaseOrder purchaseOrder = new PurchaseOrder();
BeanUtils.copyProperties(purchaseOrderVo,purchaseOrder);
ProcessInstance processInstance = startProcessInstance(applyTitle,instanceType,purchaseOrder, user);
String processInstanceId = processInstance.getProcessInstanceId();
// 作废实例id
purchaseOrder.setCancelInstanceId(processInstanceId);
// 存在提交完就流程结束的情况
boolean processIsFinish = processService.judgeProcessIsFinish(processInstanceId);
if(processIsFinish){
// 审核状态-审核通过
purchaseOrder.setAuditStatus("1");
// 使用状态-已作废
purchaseOrder.setUseStatus("2");
}
purchaseOrderMapper.updatePurchaseOrder(purchaseOrder);
return processInstance;
}
@Override
public ProcessInstance restorePurchaseOrderById(Long id) {
return null;
PurchaseOrderVo purchaseOrderVo = purchaseOrderMapper.selectPurchaseOrderById(id);
// 审核状态-待审核
purchaseOrderVo.setAuditStatus("0");
SysUser user = ShiroUtils.getSysUser();
// 启动流程
String applyTitle = user.getUserName()+"发起了物料信息恢复审批-"+DateUtils.dateTimeNow();
String instanceType = "restore";
PurchaseOrder purchaseOrder = new PurchaseOrder();
BeanUtils.copyProperties(purchaseOrderVo,purchaseOrder);
ProcessInstance processInstance = startProcessInstance(applyTitle,instanceType,purchaseOrder, user);
String processInstanceId = processInstance.getProcessInstanceId();
// 恢复实例id
purchaseOrder.setRestoreInstanceId(processInstanceId);
// 存在提交完就流程结束的情况
boolean processIsFinish = processService.judgeProcessIsFinish(processInstanceId);
if(processIsFinish){
// 审核状态-审核通过
purchaseOrder.setAuditStatus("1");
// 使用状态-是
purchaseOrder.setUseStatus("1");
}
purchaseOrderMapper.updatePurchaseOrder(purchaseOrder);
return processInstance;
}
// @Override
// @Transactional(rollbackFor = Exception.class)
// public ProcessInstance cancelPurchaseOrderById(Long id) {
// PurchaseOrderVo purchaseOrderVo = purchaseOrderMapper.selectPurchaseOrderById(id);
// // 审核状态-待审核
// purchaseOrderVo.setAuditStatus("0");
// SysUser user = ShiroUtils.getSysUser();
// // 启动流程
// String applyTitle = user.getUserName()+"发起了物料信息作废审批-"+DateUtils.dateTimeNow();
// String instanceType = "cancel";
// PurchaseOrder purchaseOrder = new PurchaseOrder();
// BeanUtils.copyProperties(purchaseOrderVo,purchaseOrder);
// ProcessInstance processInstance = startProcessInstance(applyTitle,instanceType,purchaseOrder, user);
// String processInstanceId = processInstance.getProcessInstanceId();
// // 作废实例id
// purchaseOrder.setCancelInstanceId(processInstanceId);
// // 存在提交完就流程结束的情况
// boolean processIsFinish = processService.judgeProcessIsFinish(processInstanceId);
// if(processIsFinish){
// // 审核状态-审核通过
// purchaseOrder.setAuditStatus("1");
// // 使用状态-已作废
// purchaseOrder.setUseStatus("2");
// }
// purchaseOrderMapper.updatePurchaseOrder(purchaseOrder);
// return processInstance;
// }
// @Override
// public ProcessInstance restorePurchaseOrderById(Long id) {
// PurchaseOrderVo purchaseOrderVo = purchaseOrderMapper.selectPurchaseOrderById(id);
// // 审核状态-待审核
// purchaseOrderVo.setAuditStatus("0");
// SysUser user = ShiroUtils.getSysUser();
// // 启动流程
// String applyTitle = user.getUserName()+"发起了物料信息恢复审批-"+DateUtils.dateTimeNow();
// String instanceType = "restore";
// PurchaseOrder purchaseOrder = new PurchaseOrder();
// BeanUtils.copyProperties(purchaseOrderVo,purchaseOrder);
// ProcessInstance processInstance = startProcessInstance(applyTitle,instanceType,purchaseOrder, user);
// String processInstanceId = processInstance.getProcessInstanceId();
// // 恢复实例id
// purchaseOrder.setRestoreInstanceId(processInstanceId);
// // 存在提交完就流程结束的情况
// boolean processIsFinish = processService.judgeProcessIsFinish(processInstanceId);
// if(processIsFinish){
// // 审核状态-审核通过
// purchaseOrder.setAuditStatus("1");
// // 使用状态-是
// purchaseOrder.setUseStatus("1");
// }
// purchaseOrderMapper.updatePurchaseOrder(purchaseOrder);
// return processInstance;
// }
private ProcessInstance startProcessInstance(String applyTitle, String instanceType, PurchaseOrder purchaseOrder, SysUser user) {
Long materialId = purchaseOrder.getPurchaseOrderId();
String businessKey = materialId.toString(); // 实体类 ID,作为流程的业务 key
@ -632,15 +627,7 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
private void buildAuthority(SysUser user, Map<String, Object> variables) {
Set<String> roleKeys = roleService.selectRoleKeys(user.getUserId());
// 角色不同审核人不同
if(roleKeys.contains("fzjlRole") || roleKeys.contains("admin")){
variables.put("authority",4);
}else if(roleKeys.contains("cgzgRole")){
variables.put("authority",3);
}else if(roleKeys.contains("cgjlRole")){
variables.put("authority",2);
}else if(roleKeys.contains("cgyRole")){
variables.put("authority",1);
}
}
}

100
ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderMapper.xml

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.purchase.mapper.PurchaseOrderMapper">
<resultMap type="PurchaseOrder" id="PurchaseOrderResult">
<resultMap type="PurchaseOrderVo" id="PurchaseOrderResult">
<result property="purchaseOrderId" column="purchase_order_id" />
<result property="purchaseOrderCode" column="purchase_order_code" />
<result property="purchaseBuyer" column="purchase_buyer" />
@ -49,6 +49,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="instanceId" column="instance_id" />
<result property="instanceType" column="instance_type" />
<result property="instanceTypeName" column="instance_type_name" />
<result property="submitInstanceId" column="submit_instance_id" />
<result property="cancelInstanceId" column="cancel_instance_id" />
<result property="restoreInstanceId" column="restore_instance_id" />
<result property="applyTitle" column="apply_title" />
<result property="applyUser" column="apply_user" />
<result property="applyTime" column="apply_time" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectPurchaseOrderVo">
@ -60,28 +70,55 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
purchase_category, purchase_commander, customer_order_number, remark_content,
close_case_no, close_case_name, close_case_time,confirm_no,confirm_time,confirm_name,
del_flag, stock_no, stock_name, stock_address, stock_contact, stock_phone,
approve_time, standby_one, standby_two,
create_time, create_by, update_time, update_by from purchase_order
approve_time, standby_one, standby_two,create_time, create_by, update_time, update_by,
instance_id, instance_type, instance_type_name, submit_instance_id, cancel_instance_id,
restore_instance_id, apply_title, apply_user, apply_time
from purchase_order
</sql>
<select id="selectPurchaseOrderList" parameterType="PurchaseOrder" resultMap="PurchaseOrderResult">
<include refid="selectPurchaseOrderVo"/>
select pur.purchase_order_id, pur.purchase_order_code, pur.supplier_code, pur.supplier_name,
pur.arrived_time, pur.eceipt_type, pur.eceipt_status, pur.payment_status, pur.supplier_num, pur.material_amount,
pur.material_sum, pur.noRmbSum, pur.rmbSum, pur.use_status, pur.audit_status, pur.purchase_buyer,
pur.customer_contact, pur.contact_number, pur.customer_fax, pur.delivery_address, pur.payment_terms,
pur.delivery_conditions, pur.delivery_method, pur.purchase_name, pur.billing_date, pur.tax_rate,
pur.purchase_category, pur.purchase_commander, pur.customer_order_number, pur.remark_content,
pur.close_case_no, pur.close_case_name, pur.close_case_time, pur.del_flag, pur.stock_no, pur.stock_name,
pur.stock_address, pur.stock_contact, pur.stock_phone, pur.create_time, pur.create_by, pur.update_time, pur.update_by,
pur.instance_id, pur.instance_type, p.dict_label as instance_type_name, pur.submit_instance_id, pur.cancel_instance_id,
pur.restore_instance_id, pur.apply_title, pur.apply_user, pur.apply_time
from purchase_order as pur
left join(
select dict_value,dict_label from sys_dict_data
where dict_type = 'processType'
) as p
on pur.instance_type = p.dict_value
<where>
del_flag = '0'
<if test="purchaseOrderCode != null and purchaseOrderCode != ''"> and purchase_order_code like concat('%', #{purchaseOrderCode}, '%')</if>
<if test="purchaseBuyer != null and purchaseBuyer != ''"> and purchase_buyer = #{purchaseBuyer}</if>
pur.del_flag = '0'
<if test="purchaseOrderCode != null and purchaseOrderCode != ''"> and pur.purchase_order_code like concat('%', #{purchaseOrderCode}, '%')</if>
<if test="purchaseBuyer != null and purchaseBuyer != ''"> and pur.purchase_buyer = #{purchaseBuyer}</if>
<if test="supplierCode != null and supplierCode != ''">
and purchase_order_code in ( select purchase_order_code from purchase_order_child where supplier_code = #{supplierCode})
and pur.purchase_order_code in ( select purchase_order_code from purchase_order_child where supplier_code = #{supplierCode})
</if>
<if test="supplierName != null and supplierName != ''">
and purchase_order_code in ( select purchase_order_code from purchase_order_child where supplier_name = #{supplierName})
and pur.purchase_order_code in ( select purchase_order_code from purchase_order_child where supplier_name = #{supplierName})
</if>
<if test="useStatus != null and useStatus != ''">and pur.use_status = #{useStatus}</if>
<if test="eceiptStatus != null and eceiptStatus !='' ">and pur.eceipt_status = #{eceiptStatus}</if>
<if test="paymentStatus != null and paymentStatus != '' ">and pur.payment_status = #{paymentStatus}</if>
<if test="instanceId != null and instanceId != ''"> and pur.instance_id = #{instanceId}</if>
<if test="instanceType != null and instanceType != ''"> and pur.instance_type = #{instanceType}</if>
<if test="submitInstanceId != null and submitInstanceId != ''"> and pur.submit_instance_id = #{submitInstanceId}</if>
<if test="cancelInstanceId != null and cancelInstanceId != ''"> and pur.cancel_instance_id = #{cancelInstanceId}</if>
<if test="restoreInstanceId != null and restoreInstanceId != ''"> and pur.restore_instance_id = #{restoreInstanceId}</if>
<if test="applyTitle != null and applyTitle != ''"> and pur.apply_title = #{applyTitle}</if>
<if test="applyUser != null and applyUser != ''"> and pur.apply_user = #{applyUser}</if>
<if test="applyTime != null "> and pur.apply_time = #{applyTime}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
and pur.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if>
<if test="useStatus != null and useStatus != ''">and use_status = #{useStatus}</if>
<if test="eceiptStatus != null and eceiptStatus !='' ">and eceipt_status = #{eceiptStatus}</if>
<if test="paymentStatus != null and paymentStatus != '' ">and payment_status = #{paymentStatus}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
</where>
order by purchase_order_id desc
order by pur.create_time desc
</select>
<select id="selectPurchaseOrderById" parameterType="Long" resultMap="PurchaseOrderResult">
@ -126,6 +163,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="rmbSum != null">rmbSum,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="instanceId != null">instance_id,</if>
<if test="instanceType != null">instance_type,</if>
<if test="submitInstanceId != null">submit_instance_id,</if>
<if test="cancelInstanceId != null">cancel_instance_id,</if>
<if test="restoreInstanceId != null">restore_instance_id,</if>
<if test="applyTitle != null">apply_title,</if>
<if test="applyUser != null">apply_user,</if>
<if test="applyTime != null">apply_time,</if>
<if test="auditUser != null">audit_user,</if>
<if test="delFlag != null" >del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
@ -163,6 +209,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="rmbSum != null">#{rmbSum},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="instanceId != null">#{instanceId},</if>
<if test="instanceType != null">#{instanceType},</if>
<if test="submitInstanceId != null">#{submitInstanceId},</if>
<if test="cancelInstanceId != null">#{cancelInstanceId},</if>
<if test="restoreInstanceId != null">#{restoreInstanceId},</if>
<if test="applyTitle != null">#{applyTitle},</if>
<if test="applyUser != null">#{applyUser},</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="delFlag != null" >#{delFlag},</if>
</trim>
</insert>
@ -208,8 +262,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialSum != null">material_sum = #{materialSum},</if>
<if test="noRmbSum != null">noRmbSum = #{noRmbSum},</if>
<if test="rmbSum != null">rmbSum = #{rmbSum},</if>
<if test="createBy != null">create_by= #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime !=null">update_time = #{updateTime},</if>
<if test="updateBy !=null">update_by = #{updateBy},</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>
<if test="cancelInstanceId != null">cancel_instance_id = #{cancelInstanceId},</if>
<if test="restoreInstanceId != null">restore_instance_id = #{restoreInstanceId},</if>
<if test="applyTitle != null">apply_title = #{applyTitle},</if>
<if test="applyUser != null">apply_user = #{applyUser},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where purchase_order_id = #{purchaseOrderId}
</update>
@ -240,4 +305,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where purchase_order_code = #{purchaseOrderCode}
</select>
<delete id="deleteSysCustomerQuoteByIds" parameterType="String">
update sys_customer_quote set use_status = '1' sys_customer_quote where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

16
ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/add.html

@ -170,22 +170,6 @@
</select>
</div>
</div>
<div class="form-group hidden">
<label class="col-sm-3 control-label">核准否:</label>
<div class="col-sm-8">
<select name="approveNo" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group hidden">
<label class="col-sm-3 control-label">对账否:</label>
<div class="col-sm-8">
<select name="accountReconciliationFlag" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<!-- <div class="form-group"> -->
<!-- <label class="col-sm-3 control-label">备用一:</label>-->
<!-- <div class="col-sm-8">-->

156
ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/edit.html

@ -55,142 +55,37 @@
<input name="supplierName" th:field="*{supplierName}" class="form-control" type="text" required readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系人:</label>
<div class="col-sm-8">
<input name="customerContact" th:field="*{customerContact}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系电话:</label>
<div class="col-sm-8">
<input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">传真号码:</label>
<div class="col-sm-8">
<input name="customerFax" th:field="*{customerFax}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交货地点:</label>
<div class="col-sm-8">
<input name="deliveryAddress" th:field="*{deliveryAddress}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">付款条件:</label>
<div class="col-sm-8">
<input name="paymentTerms" th:field="*{paymentTerms}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交货条件:</label>
<div class="col-sm-8">
<input name="deliveryConditions" th:field="*{deliveryConditions}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交货方式:</label>
<div class="col-sm-8">
<input name="deliveryMethod" th:field="*{deliveryMethod}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">购方名称:</label>
<div class="col-sm-8">
<input name="purchaseName" th:field="*{purchaseName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">开单日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="billingDate" th:field="*{billingDate}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<div class="form-group">
<label for="stockNo" class="col-sm-2 col-form-label">仓库ID:</label>
<div class="col-sm-4">
<select class="form-control" name="stockNo" id="stockNo" ></select>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">税率:</label>
<div class="col-sm-8">
<input name="taxRate" th:field="*{taxRate}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">订购种类:</label>
<div class="col-sm-8">
<!-- <input name="purchaseCategory" th:field="*{purchaseCategory}" class="form-control" type="text">-->
<select name="purchaseCategory" th:field="*{purchaseCategory}" class="form-control m-b" th:with="type=${@dict.getType('purchase_category')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">采购担当:</label>
<div class="col-sm-8">
<!-- <input name="purchaseCommander" th:field="*{purchaseCommander}" class="form-control" type="text">-->
<select name="purchaseCommander" th:field="*{purchaseCommander}" class="form-control m-b" required>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户订单号:</label>
<div class="col-sm-8">
<input name="customerOrderNumber" th:field="*{customerOrderNumber}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注内容:</label>
<div class="col-sm-8">
<textarea class="form-control" th:field="*{remarkContent}" name="remarkContent" type="text"></textarea>
</div>
</div>
<div class="form-group hidden">
<label class="col-sm-3 control-label">结案否:</label>
<div class="col-sm-8">
<select name="closeCaseNo" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{closeCaseNo}"></option>
</select>
<div class="form-group">
<label for="stockName" class="col-sm-2 col-form-label">仓库名称:</label>
<div class="col-sm-4">
<input type="text" class="form-control" name="stockName" id="stockName">
</div>
</div>
</div>
<div class="form-group hidden">
<label class="col-sm-3 control-label">确认否:</label>
<div class="col-sm-8">
<select name="confirmNo" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{confirmNo}"></option>
</select>
<div class="form-group">
<label for="stockContact" class="col-sm-2 col-form-label">收货人:</label>
<div class="col-sm-4">
<input type="text" name="stockContact" class="form-control" id="stockContact" >
</div>
</div>
</div>
<div class="form-group hidden">
<label class="col-sm-3 control-label">审核否:</label>
<div class="col-sm-8">
<select name="auditNo" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{auditNo}"></option>
</select>
<div class="form-group">
<label for="stockPhone" class="col-sm-2 col-form-label">收货电话:</label>
<div class="col-sm-4">
<input type="text" name="stockPhone" class="form-control" id="stockPhone" placeholder="请输入收货电话">
</div>
</div>
</div>
<div class="form-group hidden">
<label class="col-sm-3 control-label">核准否:</label>
<div class="col-sm-8">
<select name="approveNo" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{approveNo}"></option>
</select>
<div class="form-group">
<label for="stockAddress" class="col-sm-2 col-form-label">详细地址:</label>
<div class="col-sm-4">
<textarea class="form-control" name="stockAddress" id="stockAddress"></textarea>
</div>
</div>
</div>
<!-- <div class="form-group"> -->
<!-- <label class="col-sm-3 control-label">备用一:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <input name="standbyOne" th:field="*{standbyOne}" class="form-control" type="text">-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="form-group"> -->
<!-- <label class="col-sm-3 control-label">备用二:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <input name="standbyTwo" th:field="*{standbyTwo}" class="form-control" type="text">-->
<!-- </div>-->
<!-- </div>-->
</form>
</div>
<div class="other-container">
@ -269,8 +164,6 @@
<script th:inline="javascript">
var getData = [[${purchaseOrder}]];
var commonCurrencyDatas = [[${@dict.getType('sys_common_currency')}]];
var purchasingUnitDatas = [[${@dict.getType('sys_unit_class')}]];
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]];
@ -314,7 +207,6 @@
});
$(function() {
//初始化添加材料表
$('#addQuotationTable').bootstrapTable({
url: prefixPurchaseMaterial + '/list',

2
ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/purchaseOrder.html

@ -146,6 +146,7 @@
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
detailUrl: prefix + "/detail/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
clickToSelect: true,
@ -191,6 +192,7 @@
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.purchaseOrderId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.purchaseOrderId + '\')"><i class="fa fa-detail"></i>详情</a>')
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="$.modal.open(\'添加入库通知检验单\',\'' + prefix+"/addPurchaseOrderStorage/"+row.purchaseOrderCode + '\')">入库通知</a> ');
return actions.join('');
}

Loading…
Cancel
Save