Commit 30498842 by liuyang

2024-04-24 添加销售合同页面和功能

parent 8ad8df19
...@@ -383,7 +383,10 @@ public enum DdynamicEnum { ...@@ -383,7 +383,10 @@ public enum DdynamicEnum {
* 用途:工人管理下拉框 * 用途:工人管理下拉框
* 编写:wwl * 编写:wwl
*/ */
WORKER_BLOCK_ID("worker_block_id","userId","userName","HPPZ013.queryComboBox"); WORKER_BLOCK_ID("worker_block_id","userId","userName","HPPZ013.queryComboBox"),
PLAN_SALES_CODE_BLOCK_ID("planSalesCode_block_id","planSalesCode","yearMonth","HPPZ018.queryPlanSalesCode"),
;
/** 将结果集放入的块名 */ /** 将结果集放入的块名 */
......
...@@ -32,6 +32,9 @@ ...@@ -32,6 +32,9 @@
<isNotEmpty prepend=" AND " property="depCode"> <isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode# DEP_CODE = #depCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="depCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depCodes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy"> <isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy# CREATED_BY = #createdBy#
</isNotEmpty> </isNotEmpty>
...@@ -230,4 +233,24 @@ ...@@ -230,4 +233,24 @@
ID = #id# ID = #id#
</update> </update>
<select id="queryPlanSalesCode" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT
CONCAT(YEAR,MONTH) as "yearMonth",
PLAN_SALES_CODE AS "planSalesCode"
FROM ${hpjxSchema}.T_HPPZ018
WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
YEAR DESC ,MONTH DESC
</isEmpty>
</dynamic>
</select>
</sqlMap> </sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-04-23 18:29:24
Version : 1.0
schema : hpjx
tableName : T_HPPZ019
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
CONTRACT_DATE VARCHAR,
CONTRACT_CODE VARCHAR,
CONTRACT_NAME VARCHAR,
PLAN_SALES_CODE VARCHAR,
CUST_CODE VARCHAR,
CONTRACT_AMOUNT DECIMAL,
CONTRACT_STATUS TINYINT,
APPROVE_STATUS TINYINT
-->
<sqlMap namespace="HPPZ019">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depCodes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractDate">
CONTRACT_DATE = #contractDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractCode">
CONTRACT_CODE LIKE CONCAT('%', #contractCode#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractName">
CONTRACT_NAME LIKE CONCAT('%', #contractName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planSalesCode">
PLAN_SALES_CODE LIKE CONCAT('%', #planSalesCode#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custCode">
CUST_CODE = #custCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractAmount">
CONTRACT_AMOUNT = #contractAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractStatus">
CONTRACT_STATUS = #contractStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="approveStatus">
APPROVE_STATUS = #approveStatus#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ019">
SELECT
ID as "id", <!-- ID -->
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0:否1.是 -->
CONTRACT_DATE as "contractDate", <!-- 合同日期 -->
CONTRACT_CODE as "contractCode", <!-- 合同号 -->
CONTRACT_NAME as "contractName", <!-- 合同名称 -->
PLAN_SALES_CODE as "planSalesCode", <!-- 销售计划单号 -->
CUST_CODE as "custCode", <!-- 客户编码 -->
CONTRACT_AMOUNT as "contractAmount", <!-- 合同金额 -->
CONTRACT_STATUS as "contractStatus", <!-- 合同状态 -->
APPROVE_STATUS as "approveStatus" <!-- 审批状态 -->
FROM ${hpjxSchema}.T_HPPZ019 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CONTRACT_DATE DESC, CREATED_TIME DESC
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPPZ019 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractDate">
CONTRACT_DATE = #contractDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractCode">
CONTRACT_CODE = #contractCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractName">
CONTRACT_NAME = #contractName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planSalesCode">
PLAN_SALES_CODE = #planSalesCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custCode">
CUST_CODE = #custCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractAmount">
CONTRACT_AMOUNT = #contractAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractStatus">
CONTRACT_STATUS = #contractStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="approveStatus">
APPROVE_STATUS = #approveStatus#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPPZ019 (ID, <!-- ID -->
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 修改人 -->
UPDATED_NAME, <!-- 修改人名称 -->
UPDATED_TIME, <!-- 修改时间 -->
DELETE_FLAG, <!-- 是否删除0:否1.是 -->
CONTRACT_DATE, <!-- 合同日期 -->
CONTRACT_CODE, <!-- 合同号 -->
CONTRACT_NAME, <!-- 合同名称 -->
PLAN_SALES_CODE, <!-- 销售计划单号 -->
CUST_CODE, <!-- 客户编码 -->
CONTRACT_AMOUNT, <!-- 合同金额 -->
CONTRACT_STATUS, <!-- 合同状态 -->
APPROVE_STATUS <!-- 审批状态 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #contractDate#, #contractCode#, #contractName#, #planSalesCode#, #custCode#, #contractAmount#, #contractStatus#, #approveStatus#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPPZ019 WHERE
ID = #id#
</delete>
<update id="daleteFlag">
UPDATE ${hpjxSchema}.T_HPPZ019
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0:否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPPZ019
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0:否1.是 -->
CONTRACT_DATE = #contractDate#, <!-- 合同日期 -->
CONTRACT_CODE = #contractCode#, <!-- 合同号 -->
CONTRACT_NAME = #contractName#, <!-- 合同名称 -->
PLAN_SALES_CODE = #planSalesCode#, <!-- 销售计划单号 -->
CUST_CODE = #custCode#, <!-- 客户编码 -->
CONTRACT_AMOUNT = #contractAmount#, <!-- 合同金额 -->
CONTRACT_STATUS = #contractStatus#, <!-- 合同状态 -->
APPROVE_STATUS = #approveStatus# <!-- 审批状态 -->
WHERE
ID = #id#
</update>
<!--修改合同状态-->
<update id="updateContractStatus">
UPDATE ${hpjxSchema}.T_HPPZ019
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
CONTRACT_AMOUNT = #contractAmount#, <!-- 合同金额 -->
CONTRACT_STATUS = #contractStatus# <!-- 合同状态 -->
WHERE CONTRACT_CODE = #contractCode#
</update>
<!--修改审批状态-->
<update id="updateApproveStatus">
UPDATE ${hpjxSchema}.T_HPPZ019
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
APPROVE_STATUS = #approveStatus# <!-- 审批状态 -->
WHERE
ID = #id#
</update>
</sqlMap>
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/4/24
Time: 9:40
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="销售合同">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker ename="inqu_status-0-contractDate" cname="合同日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-contractCode" cname="合同号" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-contractName" cname="合同名称" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-planSalesCode" cname="销售计划单号" colWidth="3" readonly="false"/>
<EF:EFSelect ename="inqu_status-0-custCode" cname="客户名称" colWidth="3"
valueTemplate="#=textField#" template="#=textField#"
textField="textField" valueField="valueField"
filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-contractStatus" cname="合同状态" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="未录入" value="0"/>
<EF:EFOption label="已录入" value="1"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-approveStatus" cname="审批状态" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="未审批" value="0"/>
<EF:EFOption label="已审批" value="1"/>
</EF:EFSelect>
<EF:EFInput ename="contractCode" type="hidden"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="基本信息">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="contractDate" cname="合同日期" width="100" align="center" readonly="true"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="contractCode" cname="合同号" width="100" readonly="true" required="true"/>
<EF:EFColumn ename="contractName" cname="合同名称" width="120" readonly="true" required="true"/>
<EF:EFComboColumn ename="planSalesCode" cname="销售计划单号" blockName="planSalesCode_block_id"
columnTemplate="#=textField#-#=valueField#" itemTemplate="#=textField#-#=valueField#"
textField="#=textField#" valueField="valueField"
maxLength="16" width="120" required="true"
align="center" sort="true">
</EF:EFComboColumn>
<EF:EFComboColumn ename="custCode" cname="客户名称" blockName="customer_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="120" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="contractAmount" cname="合同金额" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="20" required="true"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFComboColumn ename="contractStatus" cname="合同状态" enable="false" width="60" align="center" defaultValue="0">
<EF:EFOption label="未录入" value="0"/>
<EF:EFOption label="已录入" value="1"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="approveStatus" cname="审批状态" enable="false" width="60" align="center" defaultValue="0">
<EF:EFOption label="未审批" value="0"/>
<EF:EFOption label="已审批" value="1"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion id="detail" title="明细信息">
<EF:EFInput ename="approveStatus" type="hidden"/>
<EF:EFInput ename="parentId" type="hidden"/>
<EF:EFGrid blockId="detail" autoDraw="no" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="contractCode" cname="合同号" hidden="true"/>
<EF:EFColumn enable="false" ename="serialNum" cname="序号" align="center" width="30"/>
<EF:EFComboColumn ename="prdtCode" cname="产品名称" blockName="invent_name_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="120" required="true" readonly="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="quantity" cname="数量" width="120" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right" defaultValue="0" required="true"
data-regex="/^-?[0-9]{1,20}?$/" maxLength="20"
data-errorprompt="请输入数字,该值最大可设置20位整数!"/>
<EF:EFColumn ename="taxRate" cname="税率" width="120" format="{0:0.00%}" editType="text"
displayType="0.000" sort="true" align="right" defaultValue="0" required="true"
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="notaxPrice" cname="不含税单价" width="120" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" defaultValue="0" required="true"
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="notaxAmount" cname="不含税金额" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" defaultValue="0"
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="theAmount" cname="税额" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" defaultValue="0"
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="taxAmount" cname="含税金额" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" defaultValue="0"
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment