Commit 377576dc by yyq1988

优化盘盈入库相关问题

parent 0f2c6f06
...@@ -22,12 +22,13 @@ ...@@ -22,12 +22,13 @@
if(data.length){ if(data.length){
data = data.map(function(item){ data = data.map(function(item){
item.delFlag = 0; item.delFlag = 0;
item.readonly = item.qrCode && item.qrCode.state === '2'
return item; return item;
}) })
} }
$(selector).bootstrapTable({ $(selector).bootstrapTable({
data: data, data: data,
columns:[{checkbox: true}, columns:[{checkbox: true,formatter: function(vlaue,row){return {disabled: row.qrCode && row.qrCode.state === '2' }}},
{ {
field: 'no', field: 'no',
title: '序号', title: '序号',
...@@ -94,6 +95,17 @@ ...@@ -94,6 +95,17 @@
} }
}, },
{ {
field: 'qrCode.state',
title: '  状态  ',
formatter: function (value,row,index){
if(value === '2'){
return '已入库'
}else{
return '未入库'
}
}
},
{
field: 'remarks', field: 'remarks',
title: '备注', title: '备注',
formatter: function (value,row,index){ formatter: function (value,row,index){
...@@ -281,26 +293,58 @@ ...@@ -281,26 +293,58 @@
</script> </script>
<script id="nameTpl" type="text/html"> <script id="nameTpl" type="text/html">
{{#row.readonly}}
<input id="profitWarehousingInfoList{{idx}}_name" name="profitWarehousingInfoList[{{idx}}].name" type="text" value="{{row.name}}" readonly class="form-control "/>
{{/row.readonly}}
{{^row.readonly}}
<input id="profitWarehousingInfoList{{idx}}_name" name="profitWarehousingInfoList[{{idx}}].name" type="text" value="{{row.name}}" onchange="onInputChange('{{idx}}', this, 'name')" class="form-control "/> <input id="profitWarehousingInfoList{{idx}}_name" name="profitWarehousingInfoList[{{idx}}].name" type="text" value="{{row.name}}" onchange="onInputChange('{{idx}}', this, 'name')" class="form-control "/>
{{/row.readonly}}
</script> </script>
<script id="typeTpl" type="text/html">//<!-- <script id="typeTpl" type="text/html">//<!--
{{#row.readonly}}
<sys:treeselect id="profitWarehousingInfoList{{idx}}_type" name="profitWarehousingInfoList[{{idx}}].type.id" value="{{row.type.id}}" labelName="profitWarehousingInfoList{{idx}}.type.name" labelValue="{{row.type.name}}" <sys:treeselect id="profitWarehousingInfoList{{idx}}_type" name="profitWarehousingInfoList[{{idx}}].type.id" value="{{row.type.id}}" labelName="profitWarehousingInfoList{{idx}}.type.name" labelValue="{{row.type.name}}"
title="品名代码" url="/warehouse/materialtype/materialType/treeData" notAllowSelectParent="true" cssClass="form-control required" allowClear="true" allowSearch="true" callback="onSelectType" />//--> title="品名代码" url="/warehouse/materialtype/materialType/treeData" notAllowSelectParent="true" cssClass="form-control required" allowClear="true" allowSearch="true" disabled="disabled" />
{{/row.readonly}}
{{^row.readonly}}
<sys:treeselect id="profitWarehousingInfoList{{idx}}_type" name="profitWarehousingInfoList[{{idx}}].type.id" value="{{row.type.id}}" labelName="profitWarehousingInfoList{{idx}}.type.name" labelValue="{{row.type.name}}"
title="品名代码" url="/warehouse/materialtype/materialType/treeData" notAllowSelectParent="true" cssClass="form-control required" allowClear="true" allowSearch="true" callback="onSelectType" />
{{/row.readonly}}//-->
</script> </script>
<script id="modelTpl" type="text/html"> <script id="modelTpl" type="text/html">
{{#row.readonly}}
<input id="profitWarehousingInfoList{{idx}}_marking" name="profitWarehousingInfoList[{{idx}}].marking" type="text" value="{{row.marking}}" readonly class="form-control "/>
{{/row.readonly}}
{{^row.readonly}}
<input id="profitWarehousingInfoList{{idx}}_marking" name="profitWarehousingInfoList[{{idx}}].marking" type="text" value="{{row.marking}}" onchange="onInputChange('{{idx}}', this, 'marking')" class="form-control "/> <input id="profitWarehousingInfoList{{idx}}_marking" name="profitWarehousingInfoList[{{idx}}].marking" type="text" value="{{row.marking}}" onchange="onInputChange('{{idx}}', this, 'marking')" class="form-control "/>
{{/row.readonly}}
</script> </script>
<script id="amountTpl" type="text/html"> <script id="amountTpl" type="text/html">
{{#row.readonly}}
<input id="profitWarehousingInfoList{{idx}}_amount" name="profitWarehousingInfoList[{{idx}}].amount" type="text" value="{{row.amount}}" readonly class="form-control "/>
{{/row.readonly}}
{{^row.readonly}}
<input id="profitWarehousingInfoList{{idx}}_amount" name="profitWarehousingInfoList[{{idx}}].amount" type="text" value="{{row.amount}}" onchange="onInputChange('{{idx}}', this, 'amount')" class="form-control "/> <input id="profitWarehousingInfoList{{idx}}_amount" name="profitWarehousingInfoList[{{idx}}].amount" type="text" value="{{row.amount}}" onchange="onInputChange('{{idx}}', this, 'amount')" class="form-control "/>
{{/row.readonly}}
</script> </script>
<script id="shelvesTpl" type="text/html">//<!-- <script id="shelvesTpl" type="text/html">//<!--
{{#row.readonly}}
<sys:shelvesselect id="profitWarehousingInfoList{{idx}}_shelves" name="profitWarehousingInfoList[{{idx}}].shelves.id" value="{{row.shelves.id}}" labelName="profitWarehousingInfoList[{{idx}}].shelves.name" labelValue="{{row.shelves.name}}"
cssClass="form-control required" iframeUrl="/warehouse/profitwarehousing/profitWarehousing/form" disabled="disabled"></sys:shelvesselect>
{{/row.readonly}}
{{^row.readonly}}
<sys:shelvesselect id="profitWarehousingInfoList{{idx}}_shelves" name="profitWarehousingInfoList[{{idx}}].shelves.id" value="{{row.shelves.id}}" labelName="profitWarehousingInfoList[{{idx}}].shelves.name" labelValue="{{row.shelves.name}}" <sys:shelvesselect id="profitWarehousingInfoList{{idx}}_shelves" name="profitWarehousingInfoList[{{idx}}].shelves.id" value="{{row.shelves.id}}" labelName="profitWarehousingInfoList[{{idx}}].shelves.name" labelValue="{{row.shelves.name}}"
cssClass="form-control required" iframeUrl="/warehouse/profitwarehousing/profitWarehousing/form" callback="onSelectShelves"></sys:shelvesselect>//--> cssClass="form-control required" iframeUrl="/warehouse/profitwarehousing/profitWarehousing/form" callback="onSelectShelves"></sys:shelvesselect>
{{/row.readonly}}//-->
</script> </script>
<script id="remarksTpl" type="text/html"> <script id="remarksTpl" type="text/html">
{{#row.readonly}}
<textarea id="profitWarehousingInfoList{{idx}}_remarks" name="profitWarehousingInfoList[{{idx}}].remarks" rows="2" readonly class="form-control ">{{row.remarks}}</textarea>
{{/row.readonly}}
{{^row.readonly}}
<textarea id="profitWarehousingInfoList{{idx}}_remarks" name="profitWarehousingInfoList[{{idx}}].remarks" rows="2" onchange="onInputChange('{{idx}}', this, 'remarks')" class="form-control ">{{row.remarks}}</textarea> <textarea id="profitWarehousingInfoList{{idx}}_remarks" name="profitWarehousingInfoList[{{idx}}].remarks" rows="2" onchange="onInputChange('{{idx}}', this, 'remarks')" class="form-control ">{{row.remarks}}</textarea>
{{/row.readonly}}
</script> </script>
<script id="scanResultTpl" type="text/html"> <script id="scanResultTpl" type="text/html">
......
...@@ -422,6 +422,10 @@ $(document).ready(function() { ...@@ -422,6 +422,10 @@ $(document).ready(function() {
{{row.remarks}} {{row.remarks}}
</td> </td>
<td> <td>
{{#row.status}}
已入库
{{/row.status}}
{{^row.status}}
<button class="btn btn-primary btn-sm" onclick="printQr('{{row.id}}', '{{row.qrCodeStr}}',{{row.mainRowIndex}})"> <button class="btn btn-primary btn-sm" onclick="printQr('{{row.id}}', '{{row.qrCodeStr}}',{{row.mainRowIndex}})">
打印二维码 打印二维码
</button> </button>
...@@ -429,15 +433,11 @@ $(document).ready(function() { ...@@ -429,15 +433,11 @@ $(document).ready(function() {
清除二维码 清除二维码
</button> </button>
{{#row.hasQr}} {{#row.hasQr}}
{{#row.status}}
已入库
{{/row.status}}
{{^row.status}}
<button onclick="inLedgerInfo('{{row.id}}',{{row.mainRowIndex}})" class="btn btn-primary btn-sm"> <button onclick="inLedgerInfo('{{row.id}}',{{row.mainRowIndex}})" class="btn btn-primary btn-sm">
入库 入库
</button> </button>
{{/row.status}}
{{/row.hasQr}} {{/row.hasQr}}
{{/row.status}}
</td> </td>
</tr>//--> </tr>//-->
</script> </script>
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