Commit a0562e7c authored by 鲁鑫's avatar 鲁鑫

Merge remote-tracking branch 'origin/dev' into dev

parents 9accb4c9 6f1c6ee4
......@@ -11,7 +11,6 @@ $(document).ready(function () {
for (var item in inputParams) {
inputParams[item] = Public.getQueryStringByName(item);
}
counterSignKindId = Public.getQueryStringByName("counterSignKindId");
bizId = Public.getQueryStringByName("bizId");
bizCode = Public.getQueryStringByName("bizCode");
......
<%@ 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"%>
<form class="hg-form" method="post" action="" id="submitDetailForm">
<x:hidden name="id" />
<div class="hg-form-row">
<x:inputC name="materialName" required="true" label="物料" labelCol="3" maxLength="64" fieldCol="9" />
</div>
<div class="hg-form-row">
<x:inputC name="materialNumber" required="true" label="物料数量" labelCol="3" maxLength="32" fieldCol="9" />
</div>
<div class="hg-form-row">
<x:inputC name="productName" required="true" label="产品" labelCol="3" maxLength="32" fieldCol="9" />
</div>
</form>
\ No newline at end of file
<%@ page contentType="text/html; charset=utf-8" language="java"%>
<%@ taglib uri="/WEB-INF/taglib.tld" prefix="x"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<x:base include="grid,date,layout,combox,tree,comboDialog,attachment" />
<%@ page contentType="text/html; charset=utf-8" language="java" %>
<%@ taglib uri="/WEB-INF/taglib.tld" prefix="x" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<x:base include="grid,date,layout,combox,tree,comboDialog,attachment"/>
<x:script src='/system/opm/js/OpmUtil.js'/>
<x:script src='/biz/topsun/common/purchaseCommon.js'/>
<x:script src='/biz/topsun/proofing/proofingMakeDetail.js'/>
<x:script src='/biz/topsun/proofing/proofingMake.js'/>
<div class="container-fluid" style="padding: 10px;">
<form class="hg-form" method="post" action="" id="submitForm">
<div><h3>基本信息</h3></div>
<div style="margin: 22px;border: 1px solid black;">
<div class="hg-form-cols">
<x:inputC name="proofingMakeNo" readonly="true" label="指导书编号" labelCol="2" fieldCol="2"/>
<x:inputC name="productId" readonly="true" label="产品编号" labelCol="2" fieldCol="2"/>
<x:inputC name="specificationNo" readonly="true" label="规格书编号" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplyPageNeedTime" readonly="true" label="产品类型" wrapper="date" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplySampleCnName" readonly="true" label="品牌" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplySampleEnName" readonly="true" label="采购单位" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplySampleVersion" readonly="true" label="换算值" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplySampleSize" readonly="true" label="产品名称" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplySampleNum" readonly="true" label="产品英文名称" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplyOutputSituation" readonly="true" label="仓库" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="sizeGroup" readonly="true" label="尺码组" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="isDisable" readonly="true" label="是否禁用" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingMakeNo" label="指导书编号" labelCol="2" fieldCol="2"/>
<x:inputC name="productId" label="产品编号" labelCol="2" fieldCol="2"/>
<x:inputC name="specificationNo" label="规格书编号" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplyPageNeedTime" label="产品类型" wrapper="date" labelCol="2"
fieldCol="2"/>
<x:inputC name="proofingApplySampleCnName" label="品牌" maxLength="32" labelCol="2"
fieldCol="2"/>
<x:inputC name="proofingApplySampleEnName" label="采购单位" maxLength="32" labelCol="2"
fieldCol="2"/>
<x:inputC name="proofingApplySampleVersion" label="换算值" maxLength="32" labelCol="2"
fieldCol="2"/>
<x:inputC name="proofingApplySampleSize" label="产品名称" maxLength="32" labelCol="2"
fieldCol="2"/>
<x:inputC name="proofingApplySampleNum" label="产品英文名称" maxLength="32" labelCol="2"
fieldCol="2"/>
<x:inputC name="proofingApplyOutputSituation" label="仓库" maxLength="32" labelCol="2"
fieldCol="2"/>
<x:inputC name="sizeGroup" label="尺码组" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="isDisable" label="是否禁用" labelCol="2" fieldCol="2"/>
<x:inputC name="isNewSpecification" label="是否创建新规格书" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="isShoePattern" label="是否要鞋图" labelCol="2" fieldCol="2"/>
<x:inputC name="isAttachedSample" readonly="true" label="是否附样品" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="isOnlyCode" readonly="true" label="是否唯一码产品" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="isBodyColor" readonly="true" label="是否不考虑形体配色" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="isAttachedSample" label="是否附样品" maxLength="32" labelCol="2"
fieldCol="2"/>
<x:inputC name="isOnlyCode" label="是否唯一码产品" maxLength="32" labelCol="2"
fieldCol="2"/>
<x:inputC name="isBodyColor" label="是否不考虑形体配色" maxLength="32" labelCol="2"
fieldCol="2"/>
</div>
</div>
</form>
......
//因为页面表格较多,每次操作一张表格时需要切换gridManager
var gridManager = null, refreshFlag = false;
//定义生成表格的参数对象
var bomObj={
parms:{},
node:"",
url:"",
columns:[
{ display: "物料", name: "materialName", width: 140, minWidth: 60, type: "string", align: "left" },
{ display: "物料数量", name: "materialNumber", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "产品", name: "productId", width: 120, minWidth: 60, type: "string", align: "left" }
]
}
var technologyObj={
parms:{},
node:"technologyGrid",
url:"slicedTechnologyList",
gridManager:null,
columns:[
{ display: "工艺路线名称", name: "technologyName", width: 200, minWidth: 60, type: "string", align: "left" }
]
}
var processObj={
parms:{},
node:"processGrid",
url:"slicedTechnologyProcessList",
gridManager:null,
columns:[
{ display: "工序内容", name: "processContent", width: 140, minWidth: 60, type: "string", align: "left", hidden: true },
{ display: "工序名称", name: "processName", width: 140, minWidth: 60, type: "string", align: "left" },
{ display: "工序说明", name: "processRemark", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "工序类别", name: "processTypeTextView", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "工时", name: "workHours", width: 120, minWidth: 60, type: "string", align: "left" }
]
}
var processBomObj={
parms:{},
node:"",
url:"",
columns:[
{ display: "物料", name: "materialId", width: 140, minWidth: 60, type: "string", align: "left", hidden: true },
{ display: "SAP物料详细信息", name: "materialName", width: 140, minWidth: 60, type: "string", align: "left" },
{ display: "使用的物料数量", name: "materialNumber", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "物料计量单位", name: "productName", width: 120, minWidth: 60, type: "string", align: "left" }
]
}
//创建表格(参数、列、插入的节点、请求地址)
function loadProofingApplyGrid(obj) {
// const toolbarOptions= UICtrl.getDefaultToolbarOptions({
// addHandler: addHandler,
// updateHandler() {
// updateHandler();
// },
// deleteHandler: deleteHandler,
// })
obj.gridManager = UICtrl.grid("#"+obj.node, {
columns: obj.columns,
dataAction: "server",
url: web_app.name +'/proofingApply/'+obj.url+'.ajax',
parms:obj.parms,
pageSize: 10,
usePager: true,
// toolbar: toolbarOptions,
width: "50%",
height: 400,
heightDiff: -8,
fixedCellHeight: true,
selectRowButtonOnly: true
});
UICtrl.setSearchAreaToggle(obj.gridManager);
}
/**
* 切换gridManager
* 定义监听器、操作对应表格是自动切换
*/
function switchGridManager() {
$("#technology").on("click", "*", function(event) {
if(gridManager==technologyObj.gridManager)return;
gridManager=technologyObj.gridManager;
});
$("#process").on("click", "*", function(event) {
if(gridManager==processObj.gridManager)return;
this.gridManager=processObj.gridManager;
})
}
$(document).ready(function() {
$(document).ready(function () {
initializateUI();
bindQueryEvent();
// Public.updateDefaultValue($("#productId"));
// echo("productType")
switchGridManager();
a();
});
// function echo(node){
// $("#"+node+"_text").val($("#"+node).val())
// }
function initializateUI() {
UICtrl.layout("#layout", {leftWidth: 3});
}
//绑定selectC
function bindQueryEvent(){
function bindQueryEvent() {
$('#productId').searchbox({
type : "product",name : "productCode",
onChange:function(value,data){
type: "product", name: "productCode",
onChange: function (value, data) {
$('#productId').val(data.productId);
if(technologyObj.gridManager!=null){
gridManager=technologyObj.gridManager;//手动切换gridManager
reloadGrid({productId:data.productId});
gridManager=processObj.gridManager;//手动切换gridManager
reloadGrid({ technologyId:-1 });
}else {
technologyObj.parms={productId:data.productId};
loadProofingApplyGrid(technologyObj);
}
}
});
}
function updateHandler(id){
if(!id){
var id = DataUtil.getUpdateRowId(gridManager);
if (!id){ return; }
}
UICtrl.showAjaxDialog({
url: web_app.name + '/codeRule/showLoadCodeRule.load',
title: "修改BOM",
width: 340,
param:{id:id},
ok: function(div){
var _self=this;
$('#submitForm',div).ajaxSubmit({url: web_app.name + '/codeRule/updateCodeRule.ajax',
success : function() {
_self.close();
reloadGrid();
}
});
}
});
}
// 查询
function query(obj) {
var param = $(obj).formToJSON();
UICtrl.gridSearch(gridManager, param);
}
/**
* 刷新表格
* @param parms 刷新时请求的参数
*/
function reloadGrid(parms) {
if(parms!=null){
gridManager.options.parms=parms
}
gridManager.loadData();
}
//重置表单
function resetForm(obj) {
$(obj).formClean();
}
//关闭对话框
function dialogClose(){
if(refreshFlag){
reloadGrid();
refreshFlag=false;
}
}
//添加按钮
function addHandler() {
UICtrl.showAjaxDialog({
title: $.i18nProp('添加BOM'),
url : web_app.name + '/proofingApply/forwardAddBom.load',
ok : insert,
width : 600,
close : dialogClose
});
}
//新增保存
function insert() {
var _self=this;
$('#submitDetailForm').ajaxSubmit({
url : web_app.name + '/resourceField/saveResourceFiledValue.ajax',
param:{},
success : function(data) {
if (data == "1"){
Public.successTip("保存成功!");
}
_self.close();
reloadGrid();
}
});
}
//编辑按钮
function updateHandler(id) {
if (!id) {
//获取所选行id
id = DataUtil.getUpdateRowId(gridManager);
if (!id) {
return;
}
}
UICtrl.showAjaxDialog({
title: $.i18nProp('更新Bom'),
width: 600,
url: web_app.name + '/proofingApply/forwardAddBom.load',
param: {id: id,resourceTypeId: $('#resourceTypeId').val()},
ok: update,
close:dialogClose
});
}
//编辑保存
function update() {
var _self=this;
$('#submitDetailForm').ajaxSubmit({
url : web_app.name + '/proofingApply/updateResourceFiledValue.ajax',
success : function(data) {
if (data == "1"){
Public.successTip("修改成功!");
}
refreshFlag = true;
_self.close();
reloadGrid();
}
});
}
//删除按钮
function deleteHandler() {
DataUtil.del({
action: 'resourceField/deleteResourceFiledValue.ajax',
param:{
id:DataUtil.getUpdateRowId(gridManager),
resourceTypeId: $('#resourceTypeId').val()
},
gridManager: gridManager, idFieldName: 'id',
onSuccess: function (data) {
if (data == "1"){
Public.successTip("删除成功!");
}
reloadGrid();
showTechnologyTable(data.productId);
}
});
}
......@@ -285,19 +42,3 @@ function getId() {
return $("#proofingApplyId").val() || "";
}
function a(){
$(document).on('click', '#technology .l-grid-row', function(event) {
// 延迟执行新创建的点击事件逻辑,确保在当前点击事件逻辑之后执行
setTimeout(function() {
let result = DataUtil.getUpdateRow(gridManager); // 获取选中行
processObj.parms = { technologyId: result.technologyId };
if (processObj.gridManager != null) {
gridManager = processObj.gridManager; // 手动切换 gridManager
reloadGrid({ technologyId: result.technologyId });
} else {
loadProofingApplyGrid(processObj);
}
}, 0);
});
}
<%@ page contentType="text/html; charset=utf-8" language="java"%>
<%@ taglib uri="/WEB-INF/taglib.tld" prefix="x"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<x:base include="grid,date" />
<%@ page contentType="text/html; charset=utf-8" language="java" %>
<%@ taglib uri="/WEB-INF/taglib.tld" prefix="x" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<x:base include="grid,date"/>
<x:script src='/system/opm/js/OpmUtil.js'/>
<x:script src='/biz/topsun/common/purchaseCommon.js'/>
<x:script src='/biz/topsun/proofing/proofingApply.js'/>
<x:script src='/biz/topsun/proofing/technologyAndBom/technologyAndBom.js'/>
<div class="container-fluid" style="padding: 10px;">
<div style="text-align: center;font-weight: bold;">
<h1 style="font-weight: bold;">打样申请单</h1>
</div>
<form class="hg-form" method="post" action="" id="submitForm">
<x:hidden name="id" id="proofingApplyId"/>
<x:hidden name="billCode"/>
......@@ -20,20 +24,27 @@
<x:hidden name="personMemberId"/>
<x:hidden name="personMemberName"/>
<div><h3>基本信息</h3></div>
<div style="margin: 22px;border: 1px solid black;">
<div class="hg-form-cols">
<x:inputC name="proofingApplyNo" readonly="true" label="申请单号" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="proofingApplyNo" readonly="true" label="申请单号" maxLength="32" labelCol="1"
fieldCol="2"/>
<x:inputC name="productId" label="产品编号" labelCol="1" fieldCol="2"/>
<x:selectC name="customerId" label="品牌客户编号" dictionary="customerType" labelCol="1" fieldCol="2"/>
<x:inputC name="proofingApplyPageNeedTime" label="版面需求时间" wrapper="date" labelCol="1" fieldCol="2"/>
<x:inputC name="proofingApplyCompleteDate" id="completeDate" required="false" label="完成日期" wrapper="date" labelCol="1" />
<x:inputC name="proofingApplySampleCnName" label="样品中文名称" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="proofingApplySampleEnName" label="样品英文名称" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="proofingApplyPageNeedTime" label="版面需求时间" wrapper="date" labelCol="1"
fieldCol="2"/>
<x:inputC name="proofingApplyCompleteDate" id="completeDate" required="false" label="完成日期"
wrapper="date" labelCol="1"/>
<x:inputC name="proofingApplySampleCnName" label="样品中文名称" maxLength="32" labelCol="1"
fieldCol="2"/>
<x:inputC name="proofingApplySampleEnName" label="样品英文名称" maxLength="32" labelCol="1"
fieldCol="2"/>
<x:inputC name="proofingApplySampleVersion" label="样品版次" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="proofingApplySampleSize" label="样品规格" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="proofingApplySampleNum" label="样品数量" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="proofingApplyOutputSituation" label="产量情况" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="proofingApplyOutputSituation" label="产量情况" maxLength="32" labelCol="1"
fieldCol="2"/>
<x:inputC name="proofingApplyProductNo" label="产品代号" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="proofingType" label="打样形式" labelCol="1" fieldCol="2"/>
......@@ -43,44 +54,42 @@
<x:selectC name="productType" label="产品类别" dictionary="productType" labelCol="1" fieldCol="2"/>
<x:inputC name="proofingApplySurfaceTreatment" label="表面处理" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="proofingApplyNgReReason" label="NG重新打样原因" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="proofingApplySurfaceTreatment" label="表面处理" maxLength="32" labelCol="1"
fieldCol="2"/>
<x:inputC name="proofingApplyNgReReason" label="NG重新打样原因" maxLength="32" labelCol="1"
fieldCol="2"/>
<x:inputC name="a" label="测试标准" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="proofingApplyTestStandard" label="申请单状态" maxLength="32" labelCol="1" fieldCol="2"/>
</div>
<div><h3>样品外观要求</h3></div>
<div class="hg-form-cols" >
<x:selectC name="isOutput" required="false" label="是否量产" dictionary="yesorno" labelCol="1" fieldCol="2"/>
<x:selectC name="isOut" required="false" label="是否外发" dictionary="yesorno" labelCol="1" fieldCol="2"/>
<x:selectC name="isChange" required="false" label="是否改变" dictionary="yesorno" labelCol="1" fieldCol="2"/>
<x:inputC name="plasticBagType" required="false" label="塑料袋结构类型" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="productLength" required="false" label="长度(cm)" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="productWidth" required="false" label="宽度(cm)" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="productHeight" required="false" label="高度(cm)" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="productThick" required="false" label="厚度(mm)" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="productSingleLayer" required="false" label="单层厚(丝)" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="productLayerNum" required="false" label="层数" maxLength="32" labelCol="1" fieldCol="2"/>
</div>
</form>
<div><h3>BOM设置</h3></div>
<div id="mobTableGrid" style="margin: 2px;"></div>
<hr>
<div><h3>工艺设置</h3></div>
<div id="technology">
<div><h4>工艺</h4></div>
<div id="technologyGrid" style="margin: 2px;"></div>
<div><h3>样品外观要求</h3></div>
<div style="margin: 22px;border: 1px solid black;">
<div class="hg-form-cols">
<x:selectC name="isOutput" required="false" label="是否量产" dictionary="yesorno" labelCol="1"
fieldCol="2"/>
<x:selectC name="isOut" required="false" label="是否外发" dictionary="yesorno" labelCol="1"
fieldCol="2"/>
<x:selectC name="isChange" required="false" label="是否改变" dictionary="yesorno" labelCol="1"
fieldCol="2"/>
<x:inputC name="plasticBagType" required="false" label="塑料袋结构类型" maxLength="32" labelCol="1"
fieldCol="2"/>
<x:inputC name="productLength" required="false" label="长度(cm)" maxLength="32" labelCol="1"
fieldCol="2"/>
<x:inputC name="productWidth" required="false" label="宽度(cm)" maxLength="32" labelCol="1"
fieldCol="2"/>
<x:inputC name="productHeight" required="false" label="高度(cm)" maxLength="32" labelCol="1"
fieldCol="2"/>
<x:inputC name="productThick" required="false" label="厚度(mm)" maxLength="32" labelCol="1"
fieldCol="2"/>
<x:inputC name="productSingleLayer" required="false" label="单层厚(丝)" maxLength="32" labelCol="1"
fieldCol="2"/>
<x:inputC name="productLayerNum" required="false" label="层数" maxLength="32" labelCol="1"
fieldCol="2"/>
</div>
<div id="process">
<div><h4>工序</h4></div>
<div id="processGrid" style="margin: 2px;"></div>
</div>
<div><h4>工序物料</h4></div>
<div id="processBomGrid" style="margin: 2px;"></div>
</form>
<%@ include file="technologyAndBom/technologyAndBom.jsp" %>
</div>
<%@ page contentType="text/html; charset=utf-8" language="java"%>
<%@ taglib uri="/WEB-INF/taglib.tld" prefix="x"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page contentType="text/html; charset=utf-8" language="java" %>
<%@ taglib uri="/WEB-INF/taglib.tld" prefix="x" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<x:base include="layout,dialog,grid,tree,combox,commonTree" />
<x:script src='/biz/topsun/proofing/proofingMake.js'/>
<x:base include="layout,dialog,grid,tree,combox,commonTree"/>
<x:script src='/biz/topsun/proofing/proofingApplyList.js'/>
</head>
<body>
<div class="container-fluid">
<div class="ui-hide">
<x:select name="processType" dictionary="processType" />
<x:select name="yesorno" dictionary="yesorno" />
<x:select name="processType" dictionary="processType"/>
<x:select name="yesorno" dictionary="yesorno"/>
</div>
<div id="layout">
<div position="center" title="打样申请">
<x:title title="common.button.search" hideTable="queryMainForm" isHide="true" />
<div position="center" title="打样申请查询">
<x:title title="common.button.search" hideTable="queryMainForm" isHide="true"/>
<form class="hg-form ui-hide" method="post" action="" id="queryMainForm">
<x:inputC name="ruleKind" required="false" label="申请单号" labelCol="1"/>
<x:searchButtons />
<x:searchButtons/>
</form>
<div class="blank_div clearfix"></div>
<div id="proofingApplyTableGrid" style="margin: 2px;"></div>
......

var gridManager = null;
$(document).ready(function() {
initializateUI();
loadTechnologyListGrid();
$(document).ready(function () {
//生成操作文件的窗口
// $('#proofingMakeDetail').fileList()
// .find('table').css({
// borderTopWidth : 0
// });
bindQueryEvent();
$('#proofingMakeDetail').fileList();
$('#proofingMakeDetail .col-xs-4').removeClass('col-sm-2');
$('#proofingMakeDetail .col-xs-4').addClass('col-sm-3');
$('#proofingMakeDetail .col-xs-8').removeClass('col-sm-10');
$('#proofingMakeDetail .col-xs-8').addClass('col-sm-9');
echo("page");
echo("productType")
});
function initializateUI() {
UICtrl.layout("#layout", {leftWidth: 3});
function echo(node) {
$("#" + node + "_text").val($("#" + node).val())
}
function loadTechnologyListGrid() {
var toolbarOptions = UICtrl.getDefaultToolbarOptions({
// addHandler: function(){
// addHandler();
// },
updateHandler: function(){
updateHandler();
},
deleteHandler: deleteHandler,
});
gridManager = UICtrl.grid("#proofingMakeTableGrid", {
columns: [
{ display: "制造单号", name: "proofingMakeNo", width: 140, minWidth: 60, type: "string", align: "left" },
{ display: "申请单号", name: "proofingApplyNo", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "产品编号", name: "productId", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "品牌客户编号", name: "customerId", width: 140, minWidth: 60, type: "string", align: "left" },
{ display: "版面需求时间", name: "proofingApplyPageNeedTime", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "完成日期", name: "proofingApplyCompleteDate", width: 140, minWidth: 60, type: "string", align: "left" },
{ display: "样品中文名称", name: "proofingApplySampleCnName", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "样品英文名称", name: "proofingApplySampleEnName", width: 140, minWidth: 60, type: "string", align: "left" },
{ display: "样品版次", name: "proofingApplySampleVersion", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "样品规格", name: "proofingApplySampleSize", width: 140, minWidth: 60, type: "string", align: "left" },
{ display: "样品数量", name: "proofingApplySampleNum", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "产量情况", name: "proofingApplyOutputSituation", width: 140, minWidth: 60, type: "string", align: "left" },
{ display: "产品代号", name: "proofingApplyProductNo", width: 140, minWidth: 60, type: "string", align: "left" },
{ display: "版面", name: "materialName", width: 140, minWidth: 60, type: "string", align: "left" },
{ display: "分配方式", name: "proofingApplyAllocationType", width: 140, minWidth: 60, type: "string", align: "left" },
{ display: "产品类别", name: "materialName", width: 140, minWidth: 60, type: "string", align: "left" },
{ display: "表面处理", name: "proofingApplySurfaceTreatment", width: 140, minWidth: 60, type: "string", align: "left" },
{ display: "NG重新打样原因", name: "proofingApplyNgReReason", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "测试标准", name: "proofingApplyTestStandard", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "申请单状态", name: "proofingApplyApplicationStatus", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "颜色种类", name: "colorType", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "专", name: "expert", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "网版目数", name: "printingPlateNum", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "啤版目数", name: "beerPlateNum", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "模切板模数", name: "dieBoardNum", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "标准色号", name: "materialNumber", width: 120, minWidth: 60, type: "string", align: "left" },
],
dataAction: "server",
url: web_app.name + '/proofingMake/slicedQueryProofingMake.ajax',
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.proofingMakeId);
//绑定selectC
function bindQueryEvent() {
$('#proofingApplyNo').searchbox({
type: "proofing", name: "proofingApplyCode",
onChange: function (value, data) {
$('#proofingApplyNo').val(data.proofingApplyNo);
renderDataGoForm(data.proofingApplyNo);
showTechnologyTable(data.productId);
}
});
UICtrl.setSearchAreaToggle(gridManager);
}
function query(obj) {
var param = $(obj).formToJSON();
UICtrl.gridSearch(gridManager, param);
}
function reloadGrid() {
gridManager.loadData();
}
function resetForm(obj) {
$(obj).formClean();
}
function addHandler(){
UICtrl.showAjaxDialog({
url: web_app.name + '/proofingMake/forwardSaveProofingMake.load',
title: "新增打样制造单",
width: 1000,
ok: function(div){
var _self=this;
$('#submitForm',div).ajaxSubmit({url: web_app.name + '/proofingMake/saveProofingMake.ajax',
success : function() {
_self.close();
reloadGrid();
/**
* 根据申请单号发送ajax请求并渲染进表单
* @param proofingApplyNo
*/
function renderDataGoForm(proofingApplyNo) {
$.ajax(
{
type: "POST",
url: web_app.name + '/proofingMake/queryProofingApply.ajax',
cache: false,
async: true,
dataType: "json",
data: {proofingApplyNo: proofingApplyNo},
success: function (data) {
let form = $('#submitForm');
$.each(data.data, function (key, value) {
let field = form.find('[name="' + key + '"]');
if (field.length > 0) {
field.val(value);
}
});
},
error: function (err) {
alert("异常:" + err)
}
});
}
})
function updateHandler(proofingMakeId){
if (!proofingMakeId) {
console.log(gridManager)
//获取所选行id
proofingMakeId = DataUtil.getUpdateRowId(gridManager);
if (!proofingMakeId) {
return;
}
}
UICtrl.showAjaxDialog({
url: web_app.name + '/proofingMake/forwardSaveProofingMake.load',
title: "修改打样制造单",
width: 1000,
param:{id:proofingMakeId},
ok: function(div){
var _self=this;
$('#submitForm',div).ajaxSubmit({url: web_app.name + '/proofingMake/saveProofingMake.ajax',
success : function() {
_self.close();
reloadGrid();
}
});
}
});
}
//重写DataUtil的getUpdateRowId函数、它默认取行的id列
DataUtil.getUpdateRowId = function(gridManager){
var result = DataUtil.getUpdateRow(gridManager);
if (result){
return result.proofingMakeId;
}
return result;
}
//删除按钮
function deleteHandler() {
DataUtil.del({
action: 'proofingMake/deleteProofingMakeByProofingMakeId.ajax',
gridManager: gridManager, idFieldName: 'proofingMakeId',
onSuccess: function () {
reloadGrid();
}
});
}
$(document).ready(function() {
//生成操作文件的窗口
// $('#proofingMakeDetail').fileList()
// .find('table').css({
// borderTopWidth : 0
// });
$('#proofingMakeDetail').fileList();
$('#proofingMakeDetail .col-xs-4').removeClass('col-sm-2');
$('#proofingMakeDetail .col-xs-4').addClass('col-sm-3');
$('#proofingMakeDetail .col-xs-8').removeClass('col-sm-10');
$('#proofingMakeDetail .col-xs-8').addClass('col-sm-9');
echo("page");
echo("productType")
});
function echo(node){
$("#"+node+"_text").val($("#"+node).val())
}
<%@ page contentType="text/html; charset=utf-8" language="java"%>
<%@ taglib uri="/WEB-INF/taglib.tld" prefix="x"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<x:base include="grid,date,layout,combox,tree,comboDialog,attachment" />
<x:script src='/system/opm/js/OpmUtil.js'/>
<x:script src='/biz/topsun/common/purchaseCommon.js'/>
<x:script src='/biz/topsun/proofing/proofingMakeDetail.js'/>
<div class="container-fluid" style="padding: 10px;">
<form class="hg-form" method="post" action="" id="submitForm">
<div><h3>基本信息</h3></div>
<div class="hg-form-cols">
<x:hidden name="proofingMakeId"/>
<x:hidden name="proofingApplyId"/><!--申请单id-->
<x:hidden name="id"/><!--申请单的主键id-->
<x:inputC name="proofingMakeNo" readonly="true" label="制造单号" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplyNo" readonly="true" label="申请单号" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="productId" readonly="true" label="产品编号" labelCol="2" fieldCol="2"/>
<x:inputC name="customerId" readonly="true" label="品牌客户编号" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplyPageNeedTime" readonly="true" label="版面需求时间" wrapper="date" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplyCompleteDate" readonly="true" id="completeDate" required="false" label="完成日期" wrapper="date" labelCol="2" />
<x:inputC name="proofingApplySampleCnName" readonly="true" label="样品中文名称" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplySampleEnName" readonly="true" label="样品英文名称" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplySampleVersion" readonly="true" label="样品版次" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplySampleSize" readonly="true" label="样品规格" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplySampleNum" readonly="true" label="样品数量" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplyOutputSituation" readonly="true" label="产量情况" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplyProductNo" readonly="true" label="产品代号" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingType" readonly="true" label="打样形式" labelCol="2" fieldCol="2"/>
<x:inputC name="page" label="版面" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplyAllocationType" label="分配方式" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="productType" label="产品类别" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplySurfaceTreatment" readonly="true" label="表面处理" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplyNgReReason" readonly="true" label="NG重新打样原因" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="a" readonly="true" label="测试标准" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplyTestStandard" readonly="true" label="申请单状态" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="colorType" label="颜色种类" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="expert" label="专" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="printingPlateNum" label="网版目数" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="beerPlateNum" label="啤版目数" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="dieBoardNum" label="模切板目数" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplyTestStandard" label="申请单状态" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="a" label="测试标准" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="proofingApplyTestStandard" label="申请单状态" maxLength="32" labelCol="2" fieldCol="2"/>
<div class="container-fluid">
<x:title title="附件上传" name="group"/>
<x:fileList bizCode="providerFile" bizId="bizId" id="proofingMakeDetail" isClass="true"/>
</div>
</div>
<div><h3>样品外观要求</h3></div>
<div class="hg-form-cols" >
<x:selectC name="isOutput" required="false" label="是否量产" dictionary="yesorno" labelCol="2" fieldCol="2"/>
<x:selectC name="isOut" required="false" label="是否外发" dictionary="yesorno" labelCol="2" fieldCol="2"/>
<x:selectC name="isChange" required="false" label="是否改变" dictionary="yesorno" labelCol="2" fieldCol="2"/>
<x:inputC name="plasticBagType" required="false" label="塑料袋结构类型" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="productLength" required="false" label="长度(cm)" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="productWidth" required="false" label="宽度(cm)" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="productHeight" required="false" label="高度(cm)" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="productThick" required="false" label="厚度(mm)" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="productSingleLayer" required="false" label="单层厚(丝)" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="productLayerNum" required="false" label="层数" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="productLayerNum" required="false" label="样品形状" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="prodcutShapeSize" required="false" label="样品形状大小(mm)" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="productLayerNum" required="false" label="预定工艺流程id" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="productLayerNum" required="false" label="文件存储位置" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="productLayerNum" required="false" label="样品物料" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="productAperture" required="false" label="孔径(mm)" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="productLayerNum" required="false" label="成品克重(g)" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="productSingleWeight" required="false" label="单重(kg)" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="productLayerNum" required="false" label="样品制造单状态" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="productLayerNum" required="false" label="是否确认" maxLength="32" labelCol="2" fieldCol="2"/>
</div>
<div><h3>排版参数</h3></div>
<div class="hg-form-cols" >
<x:inputC name="modulus" required="false" label="模数" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="rowNum" required="false" label="列" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="columnNum" required="false" label="行" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="contactNum" required="false" label="搭版数" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="rowDoubleBlade" required="false" label="列双刀位(mm)" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="columnDoubleBlade" required="false" label="行双刀位(mm)" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="dispatchMultiple" required="false" label="派工倍数" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="sheetLength" required="false" label="印张长度(cm)" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="sheetWidth" required="false" label="印张宽度(mm)" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="productLayerNum" required="false" label="印刷正面颜色" maxLength="32" labelCol="2" fieldCol="2"/>
<x:inputC name="productLayerNum" required="false" label="印刷反面颜色" maxLength="32" labelCol="2" fieldCol="2"/>
</div>
</form>
</div>
var gridManager = null;
$(document).ready(function () {
initializateUI();
loadTechnologyListGrid();
});
function initializateUI() {
UICtrl.layout("#layout", {leftWidth: 3});
}
function loadTechnologyListGrid() {
var toolbarOptions = UICtrl.getDefaultToolbarOptions({
// addHandler: function(){
// addHandler();
// },
// updateHandler: function(){
// updateHandler();
// },
deleteHandler: deleteHandler,
});
gridManager = UICtrl.grid("#proofingMakeTableGrid", {
columns: [
{display: "制造单号", name: "proofingMakeNo", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "申请单号", name: "proofingApplyNo", width: 120, minWidth: 60, type: "string", align: "left"},
{display: "产品编号", name: "productId", width: 120, minWidth: 60, type: "string", align: "left"},
{display: "品牌客户编号", name: "customerId", width: 140, minWidth: 60, type: "string", align: "left"},
{
display: "版面需求时间",
name: "proofingApplyPageNeedTime",
width: 120,
minWidth: 60,
type: "string",
align: "left"
},
{
display: "完成日期",
name: "proofingApplyCompleteDate",
width: 140,
minWidth: 60,
type: "string",
align: "left"
},
{
display: "样品中文名称",
name: "proofingApplySampleCnName",
width: 120,
minWidth: 60,
type: "string",
align: "left"
},
{
display: "样品英文名称",
name: "proofingApplySampleEnName",
width: 140,
minWidth: 60,
type: "string",
align: "left"
},
{
display: "样品版次",
name: "proofingApplySampleVersion",
width: 120,
minWidth: 60,
type: "string",
align: "left"
},
{
display: "样品规格",
name: "proofingApplySampleSize",
width: 140,
minWidth: 60,
type: "string",
align: "left"
},
{
display: "样品数量",
name: "proofingApplySampleNum",
width: 120,
minWidth: 60,
type: "string",
align: "left"
},
{
display: "产量情况",
name: "proofingApplyOutputSituation",
width: 140,
minWidth: 60,
type: "string",
align: "left"
},
{
display: "产品代号",
name: "proofingApplyProductNo",
width: 140,
minWidth: 60,
type: "string",
align: "left"
},
{display: "版面", name: "materialName", width: 140, minWidth: 60, type: "string", align: "left"},
{
display: "分配方式",
name: "proofingApplyAllocationType",
width: 140,
minWidth: 60,
type: "string",
align: "left"
},
{display: "产品类别", name: "materialName", width: 140, minWidth: 60, type: "string", align: "left"},
{
display: "表面处理",
name: "proofingApplySurfaceTreatment",
width: 140,
minWidth: 60,
type: "string",
align: "left"
},
{
display: "NG重新打样原因",
name: "proofingApplyNgReReason",
width: 120,
minWidth: 60,
type: "string",
align: "left"
},
{
display: "测试标准",
name: "proofingApplyTestStandard",
width: 120,
minWidth: 60,
type: "string",
align: "left"
},
{
display: "申请单状态",
name: "proofingApplyApplicationStatus",
width: 120,
minWidth: 60,
type: "string",
align: "left"
},
{display: "颜色种类", name: "colorType", width: 120, minWidth: 60, type: "string", align: "left"},
{display: "专", name: "expert", width: 120, minWidth: 60, type: "string", align: "left"},
{display: "网版目数", name: "printingPlateNum", width: 120, minWidth: 60, type: "string", align: "left"},
{display: "啤版目数", name: "beerPlateNum", width: 120, minWidth: 60, type: "string", align: "left"},
{display: "模切板模数", name: "dieBoardNum", width: 120, minWidth: 60, type: "string", align: "left"},
{display: "标准色号", name: "materialNumber", width: 120, minWidth: 60, type: "string", align: "left"},
],
dataAction: "server",
url: web_app.name + '/proofingMake/slicedQueryProofingMake.ajax',
pageSize: 20,
usePager: true,
toolbar: toolbarOptions,
width: "100%",
height: "100%",
heightDiff: -8,
checkbox: true,
fixedCellHeight: true,
selectRowButtonOnly: true,
onDblClickRow: function (data, rowindex, rowobj) {
doView(data.proofingMakeId);
}
});
UICtrl.setSearchAreaToggle(gridManager);
}
function query(obj) {
var param = $(obj).formToJSON();
UICtrl.gridSearch(gridManager, param);
}
function reloadGrid() {
gridManager.loadData();
}
function resetForm(obj) {
$(obj).formClean();
}
function addHandler() {
UICtrl.showAjaxDialog({
url: web_app.name + '/proofingMake/forwardSaveProofingMake.load',
title: "新增打样制造单",
width: 1000,
ok: function (div) {
var _self = this;
$('#submitForm', div).ajaxSubmit({
url: web_app.name + '/proofingMake/saveProofingMake.ajax',
success: function () {
_self.close();
reloadGrid();
}
});
}
});
}
function updateHandler(proofingMakeId) {
if (!proofingMakeId) {
console.log(gridManager)
//获取所选行id
proofingMakeId = DataUtil.getUpdateRowId(gridManager);
if (!proofingMakeId) {
return;
}
}
UICtrl.showAjaxDialog({
url: web_app.name + '/proofingMake/forwardSaveProofingMake.load',
title: "修改打样制造单",
width: 1000,
param: {id: proofingMakeId},
ok: function (div) {
var _self = this;
$('#submitForm', div).ajaxSubmit({
url: web_app.name + '/proofingMake/saveProofingMake.ajax',
success: function () {
_self.close();
reloadGrid();
}
});
}
});
}
//重写DataUtil的getUpdateRowId函数、它默认取行的id列
DataUtil.getUpdateRowId = function (gridManager) {
var result = DataUtil.getUpdateRow(gridManager);
if (result) {
return result.proofingMakeId;
}
return result;
}
//删除按钮
function deleteHandler() {
DataUtil.del({
action: 'proofingMake/deleteProofingMakeByProofingMakeId.ajax',
gridManager: gridManager, idFieldName: 'proofingMakeId',
onSuccess: function () {
reloadGrid();
}
});
}
function doView(proofingMakeId) {
debugger
UICtrl.addTabItem({
tabid: 'showProofingMake',
text: "详情",
url: web_app.name + '/proofingMake/forwardDetailsProofingMake.do?id='+proofingMakeId
});
}
\ No newline at end of file
<%@ page contentType="text/html; charset=utf-8" language="java" %>
<%@ taglib uri="/WEB-INF/taglib.tld" prefix="x" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<x:base include="layout,dialog,grid,tree,combox,commonTree"/>
<x:script src='/biz/topsun/proofing/proofingMakeList.js'/>
</head>
<body>
<div class="container-fluid">
<div class="ui-hide">
<x:select name="processType" dictionary="processType"/>
<x:select name="yesorno" dictionary="yesorno"/>
</div>
<div id="layout">
<div position="center" title="打样制造">
<x:title title="common.button.search" hideTable="queryMainForm" isHide="true"/>
<form class="hg-form ui-hide" method="post" action="" id="queryMainForm">
<x:inputC name="ruleKind" required="false" label="制造单号" labelCol="1"/>
<x:searchButtons/>
</form>
<div class="blank_div clearfix"></div>
<div id="proofingMakeTableGrid" style="margin: 2px;"></div>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
//因为页面表格较多,每次操作一张表格时需要切换gridManager
var gridManager = null;
//定义生成表格的参数对象
var bomObj={
parms:{},
node:"",
url:"",
columns:[
{ display: "物料", name: "materialName", width: 140, minWidth: 60, type: "string", align: "left" },
{ display: "物料数量", name: "materialNumber", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "产品", name: "productId", width: 120, minWidth: 60, type: "string", align: "left" }
]
}
var technologyObj={
parms:{},
node:"technologyGrid",
url:"slicedTechnologyList",
gridManager:null,
columns:[
{ display: "工艺路线名称", name: "technologyName", width: 750, minWidth: 60, type: "string", align: "left" }
]
}
var processObj={
parms:{},
node:"processGrid",
url:"slicedTechnologyProcessList",
gridManager:null,
columns:[
{ display: "工序内容", name: "processContent", width: 150, minWidth: 60, type: "string", align: "left", hidden: true },
{ display: "工序名称", name: "processName", width: 150, minWidth: 60, type: "string", align: "left" },
{ display: "工序说明", name: "processRemark", width: 150, minWidth: 60, type: "string", align: "left" },
{ display: "工序类别", name: "processTypeTextView", width: 150, minWidth: 60, type: "string", align: "left" },
{ display: "工时", name: "workHours", width: 150, minWidth: 60, type: "string", align: "left" }
]
}
var processBomObj={
parms:{},
node:"",
url:"",
columns:[
{ display: "物料", name: "materialId", width: 140, minWidth: 60, type: "string", align: "left", hidden: true },
{ display: "SAP物料详细信息", name: "materialName", width: 140, minWidth: 60, type: "string", align: "left" },
{ display: "使用的物料数量", name: "materialNumber", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "物料计量单位", name: "productName", width: 120, minWidth: 60, type: "string", align: "left" }
]
}
//创建表格(参数、列、插入的节点、请求地址)
function loadProofingApplyGrid(obj) {
obj.gridManager = UICtrl.grid("#"+obj.node, {
columns: obj.columns,
dataAction: "server",
url: web_app.name +'/proofingApply/'+obj.url+'.ajax',
parms:obj.parms,
pageSize: 10,
usePager: true,
width: "50%",
height: 400,
heightDiff: -8,
fixedCellHeight: true,
selectRowButtonOnly: true
});
UICtrl.setSearchAreaToggle(obj.gridManager);
}
/**
* 切换gridManager
* 定义监听器、操作对应表格是自动切换
*/
function switchGridManager() {
$("#technology").on("click", "*", function(event) {
if(gridManager==technologyObj.gridManager)return;
gridManager=technologyObj.gridManager;
});
$("#process").on("click", "*", function(event) {
if(gridManager==processObj.gridManager)return;
this.gridManager=processObj.gridManager;
})
}
//展示工艺表格
function showTechnologyTable(productId){
if(technologyObj.gridManager!=null){
gridManager=technologyObj.gridManager;//手动切换gridManager
reloadGrid({productId:productId});
//产品编号每次发生变动后删除残留的工序数据
if(processObj.gridManager!=null){
gridManager=processObj.gridManager;//手动切换gridManager
reloadGrid({ technologyId:-1 });
}
}else {
technologyObj.parms={productId:productId};
loadProofingApplyGrid(technologyObj);
}
}
$(document).ready(function() {
switchGridManager();
technologyClickRequestProcess();
});
/**
* 刷新表格
* @param parms 刷新时请求的参数
*/
function reloadGrid(parms) {
if(parms!=null){
gridManager.options.parms=parms
}
gridManager.loadData();
}
/**
* 根据选定的technology列获取对应的process
* 根据冒泡机制,永远都会先执行此点击事件,需要让平台内置事件先执行来获取行id
*/
function technologyClickRequestProcess(){
$(document).on('click', '#technology .l-grid-row', function(event) {
// 延迟执行新创建的点击事件逻辑,确保在当前点击事件逻辑之后执行
setTimeout(function() {
let result = DataUtil.getUpdateRow(gridManager); // 获取选中行
processObj.parms = { technologyId: result.technologyId };
if (processObj.gridManager != null) {
gridManager = processObj.gridManager; // 手动切换 gridManager
reloadGrid({ technologyId: result.technologyId });
} else {
loadProofingApplyGrid(processObj);
}
}, 0);
});
}
<div><h3>BOM设置</h3></div>
<div style="margin: 22px;border: 1px solid black;">
<div id="mobTableGrid" style="margin: 2px;">
<hr>
</div>
</div>
<div><h3>工艺设置</h3></div>
<div style="margin: 22px;border: 1px solid black;">
<div id="technology">
<div>
<h4>工艺</h4>
</div>
<div id="technologyGrid" style="margin: 2px;">
<hr>
</div>
</div>
<div id="process">
<div>
<h4>工序</h4>
</div>
<div id="processGrid" style="margin: 2px;">
<hr>
</div>
</div>
<div id="processBom">
<div>
<h4>工序物料</h4>
</div>
<div id="processBomGrid" style="margin: 2px;">
<hr>
</div>
</div>
</div>
\ No newline at end of file
......@@ -155,6 +155,12 @@
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.5.13</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
......
......@@ -4,6 +4,7 @@ import java.io.Serializable;
import javax.persistence.*;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
/**
* 产品外观
......@@ -17,9 +18,15 @@ public class ProductLooked implements Serializable {
* 产品外观ID
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY) // 使用自增策略
@GeneratedValue(
generator = "system-uuid"
)
@GenericGenerator(
name = "system-uuid",
strategy = "guid"
)
@Column(name = "product_looked_id")
private Long productLookedId;
private String productLookedId;
/**
* 产品ID
......
......@@ -3,6 +3,7 @@ package com.huigou.topsun.proofing.application;
import com.huigou.topsun.proofing.domain.model.ProofingApply;
import com.huigou.topsun.proofing.domain.query.ProofingApplyQuery;
import java.util.List;
import java.util.Map;
public interface ProofingApplyApplication {
......@@ -12,4 +13,8 @@ public interface ProofingApplyApplication {
ProofingApply loadProofingApplyById(String id);
Map<String, Object> slicedQuery(ProofingApplyQuery query);
List<ProofingApply> getProofingApplyList();
ProofingApply getProofingApplyByProofingApplyNo(String proofingApplyNo);
}
......@@ -19,6 +19,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
import java.util.UUID;
......@@ -126,4 +127,13 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing
}
}
@Override
public List<ProofingApply> getProofingApplyList() {
return proofingApplyRepository.findAll();
}
@Override
public ProofingApply getProofingApplyByProofingApplyNo(String proofingApplyNo) {
return proofingApplyRepository.findByProofingApplyNo(proofingApplyNo);
}
}
......@@ -24,6 +24,7 @@ import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
@Controller
@ControllerMapping("/proofingApply")
......@@ -48,6 +49,19 @@ public class ProofingApplyController extends CommonController {
String technologyId = sdo.getString("technologyId");
return packGridDataAndResult(technologyProcessApplication.slicedTechnologyProcessList(technologyId));
}
public String slicedProofingApplyList(){
List<ProofingApply> proofingApplyList = proofingApplyApplication.getProofingApplyList();
Map<String,Object> map =new HashMap();
map.put("Rows",proofingApplyList);
return toResult(map);
}
public String forwardProofingApplyList(){
return forward("proofingApplyList");
}
/**
* 打样表单页
* @return
......@@ -55,7 +69,7 @@ public class ProofingApplyController extends CommonController {
public String forwardProofingApply(){
this.putAttribute("processDefinitionKey",ProofingApplyApplication.PROCESS_DEFINITION_KEY);
String applicationNo="测试单号";
String applicationNo= UUID.randomUUID().toString().replace("-", "");
this.putAttribute("procUnitId", "Apply");
ProofingApply proofingApply = new ProofingApply();
......@@ -95,6 +109,7 @@ public class ProofingApplyController extends CommonController {
SDO sdo = this.getSDO();
String id = sdo.getBizId();
ProofingApply proofingApply = proofingApplyApplication.loadProofingApplyById(id);
this.putAttribute("readOnly", "true");
return forward("proofingApply", proofingApply);
}
}
package com.huigou.topsun.proofing.controller;
import com.huigou.topsun.proofing.application.ProofingApplyApplication;
import com.huigou.topsun.proofing.domain.model.ProofingApply;
import com.huigou.topsun.proofing.domain.vo.ProofingMakeVo;
import com.huigou.topsun.proofing.repository.ProofingMakeRepository;
import com.huigou.topsun.proofing.service.BomService;
import com.huigou.topsun.proofing.service.ProofingMakeService;
import com.huigou.topsun.technology.vo.TechnologyVo;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.bmp.common.BizBillStatus;
import com.huigou.uasp.client.CommonController;
import com.huigou.uasp.log.annotation.LogInfo;
import com.huigou.uasp.log.domain.model.LogType;
......@@ -19,6 +20,7 @@ import org.springframework.stereotype.Controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
@Controller
@ControllerMapping("/proofingMake")
......@@ -29,6 +31,8 @@ public class ProofingMakeController extends CommonController {
@Autowired
ProofingMakeService proofingMakeService;
@Autowired
ProofingApplyApplication proofingApplyApplication;
/**
......@@ -36,9 +40,19 @@ public class ProofingMakeController extends CommonController {
* @return
*/
public String forwardProofingMake(){
String proofingMakeNo = UUID.randomUUID().toString().replace("-", "");
this.putAttribute("proofingMakeNo", proofingMakeNo);
return forward("proofingMake");
}
/**
* 打样制作查询页
* @return
*/
public String forwardProofingMakeList(){
return forward("proofingMakeList");
}
@LogInfo(logType = LogType.BIZ, subType = "", operaionType = OperationType.QUERY, description = "分页查询打样制造表")
public String slicedQueryProofingMake() {
......@@ -49,16 +63,15 @@ public class ProofingMakeController extends CommonController {
}
/**
* 跳转打样编辑
* 跳转打样制造详情
*/
public String forwardSaveProofingMake(){
this.putAttribute("bizId", "ProofingMakeId");
public String forwardDetailsProofingMake(){
//如果有id的话就带参数过去
SDO sdo = this.getSDO();
String id = sdo.getId();
ProofingMakeVo proofingMakeVo =
(id==null||"".equals(id))?null:proofingMakeService.getProofingMakeVoById(id);
return forward("proofingMakeDetail",proofingMakeVo);
return forward("proofingMake",proofingMakeVo);
}
/**
......@@ -78,6 +91,12 @@ public class ProofingMakeController extends CommonController {
String proofingMakeId = sdo.getString("ids");
proofingMakeService.deleteProofingMakeVo(proofingMakeId);
return success();
}
public String queryProofingApply(){
SDO sdo = this.getSDO();
String proofingApplyNo = sdo.getString("proofingApplyNo");
ProofingApply proofingApply = proofingApplyApplication.getProofingApplyByProofingApplyNo(proofingApplyNo);
return toResult(proofingApply);
}
}
package com.huigou.topsun.proofing.controller;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.client.CommonController;
import lombok.Data;
import org.springframework.stereotype.Controller;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.UUID;
@Controller
@ControllerMapping("/workInstrcutionApply")
public class WorkInstrcutionApplyController extends CommonController {
protected String getPagePath() {
return "/biz/topsun/proofing/";
}
/**
* 打样制作表单页
* @return
*/
public String forwardworkInstrcutionApply(){
// String proofingMakeNo = UUID.randomUUID().toString().replace("-", "");
// this.putAttribute("proofingMakeNo", proofingMakeNo);
return forward("WorkInstrcutionApply");
}
public static void main(String[] args) {
System.out.println("55f62f778dc711ee8d8e0242ac110003".length());
}
}
......@@ -11,205 +11,171 @@ import java.util.Date;
/**
* 样品申请与外观
* @TableName proofing_apply
*/
@Data
public class ProofingApplyOrLookedVo extends FlowBillAbstractEntity{
/**
* 申请单id
*/
@Column(name = "proofing_apply_id")
private String proofingApplyId;
/**
* 申请单号
*/
@Column(name = "proofing_apply_no")
private String proofingApplyNo;
/**
* 产品id
*/
@Column(name = "product_id")
private String productId;
/**
* 客户id
*/
@Column(name = "customer_id")
private String customerId;
/**
* 版面需求时间
*/
@Column(name = "proofing_apply_page_need_time")
private Date proofingApplyPageNeedTime;
/**
* 完成日期
*/
@Column(name = "proofing_apply_complete_date")
private Date proofingApplyCompleteDate;
/**
* 中文样品名
*/
@Column(name = "proofing_apply_sample_cn_name")
private String proofingApplySampleCnName;
/**
* 英文样品名
*/
@Column(name = "proofing_apply_sample_en_name")
private String proofingApplySampleEnName;
/**
* 样品版次
*/
@Column(name = "proofing_apply_sample_version")
private Integer proofingApplySampleVersion;
/**
* 样品规格
*/
@Column(name = "proofing_apply_sample_size")
private Integer proofingApplySampleSize;
/**
* 样品数量
*/
@Column(name = "proofing_apply_sample_num")
private Long proofingApplySampleNum;
/**
* 产量情况
*/
@Column(name = "proofing_apply_output_situation")
private String proofingApplyOutputSituation;
/**
* 产品代号
*/
@Column(name = "proofing_apply_product_no")
private String proofingApplyProductNo;
/**
* 打样形式
*/
@Column(name = "proofing_type")
private String proofingType;
/**
* 分配方式
*/
@Column(name = "proofing_apply_allocation_type")
private String proofingApplyAllocationType;
/**
* 表面处理
*/
@Column(name = "proofing_apply_surface_treatment")
private String proofingApplySurfaceTreatment;
/**
* NG重新打样原因
*/
@Column(name = "proofing_apply_ng_re_reason")
private String proofingApplyNgReReason;
/**
*申请单状态
*/
@Column(name = "proofing_apply_application_status")
private String proofingApplyApplicationStatus;
/**
*测试标准
*/
@Column(name = "proofing_apply_test_standard")
private String proofingApplyTestStandard;
/**
*测试标准
*/
@Column(name = "is_output")
private String isOutput;
/**
*测试标准
*/
@Column(name = "is_out")
private String isOut;
/**
*测试标准
*/
@Column(name = "is_change")
private String isChange;
/**
* 长;单位cm
*/
@Column(name = "product_length")
private Double productLength;
/**
* 宽;单位cm
*/
@Column(name = "product_width")
private Double productWidth;
/**
* 高;单位cm
*/
@Column(name = "product_height")
private Double productHeight;
/**
* 厚度;单位mm
*/
@Column(name = "product_thick")
private Double productThick;
/**
* 成品克重;单位g
*/
@Column(name = "product_weight")
private Double productWeight;
/**
* 角型
*/
@Column(name = "product_angle_type")
private String productAngleType;
/**
* 角度(单位mm)
*/
@Column(name = "product_angle")
private Double productAngle;
/**
* 孔径(单位mm)
*/
@Column(name = "product_aperture")
private Double productAperture;
/**
* 单层厚(单位丝)
*/
@Column(name = "product_single_layer")
private Integer productSingleLayer;
/**
* 单重(单位KG)
*/
@Column(name = "product_single_weight")
private Double productSingleWeight;
/**
* 层数
*/
@Column(name = "product_layer_num")
private Integer productLayerNum;
@Override
......
......@@ -19,13 +19,12 @@ public class ProofingMakeVo{
/**
* 制作单id
*/
@Column(name = "proofing_make_id")
private String proofingMakeId;
/**
* 制作单号
*/
@Column(name = "proofing_make_no")
private String proofingMakeNo;
......@@ -33,14 +32,12 @@ public class ProofingMakeVo{
* 申请单的主键id
* proofing_apply表的主键是id列
*/
@Column(name = "id")
private String id;
/**
* 申请单id
*/
@Column(name = "proofing_apply_id")
private String proofingApplyId;
......@@ -48,79 +45,66 @@ public class ProofingMakeVo{
/**
* 申请单号
*/
@Column(name = "proofing_apply_no")
private String proofingApplyNo;
/**
* 产品id
*/
@Column(name = "product_id")
private String productId;
/**
* 客户id
*/
@Column(name = "customer_id")
private String customerId;
/**
* 版面需求时间
*/
@Column(name = "proofing_apply_page_need_time")
private Date proofingApplyPageNeedTime;
/**
* 完成日期
*/
@Column(name = "proofing_apply_complete_date")
private Date proofingApplyCompleteDate;
/**
* 中文样品名
*/
@Column(name = "proofing_apply_sample_cn_name")
private String proofingApplySampleCnName;
/**
* 英文样品名
*/
@Column(name = "proofing_apply_sample_en_name")
private String proofingApplySampleEnName;
/**
* 样品版次
*/
@Column(name = "proofing_apply_sample_version")
private Integer proofingApplySampleVersion;
/**
* 样品规格
*/
@Column(name = "proofing_apply_sample_size")
private Integer proofingApplySampleSize;
/**
* 样品数量
*/
@Column(name = "proofing_apply_sample_num")
private Long proofingApplySampleNum;
/**
* 产量情况
*/
@Column(name = "proofing_apply_output_situation")
private String proofingApplyOutputSituation;
/**
* 产品代号
*/
@Column(name = "proofing_apply_product_no")
private String proofingApplyProductNo;
/**
* 打样形式
*/
@Column(name = "proofing_type")
private String proofingType;
/**
......@@ -131,7 +115,6 @@ public class ProofingMakeVo{
/**
* 分配方式
*/
@Column(name = "proofing_apply_allocation_type")
private String proofingApplyAllocationType;
/**
......@@ -141,115 +124,96 @@ public class ProofingMakeVo{
/**
* 表面处理
*/
@Column(name = "proofing_apply_surface_treatment")
private String proofingApplySurfaceTreatment;
/**
* NG重新打样原因
*/
@Column(name = "proofing_apply_ng_re_reason")
private String proofingApplyNgReReason;
/**
*申请单状态
*/
@Column(name = "proofing_apply_application_status")
private String proofingApplyApplicationStatus;
/**
*测试标准
*/
@Column(name = "proofing_apply_test_standard")
private String proofingApplyTestStandard;
/**
*颜色种类
*/
@Column(name = "color_type")
private String colorType;
/**
*专
*/
@Column(name = "expert")
private String expert;
/**
* 网版目数
*/
@Column(name = "printing_plate_num")
private Integer printingPlateNum;
/**
*啤版目数
*/
@Column(name = "beer_plate_num")
private Integer beerPlateNum;
/**
*模切板目数
*/
@Column(name = "die_board_num")
private Integer dieBoardNum;
//产品打样排版参数方面字段
/**
* 模数
*/
@Column(name = "modulus")
private Integer modulus;
/**
* 行数
*/
@Column(name = "row_num")
private Integer rowNum;
/**
* 列数
*/
@Column(name = "column_num")
private Integer columnNum;
/**
* 搭版数
*/
@Column(name = "contact_num")
private Integer contactNum;
/**
* 行双刀位(单位mm)
*/
@Column(name = "row_double_blade")
private Double rowDoubleBlade;
/**
* 列双刀位(单位mm)
*/
@Column(name = "column_double_blade")
private Double columnDoubleBlade;
/**
* 派工倍数
*/
@Column(name = "dispatch_multiple")
private Integer dispatchMultiple;
/**
* 印张长度(单位cm)
*/
@Column(name = "sheet_length")
private Double sheetLength;
/**
* 印张宽度(单位cm)
*/
@Column(name = "sheet_width")
private Double sheetWidth;
/**
* 产品印张设置(product_sheet_conf)
*/
@Column(name = "product_sheet_conf")
private String productSheetConf;
}
\ No newline at end of file
......@@ -9,28 +9,23 @@ import java.io.Serializable;
/**
* 作业指导申请书
* @TableName work_instrcution_apply
*
*/
@Table(name="work_instrcution_apply")
@Data
public class WorkInstrcutionApplyVo implements Serializable {
/**
* 作业指导申请书id
*/
@Id
@Column(name = "work_instrcution_apply_id")
private String workInstrcutionApplyId;
/**
* 打样制作单id
*/
@Column(name = "proofing_make_id")
private String proofingMakeId;
/**
* 产品id
*/
@Column(name = "product_id")
private String productId;
......@@ -38,55 +33,46 @@ public class WorkInstrcutionApplyVo implements Serializable {
/**
* 规格书编号
*/
@Column(name = "specification_no")
private String specificationNo;
/**
* 换算值
*/
@Column(name = "matrixing_value")
private Integer matrixingValue;
/**
* 尺码组
*/
@Column(name = "size_group")
private String sizeGroup;
/**
* 是否禁用
*/
@Column(name = "is_disable")
private String isDisable;
/**
* 是否创建新规格书
*/
@Column(name = "is_new_specification")
private String isNewSpecification;
/**
* 是否要鞋图
*/
@Column(name = "is_shoe_pattern")
private String isShoePattern;
/**
* 是否附样品
*/
@Column(name = "is_attached_sample")
private String isAttachedSample;
/**
* 是否为唯一码产品
*/
@Column(name = "is_only_code")
private String isOnlyCode;
/**
* 是否不考虑形体配色
*/
@Column(name = "is_body_color")
private String isBodyColor;
private static final long serialVersionUID = 1L;
......
......@@ -6,4 +6,6 @@ import org.springframework.data.jpa.repository.JpaRepository;
public interface ProofingApplyRepository extends JpaRepository<ProofingApply, String> {
ProofingApply findByProofingApplyId(String proofingApplyId);
ProofingApply findByProofingApplyNo(String proofingApplyNo);
}
......@@ -38,9 +38,9 @@ public class ProofingMakeServiceImpl implements ProofingMakeService {
List<ProofingMake> makeAll = proofingMakeRepository.findAll();
return makeAll.stream().map(proofingMake -> {
ProofingApply proofingApply = proofingApplyRepository.findOne(proofingMake.getProofingApplyId());
ProductLooked productLooked = productLookedRepository.getProductLookedByProductId(proofingApply.getProductId());
// ProductLooked productLooked = productLookedRepository.getProductLookedByProductId(proofingApply.getProductId());
// ProductPublishedConf productPublishedConf = productPublishedConfRepository.getProductPublishedConfByProductId(proofingApply.getProductId());
return this.getProofingMakeVo(proofingMake,proofingApply,productLooked);
return this.getProofingMakeVo(proofingMake,proofingApply);
})
.collect(Collectors.toList());
}
......
<?xml version="1.0" encoding="UTF-8"?>
<easy-search-mappings>
<easy-search name="proofingApplyCode" desc="订单">
<sql>select p.proofing_apply_no,p.product_id from proofing_apply p</sql>
<field name="申请单号" title="申请单号" code="proofingApplyNo" width="200" />
<field name="产品编号" title="产品编号" code="productId" width="200" />
</easy-search>
</easy-search-mappings>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="generator.mapper.WorkInstrcutionApplyMapper">
<resultMap id="BaseResultMap" type="com.huigou.topsun.proofing.domain.model.WorkInstrcutionApply">
<id property="workInstrcutionApplyId" column="work_instrcution_apply_id" jdbcType="VARCHAR"/>
<result property="proofingMakeId" column="proofing_make_id" jdbcType="VARCHAR"/>
<result property="specificationNo" column="specification_no" jdbcType="VARCHAR"/>
<result property="matrixingValue" column="matrixing_value" jdbcType="INTEGER"/>
<result property="sizeGroup" column="size_group" jdbcType="VARCHAR"/>
<result property="isDisable" column="is_disable" jdbcType="CHAR"/>
<result property="isNewSpecification" column="is_new_specification" jdbcType="CHAR"/>
<result property="isShoePattern" column="is_shoe_pattern" jdbcType="CHAR"/>
<result property="isAttachedSample" column="is_attached_sample" jdbcType="CHAR"/>
<result property="isOnlyCode" column="is_only_code" jdbcType="CHAR"/>
<result property="isBodyColor" column="is_body_color" jdbcType="CHAR"/>
</resultMap>
<sql id="Base_Column_List">
work_instrcution_apply_id,proofing_make_id,specification_no,
matrixing_value,size_group,is_disable,
is_new_specification,is_shoe_pattern,is_attached_sample,
is_only_code,is_body_color
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from work_instrcution_apply
where work_instrcution_apply_id = #{workInstrcutionApplyId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from work_instrcution_apply
where work_instrcution_apply_id = #{workInstrcutionApplyId,jdbcType=VARCHAR}
</delete>
<insert id="insert" keyColumn="work_instrcution_apply_id" keyProperty="workInstrcutionApplyId" parameterType="com.huigou.topsun.proofing.domain.model.WorkInstrcutionApply" useGeneratedKeys="true">
insert into work_instrcution_apply
( work_instrcution_apply_id,proofing_make_id,specification_no
,matrixing_value,size_group,is_disable
,is_new_specification,is_shoe_pattern,is_attached_sample
,is_only_code,is_body_color)
values (#{workInstrcutionApplyId,jdbcType=VARCHAR},#{proofingMakeId,jdbcType=VARCHAR},#{specificationNo,jdbcType=VARCHAR}
,#{matrixingValue,jdbcType=INTEGER},#{sizeGroup,jdbcType=VARCHAR},#{isDisable,jdbcType=CHAR}
,#{isNewSpecification,jdbcType=CHAR},#{isShoePattern,jdbcType=CHAR},#{isAttachedSample,jdbcType=CHAR}
,#{isOnlyCode,jdbcType=CHAR},#{isBodyColor,jdbcType=CHAR})
</insert>
<insert id="insertSelective" keyColumn="work_instrcution_apply_id" keyProperty="workInstrcutionApplyId" parameterType="com.huigou.topsun.proofing.domain.model.WorkInstrcutionApply" useGeneratedKeys="true">
insert into work_instrcution_apply
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="workInstrcutionApplyId != null">work_instrcution_apply_id,</if>
<if test="proofingMakeId != null">proofing_make_id,</if>
<if test="specificationNo != null">specification_no,</if>
<if test="matrixingValue != null">matrixing_value,</if>
<if test="sizeGroup != null">size_group,</if>
<if test="isDisable != null">is_disable,</if>
<if test="isNewSpecification != null">is_new_specification,</if>
<if test="isShoePattern != null">is_shoe_pattern,</if>
<if test="isAttachedSample != null">is_attached_sample,</if>
<if test="isOnlyCode != null">is_only_code,</if>
<if test="isBodyColor != null">is_body_color,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="workInstrcutionApplyId != null">#{workInstrcutionApplyId,jdbcType=VARCHAR},</if>
<if test="proofingMakeId != null">#{proofingMakeId,jdbcType=VARCHAR},</if>
<if test="specificationNo != null">#{specificationNo,jdbcType=VARCHAR},</if>
<if test="matrixingValue != null">#{matrixingValue,jdbcType=INTEGER},</if>
<if test="sizeGroup != null">#{sizeGroup,jdbcType=VARCHAR},</if>
<if test="isDisable != null">#{isDisable,jdbcType=CHAR},</if>
<if test="isNewSpecification != null">#{isNewSpecification,jdbcType=CHAR},</if>
<if test="isShoePattern != null">#{isShoePattern,jdbcType=CHAR},</if>
<if test="isAttachedSample != null">#{isAttachedSample,jdbcType=CHAR},</if>
<if test="isOnlyCode != null">#{isOnlyCode,jdbcType=CHAR},</if>
<if test="isBodyColor != null">#{isBodyColor,jdbcType=CHAR},</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.huigou.topsun.proofing.domain.model.WorkInstrcutionApply">
update work_instrcution_apply
<set>
<if test="proofingMakeId != null">
proofing_make_id = #{proofingMakeId,jdbcType=VARCHAR},
</if>
<if test="specificationNo != null">
specification_no = #{specificationNo,jdbcType=VARCHAR},
</if>
<if test="matrixingValue != null">
matrixing_value = #{matrixingValue,jdbcType=INTEGER},
</if>
<if test="sizeGroup != null">
size_group = #{sizeGroup,jdbcType=VARCHAR},
</if>
<if test="isDisable != null">
is_disable = #{isDisable,jdbcType=CHAR},
</if>
<if test="isNewSpecification != null">
is_new_specification = #{isNewSpecification,jdbcType=CHAR},
</if>
<if test="isShoePattern != null">
is_shoe_pattern = #{isShoePattern,jdbcType=CHAR},
</if>
<if test="isAttachedSample != null">
is_attached_sample = #{isAttachedSample,jdbcType=CHAR},
</if>
<if test="isOnlyCode != null">
is_only_code = #{isOnlyCode,jdbcType=CHAR},
</if>
<if test="isBodyColor != null">
is_body_color = #{isBodyColor,jdbcType=CHAR},
</if>
</set>
where work_instrcution_apply_id = #{workInstrcutionApplyId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.huigou.topsun.proofing.domain.model.WorkInstrcutionApply">
update work_instrcution_apply
set
proofing_make_id = #{proofingMakeId,jdbcType=VARCHAR},
specification_no = #{specificationNo,jdbcType=VARCHAR},
matrixing_value = #{matrixingValue,jdbcType=INTEGER},
size_group = #{sizeGroup,jdbcType=VARCHAR},
is_disable = #{isDisable,jdbcType=CHAR},
is_new_specification = #{isNewSpecification,jdbcType=CHAR},
is_shoe_pattern = #{isShoePattern,jdbcType=CHAR},
is_attached_sample = #{isAttachedSample,jdbcType=CHAR},
is_only_code = #{isOnlyCode,jdbcType=CHAR},
is_body_color = #{isBodyColor,jdbcType=CHAR}
where work_instrcution_apply_id = #{workInstrcutionApplyId,jdbcType=VARCHAR}
</update>
</mapper>
......@@ -4,7 +4,9 @@
<facet type="jpa" name="JPA">
<configuration>
<setting name="validation-enabled" value="true" />
<datasource-mapping />
<datasource-mapping>
<factory-entry name="topsun" />
</datasource-mapping>
<naming-strategy-map />
</configuration>
</facet>
......
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