Commit 68ab7d45 authored by 1650842865's avatar 1650842865

物料维护增加图片上传

parent d21d46d9
...@@ -1388,6 +1388,38 @@ function bindEvent() { ...@@ -1388,6 +1388,38 @@ function bindEvent() {
$("#eklas").val(data.eklas) $("#eklas").val(data.eklas)
} }
}); });
//正面图片
var _img=$('#showFrontPicture');
var _frontPicturePath=$('#frontPicturePath').val();
if (Public.isNotBlank(_frontPicturePath)) {
_img[0].src = $.getCSRFUrl('attachment/downFileBySavePath.ajax',{file:_frontPicturePath});
}
$('#addFrontPicture').uploadButton({
filetype: ['jpg','gif','jpeg','png','bmp'],
afterUpload: function(data){
_img[0].src = $.getCSRFUrl('attachmentDownFile.ajax',{id:data.id});
},
param: function(){
return {bizCode: 'frontPicture', bizId: $("#id").val(), flag: 'false', deleteOld: 'true', returnPath: 'true'};
}
});
//反面图片
var back_img=$('#showBackPicture');
var _backPicturePath=$('#backPicturePath').val();
if (Public.isNotBlank(_backPicturePath)) {
back_img[0].src = $.getCSRFUrl('attachment/downFileBySavePath.ajax',{file:_backPicturePath});
}
$('#addBackPicture').uploadButton({
filetype: ['jpg','gif','jpeg','png','bmp'],
afterUpload: function(data){
back_img[0].src = $.getCSRFUrl('attachmentDownFile.ajax',{id:data.id});
},
param: function(){
return {bizCode: 'backPicture', bizId: $("#id").val(), flag: 'false', deleteOld: 'true', returnPath: 'true'};
}
});
} }
function bindEvent_sale() { function bindEvent_sale() {
......
...@@ -9,13 +9,15 @@ ...@@ -9,13 +9,15 @@
var isAll ="${isAll}"; var isAll ="${isAll}";
var applyType="${applyType}"; var applyType="${applyType}";
</script> </script>
<x:base include="layout,dialog,grid,tree,combox,commonTree,date"/> <x:base include="layout,dialog,grid,tree,combox,commonTree,date,attachment"/>
<x:script src='/biz/topsun/sap/nonProdApply/nonProdApplyNext.js'/> <x:script src='/biz/topsun/sap/nonProdApply/nonProdApplyNext.js'/>
</head> </head>
<body> <body>
<x:hidden name="isDetailPage" value="false"/> <!--是否是详情页--> <x:hidden name="isDetailPage" value="false"/> <!--是否是详情页-->
<x:hidden name="deptCode" value="false"/> <!--是否是详情页--> <x:hidden name="deptCode" value="false"/> <!--是否是详情页-->
<x:hidden name="frontPicturePath"/>
<x:hidden name="backPicturePath"/>
<div class="container-fluid" style="padding: 10px;"> <div class="container-fluid" style="padding: 10px;">
<c:if test="${applyType==0||applyType==3}"> <c:if test="${applyType==0||applyType==3}">
...@@ -387,6 +389,22 @@ ...@@ -387,6 +389,22 @@
</div> </div>
</div> </div>
</div> </div>
<div class="hg-form-cols">
<div class="hg-form-row">
<div style="text-align: left;margin-top:10px;">
<img src='<c:url value="/images/photo.jpg"/>' height='200' width='170' border=0 id="showFrontPicture" onerror="src='<c:url value="/images/photo.jpg"/>';"/>
&nbsp;&nbsp;
<img src='<c:url value="/images/photo.jpg"/>' height='200' width='170' border=0 id="showBackPicture" onerror="src='<c:url value="/images/photo.jpg"/>';"/>
</div>
<div style="text-align: left;margin-top:20px;">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<x:button value="正面图片" id="addFrontPicture" icon="fa-hand-o-up"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<x:button value="反面图片" id="addBackPicture" icon="fa-hand-o-up"/>
</div>
</div>
</div>
</form> </form>
<form class="hg-form" method="post" action="" style="display: none;" id="auditForm"> <form class="hg-form" method="post" action="" style="display: none;" id="auditForm">
<div class=" border-left-top" style="margin-top: 10px;"> <div class=" border-left-top" style="margin-top: 10px;">
......
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