Commit 01a66909 authored by 鲁鑫's avatar 鲁鑫

工艺工序国际化

parent cd4c7384
package com.huigou.topsun.base.attachmentExplain.application;
import com.huigou.topsun.base.attachmentExplain.domain.model.AttachmentExplain;
import com.huigou.topsun.base.attachmentExplain.domain.query.AttachmentExplainQueryRequest;
import java.util.List;
import java.util.Map;
/**
* 附件上传说明接口层
*
* @author
* @date 2018-04-02 14:20
*/
public interface AttachmentExplainApplication {
/*
* 查询文件
*/
String QUERY_XML_FILE_PATH = "config/topsun/base/attachmentExplain.xml";
/*
* 查询表 hxAttachmentExplain
*/
String QUERY_SSRF_ATTACHMENT_EXPLAIN = "attachmentExplain";
/**
* 保存 附件上传说明
*
* @author
* @param params
*/
String saveAttachmentExplain(AttachmentExplain attachmentExplain);
/**
* 加载 附件上传说明
*
* @author
* @return SDO
*/
AttachmentExplain loadAttachmentExplain(String id);
/**
* 删除 附件上传说明
*
* @author
*/
void deleteAttachmentExplain(List<String> ids);
/**
* 修改状态
*/
void updateAttachmentExplainStatus(List<String> ids, Integer status);
/**
* 查询 附件上传说明
*
* @author
* @return SDO
*/
Map<String, Object> slicedQueryAttachmentExplain(AttachmentExplainQueryRequest queryRequest);
AttachmentExplain loadAttachmentExplainByCode(String code);
}
package com.huigou.topsun.base.attachmentExplain.application.impl;
import com.huigou.context.MessageSourceContext;
import com.huigou.data.domain.model.CommonDomainConstants;
import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.topsun.base.attachmentExplain.application.AttachmentExplainApplication;
import com.huigou.topsun.base.attachmentExplain.domain.model.AttachmentExplain;
import com.huigou.topsun.base.attachmentExplain.domain.query.AttachmentExplainQueryRequest;
import com.huigou.topsun.base.attachmentExplain.repository.AttachmentExplainRepository;
import com.huigou.uasp.bmp.common.application.BaseApplication;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import java.util.List;
import java.util.Map;
/**
* 附件上传说明实现层
*
* @ClassName: SsrfAttachmentExplainApplicationImpl
* @author
* @date 2018-04-02 14:20
* @version V1.0
*/
@Service("attachmentExplainApplication")
public class AttachmentExplainApplicationImpl extends BaseApplication implements AttachmentExplainApplication {
@Autowired
private AttachmentExplainRepository attachmentExplainRepository;
@Override
@Transactional
public String saveAttachmentExplain(AttachmentExplain attachmentExplain) {
Assert.notNull(attachmentExplain, CommonDomainConstants.OBJECT_NOT_NULL);
attachmentExplain = (AttachmentExplain) this.commonDomainService.loadAndFillinProperties(attachmentExplain);
attachmentExplain = (AttachmentExplain) this.commonDomainService.saveBaseInfoEntity(attachmentExplain, attachmentExplainRepository);
return attachmentExplain.getId();
}
@Override
public AttachmentExplain loadAttachmentExplain(String id) {
Assert.hasText(id, CommonDomainConstants.ID_NOT_BLANK);
return attachmentExplainRepository.findOne(id);
}
@Override
@Transactional
public void deleteAttachmentExplain(List<String> ids) {
List<AttachmentExplain> objs = attachmentExplainRepository.findAll(ids);
attachmentExplainRepository.delete(objs);
}
@Override
public Map<String, Object> slicedQueryAttachmentExplain(AttachmentExplainQueryRequest queryRequest) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, QUERY_SSRF_ATTACHMENT_EXPLAIN);
return this.sqlExecutorDao.executeSlicedQuery(queryDescriptor, queryRequest);
}
@Transactional(rollbackFor = RuntimeException.class)
@Override
public void updateAttachmentExplainStatus(List<String> ids, Integer status) {
this.checkIdsNotEmpty(ids);
Assert.notNull(status, MessageSourceContext.getMessage("status.not.blank"));
this.commonDomainService.updateStatus(AttachmentExplain.class, ids, status);
}
@Override
public AttachmentExplain loadAttachmentExplainByCode(String code) {
Assert.hasText(code, CommonDomainConstants.CODE_NOT_BLANK);
List<AttachmentExplain> datas = attachmentExplainRepository.findByCode(code);
Assert.notEmpty(datas, String.format("未找到%s对应的附件说明!", code));
return datas.get(0);
}
}
package com.huigou.topsun.base.attachmentExplain.controller;
import com.huigou.topsun.base.attachmentExplain.application.AttachmentExplainApplication;
import com.huigou.topsun.base.attachmentExplain.domain.model.AttachmentExplain;
import com.huigou.topsun.base.attachmentExplain.domain.query.AttachmentExplainQueryRequest;
import com.huigou.topsun.common.YesOrNo;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.client.CommonController;
import com.huigou.uasp.log.annotation.LogInfo;
import com.huigou.uasp.log.domain.model.LogType;
import com.huigou.uasp.log.domain.model.OperationType;
import com.huigou.util.SDO;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import java.util.List;
import java.util.Map;
/**
* 附件上传说明控制层
*
* @ClassName: AttachmentExplainController
* @author
* @date 2018-04-02 14:20
* @version V1.0
*/
@Controller
@ControllerMapping("attachmentExplain")
public class AttachmentExplainController extends CommonController {
@Autowired
private AttachmentExplainApplication attachmentExplainApplication;
protected String getPagePath() {
return "/biz/topsun/base/attachmentExplain/";
}
@RequiresPermissions("AttachmentExplain:query")
public String forwardListAttachmentExplain() {
return forward("topsunAttachmentExplainList");
}
@RequiresPermissions("AttachmentExplain:query")
@LogInfo(logType = LogType.BIZ, subType = "", operaionType = OperationType.QUERY, description = "分页查询附件上传说明")
public String slicedQueryAttachmentExplain() {
SDO sdo = this.getSDO();
AttachmentExplainQueryRequest queryRequest = sdo.toQueryRequest(AttachmentExplainQueryRequest.class);
Map<String, Object> data = attachmentExplainApplication.slicedQueryAttachmentExplain(queryRequest);
return toResult(data);
}
@RequiresPermissions("AttachmentExplain:create")
@LogInfo(logType = LogType.BIZ, subType = "", operaionType = OperationType.DETALL, description = "跳转到新增附件上传说明")
public String showInsertAttachmentExplain() {
this.putAttribute("status", YesOrNo.YES.getId());
return forward("topsunAttachmentExplainDetail");
}
@RequiresPermissions("AttachmentExplain:create")
@LogInfo(logType = LogType.BIZ, subType = "", operaionType = OperationType.ADD, description = "新增保存附件上传说明")
public String insertAttachmentExplain() {
SDO sdo = this.getSDO();
AttachmentExplain attachmentExplain = sdo.toObject(AttachmentExplain.class);
String id = attachmentExplainApplication.saveAttachmentExplain(attachmentExplain);
return success(id);
}
@RequiresPermissions("AttachmentExplain:update")
@LogInfo(logType = LogType.BIZ, subType = "", operaionType = OperationType.DETALL, description = "跳转到编辑附件上传说明")
public String showLoadAttachmentExplain() {
SDO sdo = this.getSDO();
String id = sdo.getId();
AttachmentExplain attachmentExplain = attachmentExplainApplication.loadAttachmentExplain(id);
return forward("attachmentExplainDetail", attachmentExplain);
}
@RequiresPermissions("AttachmentExplain:update")
@LogInfo(logType = LogType.BIZ, subType = "", operaionType = OperationType.UPDATE, description = "新增修改附件上传说明")
public String updateAttachmentExplain() {
SDO sdo = this.getSDO();
AttachmentExplain attachmentExplain = sdo.toObject(AttachmentExplain.class);
attachmentExplainApplication.saveAttachmentExplain(attachmentExplain);
return success();
}
@RequiresPermissions("AttachmentExplain:delete")
@LogInfo(logType = LogType.BIZ, subType = "", operaionType = OperationType.DELETE, description = "删除附件上传说明")
public String deleteAttachmentExplain() {
SDO sdo = this.getSDO();
List<String> ids = sdo.getStringList("ids");
attachmentExplainApplication.deleteAttachmentExplain(ids);
return success();
}
@RequiresPermissions("AttachmentExplain:update")
@LogInfo(logType = LogType.BIZ, subType = "", operaionType = OperationType.DELETE, description = "修改附件上传状态")
public String updateAttachmentExplainStatus() {
SDO sdo = this.getSDO();
List<String> ids = sdo.getStringList("ids");
Integer status = sdo.getInteger("status");
attachmentExplainApplication.updateAttachmentExplainStatus(ids, status);
return success();
}
public String showAttachmentExplain() {
SDO sdo = this.getSDO();
String code = sdo.getString("code");
AttachmentExplain attachmentExplain = attachmentExplainApplication.loadAttachmentExplainByCode(code);
return forward("attachmentExplain", attachmentExplain);
}
public String showAttachmentExplainList() {
this.putAttribute("bizId", "attachmentExplainId");
return forward("attachmentExplainList");
}
public String showViewAttachmentExplainList() {
this.putAttribute("bizId", "attachmentExplainId");
this.putAttribute("isReadOnly", "true");
return forward("attachmentExplainList");
}
public String showAttachmentManagementMethods() {
this.putAttribute("bizId", "attachmentManagementMethods");
this.putAttribute("bizCode", "managementMethods");
this.putAttribute("isWrap", true);
return forward("/biz/topsun/common/attachment.jsp");
}
}
package com.huigou.topsun.base.attachmentExplain.domain.model;
import com.huigou.data.domain.model.BaseInfoAbstractEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* 附件上传说明
*
* @author
* SSRF_ATTACHMENT_EXPLAIN
* @date 2018-04-02 14:20
*/
@Entity
@Table(name = "ATTACHMENT_EXPLAIN")
public class AttachmentExplain extends BaseInfoAbstractEntity {
private static final long serialVersionUID = 1L;
/**
* content
**/
@Column(name = "content", length = 2500)
private String content;
public String getContent() {
return this.content;
}
public void setContent(String content) {
this.content = content;
}
}
package com.huigou.topsun.base.attachmentExplain.domain.query;
import com.huigou.data.domain.query.QueryAbstractRequest;
/**
* 附件上传说明
*
* @author
* TECH_HX_ATTACHMENT_EXPLAIN
* @date 2018-04-02 14:20
*/
public class AttachmentExplainQueryRequest extends QueryAbstractRequest {
/**
* code
**/
protected String code;
/**
* name
**/
protected String name;
/**
* status
**/
protected Integer status;
public String getCode() {
return this.code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public Integer getStatus() {
return this.status;
}
public void setStatus(Integer status) {
this.status = status;
}
}
package com.huigou.topsun.base.attachmentExplain.repository;
import com.huigou.topsun.base.attachmentExplain.domain.model.AttachmentExplain;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
/**
* 附件上传说明Repository
*
* @author
* @date 2018-04-02 14:20
*/
public interface AttachmentExplainRepository extends JpaRepository<AttachmentExplain, String> {
List<AttachmentExplain> findByCode(String code);
}
topsun.AttachmentExplain.title=Description of Filling in Document and Uploading Attachment topsun.AttachmentExplain.title=Description of Filling in Document and Uploading Attachment
topsun.AttachmentExplain.link=URL for Downloading Attachment Template topsun.AttachmentExplain.link=URL for Downloading Attachment Template
\ No newline at end of file
#工艺管理
topsun.technology.manager=Technology Manager
topsun.technology.add=Add Technology
topsun.technology.update=Update Technology
topsun.technology.detail=Technology Detail
topsun.technology.technologyName=Technology Route Name
topsun.technology.productName=Product
topsun.technology.technologyVersion=Technology Version
topsun.technology.technologyType=Technology Type
#工序管理
topsun.process.manager=Process Manager
topsun.process.add=Add Process
topsun.process.update=Update Process
topsun.process.detail=Process Detail
topsun.process.sortNum=Process sortNum
topsun.process.processName=Process Name
topsun.process.processType=Process Type
topsun.process.workHours=Process Work Hours
topsun.process.processContent=Process Content
topsun.process.processRemark=Process Remark
topsun.process.resource=Process Resource
topsun.process.material=Process Material
topsun.process.resource.name=Process Resource Name
topsun.process.resource.version=Process Resource Version
topsun.process.material.name=Material Name
topsun.process.material.unit=Material Unit
topsun.process.material.number=Material Used Number
topsun.process.material.content=Material Content
topsun.AttachmentExplain.title=单据填写及附件上传说明 topsun.AttachmentExplain.title=单据填写及附件上传说明
topsun.AttachmentExplain.link=附件模板下载链接 topsun.AttachmentExplain.link=附件模板下载链接
\ No newline at end of file
#工艺管理
topsun.technology.manager=工艺管理
topsun.technology.add=新增工艺
topsun.technology.update=修改工艺
topsun.technology.detail=工艺详情
topsun.technology.technologyName=工艺路线名称
topsun.technology.productName=产品
topsun.technology.technologyVersion=工艺版本
topsun.technology.technologyType=工艺类型
#工序管理
topsun.process.manager=工序管理
topsun.process.add=新增工序
topsun.process.update=修改工序
topsun.process.detail=工序详情
topsun.process.sortNum=序号
topsun.process.processName=工序名称
topsun.process.processType=工序类型
topsun.process.workHours=工时
topsun.process.processContent=工序内容
topsun.process.processRemark=工序说明
topsun.process.resource=工序资源
topsun.process.material=工序物料
topsun.process.resource.name=资源名称
topsun.process.resource.version=资源版本
topsun.process.material.name=物料名称
topsun.process.material.unit=物料计量单位
topsun.process.material.number=物料使用数量
topsun.process.material.content=物料相关内容
...@@ -32,7 +32,7 @@ function loadResourceGrid() { ...@@ -32,7 +32,7 @@ function loadResourceGrid() {
}); });
resourceGridManager = UICtrl.grid("#resourceGrid", { resourceGridManager = UICtrl.grid("#resourceGrid", {
columns: [ columns: [
{ display: "资源名称", name: "resourceName", width: 200, minWidth: 60, type: "string", align: "left", { display: "topsun.process.resource.name", name: "resourceName", width: 200, minWidth: 60, type: "string", align: "left",
editor: { editor: {
required: true, type: "select", required: true, type: "select",
data: { data: {
...@@ -49,7 +49,7 @@ function loadResourceGrid() { ...@@ -49,7 +49,7 @@ function loadResourceGrid() {
}, },
} }
}, },
{ display: "版本", name: "version", width: 200, minWidth: 60, type: "string", align: "left" }, { display: "topsun.process.resource.version", name: "version", width: 200, minWidth: 60, type: "string", align: "left" },
], ],
dataAction: "server", dataAction: "server",
url: web_app.name + '/process/slicedProcessResourceList.ajax', url: web_app.name + '/process/slicedProcessResourceList.ajax',
...@@ -95,7 +95,7 @@ function loadProcessMaterialGrid() { ...@@ -95,7 +95,7 @@ function loadProcessMaterialGrid() {
}); });
processMaterialGridManager = UICtrl.grid("#processMaterialGrid", { processMaterialGridManager = UICtrl.grid("#processMaterialGrid", {
columns: [ columns: [
{ display: "物料名称", name: "materialName", width: 200, minWidth: 60, type: "string", align: "left", { display: "topsun.process.material.name", name: "materialName", width: 200, minWidth: 60, type: "string", align: "left",
editor: { editor: {
required: true, type: "select", required: true, type: "select",
data: { data: {
...@@ -110,15 +110,15 @@ function loadProcessMaterialGrid() { ...@@ -110,15 +110,15 @@ function loadProcessMaterialGrid() {
}, },
} }
}, },
{ display: "物料计量单位", name: "materialUnit", width: 100, minWidth: 60, type: "string", align: "left" }, { display: "topsun.process.material.unit", name: "materialUnit", width: 100, minWidth: 60, type: "string", align: "left" },
{ display: "使用物料数量", name: "materialNumber", width: 100, minWidth: 60, type: "string", align: "left" , { display: "topsun.process.material.number", name: "materialNumber", width: 100, minWidth: 60, type: "string", align: "left" ,
editor: { editor: {
type: 'text', type: 'text',
mask: 'positiveMoney', mask: 'positiveMoney',
required: true required: true
} }
}, },
{ display: "物料相关内容", name: "materialJson", width: 400, minWidth: 60, type: "string", align: "left" }, { display: "topsun.process.material.content", name: "materialJson", width: 400, minWidth: 60, type: "string", align: "left" },
], ],
dataAction: "server", dataAction: "server",
url: web_app.name + '/process/slicedProcessMaterialItems.ajax', url: web_app.name + '/process/slicedProcessMaterialItems.ajax',
...@@ -192,7 +192,7 @@ function saveData(action) { ...@@ -192,7 +192,7 @@ function saveData(action) {
Public.ajax(web_app.name + '/process/saveProcess.ajax?code=' + action,processDetail, Public.ajax(web_app.name + '/process/saveProcess.ajax?code=' + action,processDetail,
function (data) { function (data) {
setId(data.processId); setId(data.processId);
Public.successTip("数据保存成功"); Public.successTip("common.tip.success");
processGridManager.setParm('processId', data.processId); processGridManager.setParm('processId', data.processId);
processGridManager.loadData(); processGridManager.loadData();
} }
......
...@@ -5,9 +5,10 @@ ...@@ -5,9 +5,10 @@
<head> <head>
<x:base include="layout,dialog,grid,tree,combox,commonTree"/> <x:base include="layout,dialog,grid,tree,combox,commonTree"/>
<x:script src='/biz/topsun/technology/processDetail.js'/> <x:script src='/biz/topsun/technology/processDetail.js'/>
<x:i18n name="topsun"/>
</head> </head>
<body> <body>
<x:billTitle title="工序详情" needStatus="false" needPerson="true"/> <x:billTitle title="topsun.process.detail" needStatus="false" needPerson="true"/>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
<button class="btn btn-default" type="button" id="close" style="left: 200px;float:right;bottom: 10px;">关闭</button> <button class="btn btn-default" type="button" id="close" style="left: 200px;float:right;bottom: 10px;">关闭</button>
<button class="btn btn-warning" type="button" id="submit" style="left: 200px;float:right;bottom: 10px;">提交</button> <button class="btn btn-warning" type="button" id="submit" style="left: 200px;float:right;bottom: 10px;">提交</button>
...@@ -15,17 +16,17 @@ ...@@ -15,17 +16,17 @@
<form class="hg-form" method="post" action="" id="submitForm"> <form class="hg-form" method="post" action="" id="submitForm">
<x:hidden name="processId"/> <x:hidden name="processId"/>
<div class="hg-form-row"> <div class="hg-form-row">
<x:inputC name="processName" required="true" label="工序名称" labelCol="2" maxLength="64" fieldCol="4"/> <x:inputC name="processName" required="true" label="topsun.process.processName" labelCol="2" maxLength="64" fieldCol="4"/>
<x:selectC name="processType" required="true" label="工序类别" labelCol="2" dictionary="processType" fieldCol="4"/> <x:selectC name="processType" required="true" label="topsun.process.processType" labelCol="2" dictionary="processType" fieldCol="4"/>
<x:inputC name="processContent" required="true" label="工序内容" labelCol="2" maxLength="64" fieldCol="4"/> <x:inputC name="processContent" required="true" label="topsun.process.processContent" labelCol="2" maxLength="64" fieldCol="4"/>
<x:inputC name="workHours" required="true" label="工时" labelCol="2" mask="nnnn.nn" dataOptions="min:0" maxLength="32" fieldCol="4"/> <x:inputC name="workHours" required="true" label="topsun.process.workHours" labelCol="2" mask="nnnn.nn" dataOptions="min:0" maxLength="32" fieldCol="4"/>
<x:inputC name="processRemark" required="false" label="工序说明" labelCol="2" maxLength="32" fieldCol="10"/> <x:inputC name="processRemark" required="false" label="topsun.process.processRemark" labelCol="2" maxLength="32" fieldCol="10"/>
</div> </div>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
<x:title title="工序资源" name="group" hideTable="#info"/> <x:title title="topsun.process.resource" name="group" hideTable="#info"/>
<div id="resourceGrid" style="margin: 2px;"></div> <div id="resourceGrid" style="margin: 2px;"></div>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
<x:title title="工序物料" name="group" hideTable="#info"/> <x:title title="topsun.process.material" name="group" hideTable="#info"/>
<div id="processMaterialGrid" style="margin: 2px;"></div> <div id="processMaterialGrid" style="margin: 2px;"></div>
</form> </form>
</body> </body>
......
...@@ -22,11 +22,11 @@ function loadProcessListGrid() { ...@@ -22,11 +22,11 @@ function loadProcessListGrid() {
}); });
gridManager = UICtrl.grid("#processListGrid", { gridManager = UICtrl.grid("#processListGrid", {
columns: [ columns: [
{ display: "工序名称", name: "processName", width: 200, minWidth: 60, type: "string", align: "left" }, { display: "topsun.process.processName", name: "processName", width: 200, minWidth: 60, type: "string", align: "left" },
{ display: "工序类别", name: "processTypeTextView", width: 200, minWidth: 60, type: "string", align: "left" }, { display: "topsun.process.processType", name: "processTypeTextView", width: 200, minWidth: 60, type: "string", align: "left" },
{ display: "工时", name: "workHours", width: 100, minWidth: 60, type: "string", align: "left" }, { display: "topsun.process.workHours", name: "workHours", width: 100, minWidth: 60, type: "string", align: "left" },
{ display: "工序内容", name: "processContent", width: 300, minWidth: 60, type: "string", align: "left" }, { display: "topsun.process.processContent", name: "processContent", width: 300, minWidth: 60, type: "string", align: "left" },
{ display: "工序说明", name: "processRemark", width: 300, minWidth: 60, type: "string", align: "left" }, { display: "topsun.process.processRemark", name: "processRemark", width: 300, minWidth: 60, type: "string", align: "left" },
], ],
dataAction: "server", dataAction: "server",
url: web_app.name + '/process/slicedProcessList.ajax', url: web_app.name + '/process/slicedProcessList.ajax',
...@@ -76,7 +76,7 @@ function addHandler(){ ...@@ -76,7 +76,7 @@ function addHandler(){
});*/ });*/
UICtrl.addTabItem({ UICtrl.addTabItem({
tabid: 'processDetail', tabid: 'processDetail',
text: "新增工序", text: $.i18nProp("topsun.process.add"),
url: web_app.name + '/process/addProcessDetail.do' url: web_app.name + '/process/addProcessDetail.do'
}) })
} }
...@@ -105,7 +105,7 @@ function updateHandler(row){ ...@@ -105,7 +105,7 @@ function updateHandler(row){
});*/ });*/
UICtrl.addTabItem({ UICtrl.addTabItem({
tabid: 'processDetail'+row.processId, tabid: 'processDetail'+row.processId,
text: "修改工序", text: $.i18nProp("topsun.process.update"),
url: web_app.name + '/process/showProcessDetail.do?processId='+row.processId url: web_app.name + '/process/showProcessDetail.do?processId='+row.processId
}) })
} }
......
...@@ -3,8 +3,9 @@ ...@@ -3,8 +3,9 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html> <html>
<head> <head>
<x:base include="layout,dialog,grid,tree,combox,commonTree" /> <x:base include="layout,dialog,grid,tree,combox,commonTree" />
<x:script src='/biz/topsun/technology/processList.js'/> <x:script src='/biz/topsun/technology/processList.js'/>
<x:i18n name="topsun"/>
</head> </head>
<body> <body>
<div class="container-fluid"> <div class="container-fluid">
...@@ -13,15 +14,13 @@ ...@@ -13,15 +14,13 @@
<x:select name="yesorno" dictionary="yesorno" /> <x:select name="yesorno" dictionary="yesorno" />
</div> </div>
<div id="layout"> <div id="layout">
<div position="center" title="工序管理"> <x:title title="common.button.search" hideTable="queryMainForm" isHide="true" />
<x:title title="common.button.search" hideTable="queryMainForm" isHide="true" /> <form class="hg-form ui-hide" method="post" action="" id="queryMainForm">
<form class="hg-form ui-hide" method="post" action="" id="queryMainForm"> <x:inputC name="processName" required="false" label="topsun.process.processName" labelCol="1"/>
<x:inputC name="processName" required="false" label="工序名称" labelCol="1"/> <x:searchButtons />
<x:searchButtons /> </form>
</form> <div class="blank_div clearfix"></div>
<div class="blank_div clearfix"></div> <div id="processListGrid" style="margin: 2px;"></div>
<div id="processListGrid" style="margin: 2px;"></div>
</div>
</div> </div>
</div> </div>
</body> </body>
......
...@@ -25,11 +25,11 @@ function loadProcessListGrid() { ...@@ -25,11 +25,11 @@ function loadProcessListGrid() {
}); });
processGridManager = UICtrl.grid("#processListGrid", { processGridManager = UICtrl.grid("#processListGrid", {
columns: [ columns: [
{display: "序号", name: "sortNum", width: 80, minWidth: 60, type: "string", align: "left", {display: "topsun.process.sortNum", name: "sortNum", width: 80, minWidth: 60, type: "string", align: "left",
editor: { type: 'spinner', min: 1, max: 100, mask: 'nnn'} editor: { type: 'spinner', min: 1, max: 100, mask: 'nnn'}
}, },
{ {
display: "工序名称", name: "processName", width: 120, minWidth: 60, type: "string", align: "left", display: "topsun.process.processName", name: "processName", width: 120, minWidth: 60, type: "string", align: "left",
editor: { editor: {
required: true, type: "select", required: true, type: "select",
data: { data: {
...@@ -48,7 +48,7 @@ function loadProcessListGrid() { ...@@ -48,7 +48,7 @@ function loadProcessListGrid() {
} }
}, },
{ {
display: "工序类别", display: "topsun.process.processType",
name: "processTypeTextView", name: "processTypeTextView",
width: 120, width: 120,
minWidth: 60, minWidth: 60,
...@@ -62,7 +62,7 @@ function loadProcessListGrid() { ...@@ -62,7 +62,7 @@ function loadProcessListGrid() {
}*/ }*/
}, },
{ {
display: "工时", name: "workHours", width: 120, minWidth: 60, type: "number", align: "left", display: "topsun.process.workHours", name: "workHours", width: 120, minWidth: 60, type: "number", align: "left",
/*editor: { /*editor: {
required: true, required: true,
type: 'text', type: 'text',
...@@ -70,14 +70,14 @@ function loadProcessListGrid() { ...@@ -70,14 +70,14 @@ function loadProcessListGrid() {
}*/ }*/
}, },
{ {
display: "工序内容", name: "processContent", width: 180, minWidth: 60, type: "string", align: "left", display: "topsun.process.processContent", name: "processContent", width: 180, minWidth: 60, type: "string", align: "left",
/*editor: { /*editor: {
required: true, required: true,
type: 'text' type: 'text'
}*/ }*/
}, },
{ {
display: "工序说明", name: "processRemark", width: 180, minWidth: 60, type: "string", align: "left", display: "topsun.process.processRemark", name: "processRemark", width: 180, minWidth: 60, type: "string", align: "left",
/*editor: { /*editor: {
required: true, required: true,
type: 'text' type: 'text'
...@@ -153,7 +153,7 @@ function saveData(action) { ...@@ -153,7 +153,7 @@ function saveData(action) {
Public.ajax(web_app.name + '/technology/saveTechnology.ajax?code=' + action,technologyDetail, Public.ajax(web_app.name + '/technology/saveTechnology.ajax?code=' + action,technologyDetail,
function (data) { function (data) {
setId(data.technologyId); setId(data.technologyId);
Public.successTip("数据保存成功"); Public.successTip("common.tip.success");
processGridManager.setParm('technologyId', data.technologyId); processGridManager.setParm('technologyId', data.technologyId);
processGridManager.loadData(); processGridManager.loadData();
} }
......
...@@ -5,10 +5,11 @@ ...@@ -5,10 +5,11 @@
<head> <head>
<x:base include="layout,dialog,grid,tree,combox,commonTree" /> <x:base include="layout,dialog,grid,tree,combox,commonTree" />
<x:script src='/biz/topsun/technology/technologyDetail.js'/> <x:script src='/biz/topsun/technology/technologyDetail.js'/>
<x:i18n name="topsun"/>
</head> </head>
<body> <body>
<%--<div class="container-fluid">--%> <%--<div class="container-fluid">--%>
<x:billTitle title="工艺详情" needStatus="false" needPerson="true"/> <x:billTitle title="topsun.technology.detail" needStatus="false" needPerson="true"/>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
<button class="btn btn-default" type="button" id="close" style="left: 200px;float:right;bottom: 10px;">关闭</button> <button class="btn btn-default" type="button" id="close" style="left: 200px;float:right;bottom: 10px;">关闭</button>
<button class="btn btn-warning" type="button" id="submit" style="left: 200px;float:right;bottom: 10px;">提交</button> <button class="btn btn-warning" type="button" id="submit" style="left: 200px;float:right;bottom: 10px;">提交</button>
...@@ -17,10 +18,10 @@ ...@@ -17,10 +18,10 @@
<x:hidden name="technologyId" /> <x:hidden name="technologyId" />
<x:hidden name="productId"/> <x:hidden name="productId"/>
<div class="hg-form-row"> <div class="hg-form-row">
<x:inputC name="technologyName" required="true" label="工艺路线名称" labelCol="2" maxLength="64" fieldCol="4" /> <x:inputC name="technologyName" required="true" label="topsun.technology.technologyName" labelCol="2" maxLength="64" fieldCol="4" />
<x:selectC name="technologyType" required="true" label="工艺类型" labelCol="2" dictionary="technologyType" fieldCol="4" /> <x:selectC name="technologyType" required="true" label="topsun.technology.technologyType" labelCol="2" dictionary="technologyType" fieldCol="4" />
<x:inputC name="productName" required="true" label="产品" wrapper="select" labelCol="2" maxLength="64" fieldCol="4" /> <x:inputC name="productName" required="true" label="topsun.technology.productName" wrapper="select" labelCol="2" maxLength="64" fieldCol="4" />
<x:inputC name="technologyVersion" required="false" label="工艺版本" labelCol="2" maxLength="32" fieldCol="4" /> <x:inputC name="technologyVersion" required="false" label="topsun.technology.technologyVersion" labelCol="2" maxLength="32" fieldCol="4" />
</div> </div>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
<x:title title="工序设置" name="group" hideTable="#info" /> <x:title title="工序设置" name="group" hideTable="#info" />
......
...@@ -22,11 +22,11 @@ function loadTechnologyListGrid() { ...@@ -22,11 +22,11 @@ function loadTechnologyListGrid() {
}); });
gridManager = UICtrl.grid("#technologyListGrid", { gridManager = UICtrl.grid("#technologyListGrid", {
columns: [ columns: [
{display: "工艺路线名称", name: "technologyName", width: 140, minWidth: 60, type: "string", align: "left"}, {display: "topsun.technology.technologyName", name: "technologyName", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "产品ID", name: "productId", width: 120, minWidth: 60, type: "string", align: "left"}, {display: "topsun.technology.productName", name: "productId", width: 120, minWidth: 60, type: "string", align: "left"},
{display: "工艺版本", name: "technologyVersion", width: 120, minWidth: 60, type: "string", align: "left"}, {display: "topsun.technology.technologyVersion", name: "technologyVersion", width: 120, minWidth: 60, type: "string", align: "left"},
{ {
display: "工艺类型", display: "topsun.technology.technologyType",
name: "technologyTypeTextView", name: "technologyTypeTextView",
width: 100, width: 100,
minWidth: 60, minWidth: 60,
...@@ -86,7 +86,7 @@ function addHandler() { ...@@ -86,7 +86,7 @@ function addHandler() {
});*/ });*/
UICtrl.addTabItem({ UICtrl.addTabItem({
tabid: 'technologyDetail', tabid: 'technologyDetail',
text: "新增工艺", text: $.i18nProp("topsun.technology.add"),
url: web_app.name + '/technology/addTechnologyDetail.do' url: web_app.name + '/technology/addTechnologyDetail.do'
}) })
} }
...@@ -118,8 +118,8 @@ function updateHandler(row) { ...@@ -118,8 +118,8 @@ function updateHandler(row) {
} }
});*/ });*/
UICtrl.addTabItem({ UICtrl.addTabItem({
tabid: 'technologyDetail', tabid: 'technologyDetail'+row.technologyId,
text: "新增工艺", text: $.i18nProp("topsun.technology.update"),
url: web_app.name + '/technology/showTechnologyDetail.do?technologyId='+row.technologyId url: web_app.name + '/technology/showTechnologyDetail.do?technologyId='+row.technologyId
}) })
} }
......
...@@ -3,8 +3,9 @@ ...@@ -3,8 +3,9 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html> <html>
<head> <head>
<x:base include="layout,dialog,grid,tree,combox,commonTree" /> <x:base include="layout,dialog,grid,tree,combox,commonTree" />
<x:script src='/biz/topsun/technology/technologyList.js'/> <x:script src='/biz/topsun/technology/technologyList.js'/>
<x:i18n name="topsun"/>
</head> </head>
<body> <body>
<div class="container-fluid"> <div class="container-fluid">
...@@ -13,15 +14,13 @@ ...@@ -13,15 +14,13 @@
<x:select name="yesorno" dictionary="yesorno" /> <x:select name="yesorno" dictionary="yesorno" />
</div> </div>
<div id="layout"> <div id="layout">
<div position="center" title="工艺管理"> <x:title title="common.button.search" hideTable="queryMainForm" isHide="true" />
<x:title title="common.button.search" hideTable="queryMainForm" isHide="true" /> <form class="hg-form ui-hide" method="post" action="" id="queryMainForm">
<form class="hg-form ui-hide" method="post" action="" id="queryMainForm"> <x:inputC name="technologyName" required="false" label="topsun.technology.technologyName" labelCol="1"/>
<x:inputC name="ruleKind" required="false" label="工艺名称" labelCol="1"/> <x:searchButtons />
<x:searchButtons /> </form>
</form> <div class="blank_div clearfix"></div>
<div class="blank_div clearfix"></div> <div id="technologyListGrid" style="margin: 2px;"></div>
<div id="technologyListGrid" style="margin: 2px;"></div>
</div>
</div> </div>
</div> </div>
</body> </body>
......
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