Commit 2fa084f2 authored by 覃振观's avatar 覃振观 👶

2222

parent 599fad70
var gridManager = null;
$(document).ready(function() {
debugger;
initializateUI();
loadCodeRuleListGrid();
});
function initializateUI() {
//UICtrl.layout("#layout", {leftWidth: 3});
UICtrl.layout("#layout",{leftWidth: 50});
}
function loadCodeRuleListGrid() {
var toolbarOptions = UICtrl.getDefaultToolbarOptions({
updateHandler: function(){
updateHandler();
}
// , getPurchaseCode:{id:'getPurchaseCode',text:'测试采购编号',img:'fa-link',click:function(){
// testGetNextCode('purchase');
// }}
// , getContractCode:{id:'getContractCode',text:'测试合同编号',img:'fa-link',click:function(){
// testGetNextCode('contract');
// }}
});
gridManager = UICtrl.grid("#productListGrid", {
columns: [
{ display: "产品名称", name: "productName", width: 140, minWidth: 60, type: "string", align: "left" },
{ display: "产品类别", name: "productCategoryId", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "产品状态", name: "productStatus", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "产品计量单位", name: "productUnit", width: 100, minWidth: 60, type: "string", align: "left" },
{ display: "样品编号", name: "productSampleCode", width: 150, minWidth: 60, type: "string", align: "left" },
{ display: "品牌名称", name: "brandName", width: 100, minWidth: 60, type: "string", align: "left" },
{ display: "产品类型", name: "prodcutType", width: 140, minWidth: 60, type: "datetime", align: "left" }
],
dataAction: "server",
url: web_app.name + '/product/findProduct.ajax',
parms: {
page: 0,
size: 30
},
pageSize: 20,
usePager: true,
toolbar: toolbarOptions,
width: "100%",
height: "100%",
heightDiff: -8,
checkbox: true,
fixedCellHeight: true,
selectRowButtonOnly: true,
onDblClickRow : function(data, rowindex, rowobj) {
updateHandler(data);
}
});
UICtrl.setSearchAreaToggle(gridManager);
}
function updateHandler(data) {
var id = data.productId;
if (!id) {
id = DataUtil.getUpdateRowId(gridManager);
if (!id) {
return;
}
}
debugger;
var url=DataUtil.composeURLByParam('/product/forwardProductDetail.do',{ data: JSON.stringify(data) });
UICtrl.addTabItem({tabid:'viewFlowChart' + id, text:"产品信息",url:url});
// debugger;
// UICtrl.addTabItem({
// tabid: 'viewFlowChart' + id,
// text: "产品信息",
// url: web_app.name + '/bizFlowChart/showViewFlowchart.load?businessProcessId=' + id
// });
}
<%--
Created by IntelliJ IDEA.
User: qinzhenguan
Date: 2023/11/29
Time: 17:18
To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@taglib uri="/WEB-INF/taglib.tld" prefix="x"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<title>Title</title>
<x:base include="layout,dialog,grid,tree,combox,commonTree" />
<x:script src='/system/opm/js/OpmUtil.js'/>
<x:script src='/biz/topsun/common/purchaseCommon.js'/>
<x:script src='/biz/topsun/product/product.js'/>
</head>
<body>
<%-- <div position="top">--%>
<%-- <form class="hg-form" method="post" action="" id="submitForm">--%>
<%-- <div class="hg-form-cols">--%>
<%-- <x:hidden name="id" id="functionsId"/>--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="code" required="true" label="tech.field.resourceCode" maxLength="64" match="englishCode"/>--%>
<%-- <x:inputC name="name" required="true" label="common.field.name" maxLength="32"/>--%>
<%-- <x:inputC name="checkBeanName" required="false" label="权限校验Bean" maxLength="64" match="englishCode"/>--%>
<%-- </div>--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:textareaC name="remark" required="false" label="common.field.remark" maxLength="128" rows="2" labelCol="2" fieldCol="10"/>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <div class="hg-form-row" style="text-align: right;padding-top:5px;">--%>
<%-- <x:button value="保 存" icon="fa-save" onclick="doSaveMain(this.form)"/>&nbsp;&nbsp;--%>
<%-- <x:button value="预 览" icon="fa-list-alt" onclick="doView(this.form)"/>&nbsp;&nbsp;--%>
<%-- <x:button value="关 闭" icon="fa-times" onclick="doClose()"/>&nbsp;&nbsp;--%>
<%-- </div>--%>
<%-- <div class="clearfix"></div>--%>
<%-- </form>--%>
<%-- </div>--%>
<div position="center" title="产品管理">
<div id="productListGrid" style="margin: 2px;"></div>
</div>
</body>
</html>
<%--
Created by IntelliJ IDEA.
User: qinzhenguan
Date: 2023/11/30
Time: 15:02
To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@taglib uri="/WEB-INF/taglib.tld" prefix="x"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<head>
<x:script src='/biz/topsun/product/productDetail.js'/>
</head>
<form class="hg-form" method="post" action="" id="submitForm">
<x:hidden name="productDetailId" />
<x:hidden name="productId"/>
<div class="hg-form-cols">
<div class="hg-form-row">
<x:title title="基本属性" name="group" hideTable="#info" />
<x:inputC name="productId" required="true" label="产品编码" labelCol="2" maxLength="64" fieldCol="4" />
<x:inputC name="productName" required="true" label="产品名称" labelCol="2" maxLength="64" fieldCol="4" />
<x:selectC name="productCategoryId" required="false" label="产品类别ID" dictionary="selectedCategory" labelCol="2"/>
<%-- <x:inputC name="productCategoryId" required="true" label="产品类别ID" wrapper="select" labelCol="2" maxLength="64"--%>
<%-- fieldCol="4" />--%>
<x:inputC name="productUnit" required="false" label="单位" labelCol="2" maxLength="32" fieldCol="4" />
<x:inputC name="productSampleCode" required="false" label="样品编号" labelCol="2" maxLength="32" fieldCol="4" />
<x:inputC name="brandName" required="false" label="品牌名称" labelCol="2" maxLength="32" fieldCol="4" />
<x:title title="" name="group" hideTable="#info" />
</div>
</div>
<form2>
</form2>
<form3>
</form3>
<div class="blank_div clearfix"></div>
<x:title title="工序设置" name="group" hideTable="#info" />
<div id="processListGrid" style="margin: 2px;"></div>
</form>
</html>
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