Commit e6ec36e3 by 胡懿

Merge branch 'master' of 47.92.228.5:huyi/warehouse into hy

parents 8c7ba4c9 222f85f9
......@@ -9,6 +9,7 @@
a.name AS "name",
a.type AS "type.id",
type.name AS "type.name",
type.code AS "type.code",
a.marking AS "marking",
a.shelves_id AS "shelves.id",
shelves.name AS "shelves.name",
......
......@@ -93,6 +93,9 @@ public class ProfitWarehousingService extends CrudService<ProfitWarehousingMappe
ProfitWarehousingInfo profitWarehousingInfo = profitWarehousingInfoMapper.get(infoId);
// String numSeq = CodeUtil.code("WZBM", StaticNumSeq.WZBM);
Wzcode wzcode = wzcodeService.findByCode(profitWarehousingInfo.getType().getCode());
int intNum = wzcode.getIntNum();
intNum = intNum+1;
wzcode.setIntNum(intNum);
QrCode qrCode = new QrCode();
qrCode.setProfitWarehousingInfo(profitWarehousingInfo);
qrCode.setComeFlag("1");
......
......@@ -287,7 +287,14 @@ public class ProfitWarehousingController extends BaseController {
j.setMsg("二维码不存在");
return j;
}
if(Objects.equals(profitWarehousingInfo1.getQrCode().getState(), "0")){
profitWarehousingService.cleanQr(profitWarehousingInfoId);//保存
}else {
j.setSuccess(false);
j.setMsg("该物资已入账不能清除二维码");
return j;
}
j.setSuccess(true);
j.setMsg("清除二维码成功");
return j;
......
......@@ -270,6 +270,9 @@ $(document).ready(function() {
for (var i=0; i<data1.length; i++){
data1[i].dict = {};
data1[i].qrCodeStr = data1[i].qrCode && JSON.stringify(data1[i].qrCode);
data1[i].status = data1[i].qrCode && data1[i].qrCode.state === '2';
data1[i].hasQr = data1[i].qrCode;
data1[i].mainRowIndex = index;
addRow('#profitWarehousingChild-'+row.id+'-1-List', profitWarehousingChild1RowIdx, profitWarehousingChild1Tpl, data1[i]);
profitWarehousingChild1RowIdx = profitWarehousingChild1RowIdx + 1;
}
......@@ -289,12 +292,12 @@ $(document).ready(function() {
}
function printQr(id, qrCodeStr) {
jp.loading('loading...');
try{
if(!LODOP){
initLodop();
}
if(LODOP){
jp.loading('loading...');
if(qrCodeStr){
var qrCode = JSON.parse(qrCodeStr);
preview_LODOP(qrCode);
......@@ -329,6 +332,11 @@ $(document).ready(function() {
jp.error('二维码不存在!')
}
}
/**
* 清除二维码
* @param id 明细id
*/
function cleanQr(id) {
jp.confirm('确认清除二维码吗?', function (){
jp.get("${ctx}/warehouse/profitwarehousing/profitWarehousing/cleanQr?profitWarehousingInfoId="+id, function (res) {
......@@ -336,6 +344,25 @@ $(document).ready(function() {
})
})
}
/**
* 入库
* @param id 明细id
* @param rowIndex 主表下标
*/
function inLedgerInfo(id, rowIndex ){
jp.get("${ctx}/warehouse/profitwarehousing/profitWarehousing/inLedgerInfo?profitWarehousingInfoId="+ id, function (res){
if(res.success){
jp.success(res.msg);
$('#profitWarehousingTable').bootstrapTable('collapseRow', rowIndex);
setTimeout(function (){
$('#profitWarehousingTable').bootstrapTable('expandRow', rowIndex);
},0)
}else{
jp.error(res.msg);
}
})
}
</script>
<script type="text/template" id="profitWarehousingChildrenTpl">//<!--
<div class="tabs-container">
......@@ -393,6 +420,16 @@ $(document).ready(function() {
<button class="btn btn-danger btn-sm" onclick="cleanQr('{{row.id}}')">
清除二维码
</button>
{{#row.hasQr}}
{{#row.status}}
已入库
{{/row.status}}
{{^row.status}}
<button onclick="inLedgerInfo('{{row.id}}')" class="btn btn-primary btn-sm" onclick="cleanQr('{{row.id}}',{{row.mainRowIndex}})">
入库
</button>
{{/row.status}}
{{/row.hasQr}}
</td>
</tr>//-->
</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