Commit f49f4aea by yukang

Merge branch 'dev' of http://git.pseer.com/platform/hp-smart into dev

parents 34f11413 79916d91
...@@ -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"),
;
/** 将结果集放入的块名 */ /** 将结果集放入的块名 */
......
...@@ -21,7 +21,7 @@ public class CutterbarWarning { ...@@ -21,7 +21,7 @@ public class CutterbarWarning {
private String errorCode; private String errorCode;
/** /**
* 异常登记 * 异常等级
*/ */
private String prio; private String prio;
......
...@@ -99,7 +99,7 @@ public class ServiceHPPZ017 extends ServiceEPBase { ...@@ -99,7 +99,7 @@ public class ServiceHPPZ017 extends ServiceEPBase {
public void add(HPPZ017 hppz017) { public void add(HPPZ017 hppz017) {
hppz017.setSalesCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPPZ017_SALES_CODE)); hppz017.setSalesCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPPZ017_SALES_CODE));
List<HPPZ017> hppz017s = HPPZTools.HpPz017.getYear(hppz017.getYear()); List<HPPZ017> hppz017s = HPPZTools.HpPz017.getYear(hppz017.getYear());
AssertUtils.isNotEmpty(hppz017s, String.format("年度[%s]已存在", hppz017.getYear())); AssertUtils.isNotEmpty(hppz017s, String.format("年度[%s]销售目标已存在,添加失败!", hppz017.getYear()));
DaoUtils.insert(HPPZ017.INSERT, hppz017); DaoUtils.insert(HPPZ017.INSERT, hppz017);
} }
......
...@@ -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,30 @@ ...@@ -230,4 +233,30 @@
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>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isEmpty prepend=" AND " property="status">
STATUS = 1
</isEmpty>
<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>
...@@ -205,10 +205,10 @@ public class ServiceHPSB003 extends ServiceEPBase { ...@@ -205,10 +205,10 @@ public class ServiceHPSB003 extends ServiceEPBase {
public void queryDeviceCode(HPSB003 hpsb001){ public void queryDeviceCode(HPSB003 hpsb001){
Map<String,Object> map = new HashMap<>(); Map<String,Object> map = new HashMap<>();
map.put(HPSB003.FIELD_FACTORY_CODE,hpsb001.getFactoryCode()); //map.put(HPSB003.FIELD_FACTORY_CODE,hpsb001.getFactoryCode());
map.put("deviceCodeStr",hpsb001.getDeviceCode()); map.put("deviceCodeStr",hpsb001.getDeviceCode());
map.put(HPSB003.FIELD_DELETE_FLAG,hpsb001.getDeleteFlag()); map.put(HPSB003.FIELD_DELETE_FLAG,hpsb001.getDeleteFlag());
List<HPSB003> hpsb003List = this.dao.query(HPSB003.QUERY,map); List<HPSB003> hpsb003List = this.dao.query(HPSB003.QUERY,map);
AssertUtils.isNotEmpty(hpsb003List, String.format("设备编码[%s]在当前工厂已存在,添加失败", map.get(HPSB003.FIELD_DEVICE_CODE))); AssertUtils.isNotEmpty(hpsb003List, String.format("设备编码[%s]已存在,添加失败!", hpsb001.getDeviceCode()));
} }
} }
...@@ -291,6 +291,29 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -291,6 +291,29 @@ public class ServiceHPSC003 extends ServiceBase {
} }
/** /**
* 生成二维码
*
* @param inInfo
* @return
*/
public EiInfo generateQrcode(EiInfo inInfo) {
try {
String planInfoNo = inInfo.getString(HPSC003.FIELD_PLAN_INFO_NO);
// 已经生成过,不在重复生产
HPSC003 dbSc003 = HPSCTools.HpSc003.getByNo(planInfoNo);
AssertUtils.isNotEmpty(dbSc003.getQrcodeDocId(), "该计划已存在二维码,请勿重复生成");
// 生成新的二维码
HPSCTools.HpSc003.createQrCode(planInfoNo);
// 刷新页面数据
inInfo = this.query(inInfo);
inInfo.setMsg("生成二维码成功");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "生成二维码失败");
}
return inInfo;
}
/**
* 扫码显示计划明细 * 扫码显示计划明细
* *
* @param inInfo * @param inInfo
......
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="year" cname="年度" align="center" width="120" editType="date" start="decade" depth="decade" <EF:EFColumn ename="year" cname="年度" align="center" width="120" editType="date" start="decade" depth="decade"
readonly="true" dateFormat="yyyy" parseFormats="['yyyy']"/> readonly="true" dateFormat="yyyy" parseFormats="['yyyy']" required="true"/>
<EF:EFColumn ename="salesCode" cname="单号" enable="false" align="center" width="160"/> <EF:EFColumn ename="salesCode" cname="单号" enable="false" align="center" width="160"/>
<EF:EFColumn ename="salesAmount" cname="营业额" width="120" format="{0:N2}" <EF:EFColumn ename="salesAmount" cname="营业额" width="120" format="{0:N2}"
displayType="0.000" sort="true" align="right" maxLength="20" displayType="0.000" sort="true" align="right" maxLength="20" defaultValue="0"
data-regex="/^-?[0-9]{1,18}([.][0-9]{1,2})?$/" data-regex="/^-?[0-9]{1,18}([.][0-9]{1,2})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/> data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="targetExplain" cname="目标说明" align="center" width="200" editType="textarea"/> <EF:EFColumn ename="targetExplain" cname="目标说明" align="center" width="200" editType="textarea"/>
......
<%--
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" align="center" readonly="true" required="true"/>
<EF:EFColumn ename="contractName" cname="合同名称" width="120" align="center" 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>
...@@ -20,8 +20,8 @@ $(function () { ...@@ -20,8 +20,8 @@ $(function () {
} }
if (auditStatus == 0) { if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+ + 'onclick="check(' + item.id + ',1, \'' + item.planInfoNo + '\',\''
'onclick="check(' + item.id + ',1, \'' + item.planInfoNo + '\',\'' + item.factoryCode + '\')" >提交</a>'; + item.factoryCode + '\')" >提交</a>';
} }
/*else { /*else {
template += '<a hidden="hidden" style="cursor: pointer;display: inline-flex;justify-content: center;" ' + template += '<a hidden="hidden" style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
...@@ -42,12 +42,16 @@ $(function () { ...@@ -42,12 +42,16 @@ $(function () {
}, { }, {
field: "qrcodeDocId", field: "qrcodeDocId",
template: function (item) { template: function (item) {
if (isBlank(item.qrcodeDocId)) { let auditStatus = item.status;
return ""; if (!isBlank(item.qrcodeDocId)) {
} else {
return '<img src="' + downloadHref(item.qrcodeDocId) + '" width="20px" height="20px"' return '<img src="' + downloadHref(item.qrcodeDocId) + '" width="20px" height="20px"'
+ ' onclick="imgClick(\'' + item.qrcodeDocId + '\')" />'; + ' onclick="imgClick(\'' + item.qrcodeDocId + '\')" />';
} }
if (auditStatus != 0) {
return '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+ 'onclick="generateQrcode(\'' + item.planInfoNo + '\')" >生成</a>';
}
return "";
} }
}], }],
/** /**
...@@ -422,6 +426,21 @@ function saveDetail(btn) { ...@@ -422,6 +426,21 @@ function saveDetail(btn) {
} }
/** /**
* 生成二维码
*
* @param planInfoNo
*/
let generateQrcode = function (planInfoNo) {
let inInfo = __eiInfo;
inInfo.set("planInfoNo", planInfoNo);
JSUtils.submitGridsData("result", "HPSC003", "generateQrcode",
true, function (res) {
message(res.msg);
}, inInfo
);
}
/**
* 图片放大 * 图片放大
*/ */
let imgClick = function (docId) { let imgClick = function (docId) {
......
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