Commit 9ff32c97 by anxiaohe

bug修改

parent 9da7e783
...@@ -14,9 +14,10 @@ ...@@ -14,9 +14,10 @@
<%@ attribute name="callback" type="java.lang.String" required="false" description="回调"%> <%@ attribute name="callback" type="java.lang.String" required="false" description="回调"%>
<%@ attribute name="iframeUrl" type="java.lang.String" required="false" description="iframe窗口"%> <%@ attribute name="iframeUrl" type="java.lang.String" required="false" description="iframe窗口"%>
<%@ attribute name="allowClear" type="java.lang.Boolean" required="false" description="是否允许清除"%> <%@ attribute name="allowClear" type="java.lang.Boolean" required="false" description="是否允许清除"%>
<%@ attribute name="hasLabelName" type="java.lang.Boolean" required="false" description="是否有lableName"%>
<input id="${id}Id" class="${cssClass} form-control" type="hidden" value="${value}"/> <input id="${id}Id" class="${cssClass} form-control" type="hidden" value="${value}"/>
<div class="input-group" style="width:100%"> <div class="input-group" style="width:100%">
<input id="${id}Name" ${allowInput?'':'readonly="readonly"'} type="text" value="${labelValue}" data-msg-required="${dataMsgRequired}" <input id="${id}Name" name="${hasLabelName ? labelName : ''}" ${allowInput?'':'readonly="readonly"'} type="text" value="${labelValue}" data-msg-required="${dataMsgRequired}"
class="${cssClass}" style="${cssStyle}"/> class="${cssClass}" style="${cssStyle}"/>
<span class="input-group-btn"> <span class="input-group-btn">
<button type="button" id="${id}Button" class="btn <c:if test="${fn:contains(cssClass, 'input-sm')}"> btn-sm </c:if><c:if test="${fn:contains(cssClass, 'input-lg')}"> btn-lg </c:if> btn-primary ${disabled} ${hideBtn ? 'hide' : ''}"><i class="fa fa-search"></i> <button type="button" id="${id}Button" class="btn <c:if test="${fn:contains(cssClass, 'input-sm')}"> btn-sm </c:if><c:if test="${fn:contains(cssClass, 'input-lg')}"> btn-lg </c:if> btn-primary ${disabled} ${hideBtn ? 'hide' : ''}"><i class="fa fa-search"></i>
......
...@@ -85,7 +85,7 @@ var pageConfig = { ...@@ -85,7 +85,7 @@ var pageConfig = {
// 图片高度 // 图片高度
Image_h: 63, Image_h: 63,
// 图片阈值 // 图片阈值
Image_Threshold: 220, Image_Threshold: 230,
// 图片打印模式 // 图片打印模式
Image_style_let: 3, Image_style_let: 3,
} }
...@@ -153,18 +153,18 @@ function printImage (url) { ...@@ -153,18 +153,18 @@ function printImage (url) {
}, },
] ]
} }
console.log(pack) // console.log(pack)
var str = JSON.stringify(pack, null, 2); // var str = JSON.stringify(pack, null, 2);
var blob = new Blob([str], { // var blob = new Blob([str], {
type: "application/json" // type: "application/json"
}); // });
var url = URL.createObjectURL(blob); // var url = URL.createObjectURL(blob);
//
var a = document.createElement('a'); // var a = document.createElement('a');
a.href = url; // a.href = url;
a.download = 'a.json'; // a.download = 'a.json';
a.click(); // a.click();
a.remove(); // a.remove();
on_link_device(pack, onBack); on_link_device(pack, onBack);
}) })
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
function initTable() { function initTable() {
var data = ${fns:toJson(materialLoss.materialLossInfoList)}; var data = ${fns:toJson(materialLoss.materialLossInfoList)};
console.log(data)
if(data.length){ if(data.length){
data = data.map(function(item){ data = data.map(function(item){
item.delFlag = 0; item.delFlag = 0;
...@@ -188,6 +189,7 @@ ...@@ -188,6 +189,7 @@
ledgerInfo: item ledgerInfo: item
} }
}) })
console.log(data)
$(selector).bootstrapTable('append', data) $(selector).bootstrapTable('append', data)
} }
}) })
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
if(data.length){ if(data.length){
data = data.map(function(item){ data = data.map(function(item){
item.delFlag = 0; item.delFlag = 0;
item.infoSum = new Big(item.num).times(item.amount).toNumber(); item.infoSum = new Big(item.ledgerInfo.num).times(item.ledgerInfo.amount).toNumber();
return item; return item;
}) })
} }
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
function initTable() { function initTable() {
var data = ${fns:toJson(outbound.outboundInfoList)}; var data = ${fns:toJson(outbound.outboundInfoList)};
console.log(data)
if(data.length){ if(data.length){
data = data.map(function(item){ data = data.map(function(item){
item.delFlag = 0; item.delFlag = 0;
......
...@@ -331,7 +331,7 @@ function printQr (id) { ...@@ -331,7 +331,7 @@ function printQr (id) {
jp.loading('loading...'); jp.loading('loading...');
jp.get("${ctx}/warehouse/profitwarehousing/profitWarehousing/printQr?profitWarehousingInfoId="+id, function (res) { jp.get("${ctx}/warehouse/profitwarehousing/profitWarehousing/printQr?profitWarehousingInfoId="+id, function (res) {
if (res.success) { if (res.success) {
var row = res.body.goodsInfo.qrCode; var row = res.body.profitWarehousingInfo.qrCode;
var imgUrl = "${ctxPath}/" + row.url; var imgUrl = "${ctxPath}/" + row.url;
// jp.showPic(imgUrl); // jp.showPic(imgUrl);
_thermal_Image_print_(imgUrl); _thermal_Image_print_(imgUrl);
...@@ -424,7 +424,7 @@ function inLedgerInfo(id, rowIndex ){ ...@@ -424,7 +424,7 @@ function inLedgerInfo(id, rowIndex ){
{{row.type.code}} {{row.type.code}}
</td> </td>
<td> <td>
{{row.model}} {{row.marking}}
</td> </td>
<td> <td>
{{row.num}} {{row.num}}
......
...@@ -555,11 +555,11 @@ ...@@ -555,11 +555,11 @@
<script id="shelvesTpl" type="text/html">//<!-- <script id="shelvesTpl" type="text/html">//<!--
{{#row.readonly}} {{#row.readonly}}
<sys:shelvesselectNotName id="storageInfoList{{idx}}_shelves" name="storageInfoList[{{idx}}].shelvesIds" value="{{row.shelvesIds}}" labelName="storageInfoList[{{idx}}].shelvesNames" labelValue="{{row.shelvesNames}}" <sys:shelvesselectNotName id="storageInfoList{{idx}}_shelves" name="storageInfoList[{{idx}}].shelvesIds" value="{{row.shelvesIds}}" labelName="storageInfoList[{{idx}}].shelvesNames" labelValue="{{row.shelvesNames}}"
cssClass="form-control required" iframeUrl="/warehouse/storage/storage/form" disabled="disabled" isMultiSelected="true" allowClear="false" /> cssClass="form-control required" iframeUrl="/warehouse/storage/storage/form" disabled="disabled" isMultiSelected="true" allowClear="false" hasLabelName="true" />
{{/row.readonly}} {{/row.readonly}}
{{^row.readonly}} {{^row.readonly}}
<sys:shelvesselectNotName id="storageInfoList{{idx}}_shelves" name="storageInfoList[{{idx}}].shelvesIds" value="{{row.shelvesIds}}" labelName="storageInfoList[{{idx}}].shelvesNames" labelValue="{{row.shelvesNames}}" <sys:shelvesselectNotName id="storageInfoList{{idx}}_shelves" name="storageInfoList[{{idx}}].shelvesIds" value="{{row.shelvesIds}}" labelName="storageInfoList[{{idx}}].shelvesNames" labelValue="{{row.shelvesNames}}"
cssClass="form-control required" iframeUrl="/warehouse/storage/storage/form" callback="onSelectShelves" isMultiSelected="true" allowClear="false" />//--> cssClass="form-control required" iframeUrl="/warehouse/storage/storage/form" callback="onSelectShelves" isMultiSelected="true" allowClear="false" hasLabelName="true" />//-->
{{/row.readonly}} {{/row.readonly}}
</script> </script>
<script id="remarksTpl" type="text/html"> <script id="remarksTpl" type="text/html">
...@@ -571,7 +571,7 @@ ...@@ -571,7 +571,7 @@
{{/row.readonly}} {{/row.readonly}}
</script> </script>
<script id="warehouseTpl" type="text/html"> <script id="warehouseTpl" type="text/html">
<input id="storageInfoList{{idx}}_warehouseName" type="text" value="{{row.warehouseNames}}" readonly class="form-control "/> <input id="storageInfoList{{idx}}_warehouseName" name="storageInfoList[{{idx}}].warehouseNames" type="text" value="{{row.warehouseNames}}" readonly class="form-control required"/>
<input id="storageInfoList{{idx}}_warehouseIds" name="storageInfoList[{{idx}}].warehouseIds" type="hidden" value="{{row.warehouseIds}}" readonly class="form-control "/> <input id="storageInfoList{{idx}}_warehouseIds" name="storageInfoList[{{idx}}].warehouseIds" type="hidden" value="{{row.warehouseIds}}" readonly class="form-control "/>
<input type="hidden" id="storageInfoList{{idx}}_shelvesIds" name="storageInfoList[{{idx}}].shelvesIds" value="{{row.shelvesIds}}"> <input type="hidden" id="storageInfoList{{idx}}_shelvesIds" name="storageInfoList[{{idx}}].shelvesIds" value="{{row.shelvesIds}}">
</script> </script>
......
...@@ -135,6 +135,7 @@ ...@@ -135,6 +135,7 @@
}); });
}); });
function save() { function save() {
debugger
var isValidate = jp.validateForm('#inputForm');//校验表单 var isValidate = jp.validateForm('#inputForm');//校验表单
if(!isValidate){ if(!isValidate){
return false; return false;
...@@ -145,29 +146,29 @@ ...@@ -145,29 +146,29 @@
return; return;
} }
/**处理明细隐藏input元素*/ /**处理明细隐藏input元素*/
jp.loading(); // jp.loading();
getTableData().forEach(function(item,index){ // getTableData().forEach(function(item,index){
$("#inputForm").append("<div class='inputForm-hide-content'>" + Mustache.render($("#hideTpl").html(),{ // $("#inputForm").append("<div class='inputForm-hide-content'>" + Mustache.render($("#hideTpl").html(),{
row: item, // row: item,
idx: index // idx: index
}) + "</div>") // }) + "</div>")
}) // })
try { // try {
jp.post($("#inputForm").attr('action'),$('#inputForm').serialize(),function(data){ // jp.post($("#inputForm").attr('action'),$('#inputForm').serialize(),function(data){
if(data.success){ // if(data.success){
jp.getParent().refresh(); // jp.getParent().refresh();
var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引 // var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
parent.layer.close(dialogIndex); // parent.layer.close(dialogIndex);
jp.success(data.msg) // jp.success(data.msg)
//
}else{ // }else{
jp.error(data.msg); // jp.error(data.msg);
$(".inputForm-hide-content").remove(); // $(".inputForm-hide-content").remove();
} // }
}) // })
} catch (e) { // } catch (e) {
$(".inputForm-hide-content").remove(); // $(".inputForm-hide-content").remove();
} // }
} }
......
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