| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.CombBillQueryVo; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.entity.WrkDetl; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.CombParam; |
| | | import com.zy.asrs.service.LocDetlService; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.asrs.service.MobileService; |
| | | import com.zy.asrs.service.WrkDetlService; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.model.MobileLocDetlVo; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.ints.entity.WaitMatchk; |
| | | import com.zy.ints.entity.WaitMatin; |
| | | import com.zy.ints.service.WaitMatchkService; |
| | | import com.zy.ints.service.WaitMatinService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | private WrkDetlService wrkDetlService; |
| | | @Autowired |
| | | private WaitMatinService waitMatinService; |
| | | @Autowired |
| | | private WaitMatchkService waitMatchkService; |
| | | @Autowired |
| | | private MatCodeService matCodeService; |
| | | |
| | | /** |
| | | * 组托 |
| | |
| | | return R.ok().add(list); |
| | | } |
| | | |
| | | /** |
| | | * 根据PDA盘点数量,更新盘点通知档 |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @RequestMapping("/stock/check") |
| | | @Transactional |
| | | public R erpStockCheck(@RequestBody String param) { |
| | | Boolean flag = false; |
| | | JSONObject jsonObject = JSONObject.parseObject(param); |
| | | String checkListStr = jsonObject.getString("checkList"); |
| | | List<WaitMatchk> checkList = JSONArray.parseArray(checkListStr, WaitMatchk.class); |
| | | Long userId = 9527L; //getUserId();//9527L; |
| | | int seq = 0; |
| | | Date now = new Date(); |
| | | for (Integer i = 0; i < checkList.size(); i++) { |
| | | String locNo = checkList.get(i).getLocNo(); |
| | | String matNo = checkList.get(i).getMatNo(); |
| | | Double checkQty = checkList.get(i).getCheckQty(); |
| | | |
| | | Wrapper<WaitMatchk> wrapper = new EntityWrapper<WaitMatchk>().eq("loc_no",locNo).eq("mat_no",matNo); |
| | | WaitMatchk waitMatchk0 = waitMatchkService.selectOne(wrapper); |
| | | if(null != waitMatchk0){ |
| | | waitMatchk0.setCheckQty(checkQty); |
| | | flag = waitMatchkService.update(waitMatchk0,wrapper); |
| | | if(!flag){ |
| | | throw new CoolException("更新盘点通知档失败"); |
| | | } |
| | | } else { |
| | | MatCode matCode = matCodeService.selectOne(new EntityWrapper<MatCode>().eq("mat_no",matNo)); |
| | | WaitMatchk waitMatchk1 = waitMatchkService.selectOne(new EntityWrapper<WaitMatchk>().eq("loc_no",locNo).orderBy("seq_no",false)); |
| | | if(null != matCode) { |
| | | WaitMatchk waitMatchk = new WaitMatchk(); |
| | | waitMatchk.setLocNo(locNo); |
| | | waitMatchk.setMatNo(matNo); |
| | | if(null != waitMatchk1){ |
| | | waitMatchk.setBillNo(waitMatchk1.getBillNo()); |
| | | waitMatchk.setSeqNo(waitMatchk1.getSeqNo()+1); |
| | | waitMatchk.setZpallet(waitMatchk1.getZpallet()); |
| | | waitMatchk.setLinkErp(waitMatchk1.getLinkErp()); |
| | | waitMatchk.setIoStatus(waitMatchk1.getIoStatus()); |
| | | } else { |
| | | waitMatchk.setBillNo("0"); |
| | | waitMatchk.setSeqNo(seq++); |
| | | waitMatchk.setLinkErp(0); |
| | | waitMatchk.setIoStatus(1); |
| | | } |
| | | waitMatchk.setBillType(1);//抽盘 |
| | | waitMatchk.setMatName(matCode.getMatName()); |
| | | waitMatchk.setStockQty(0D); |
| | | waitMatchk.setCheckQty(checkQty); |
| | | waitMatchk.setModiTime(now); |
| | | waitMatchk.setModiUser(getUserId()); |
| | | waitMatchk.setAppeTime(now); |
| | | waitMatchk.setAppeUser(getUserId()); |
| | | flag = waitMatchkService.insert(waitMatchk); |
| | | if(!flag){ |
| | | throw new CoolException("新增盘点通知档数据失败"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | return R.ok().add(flag); |
| | | } |
| | | } |
| | |
| | | waitMatchk.setMatNo(locDetl.getMatNo());//产品编号 |
| | | waitMatchk.setMatName(locDetl.getMatName());//铲平名称 |
| | | waitMatchk.setSeqNo(i); |
| | | waitMatchk.setIoTime(new Date()); |
| | | // waitMatchk.setIoTime(new Date()); |
| | | waitMatchk.setZpallet(locDetl.getZpallet()); |
| | | waitMatchk.setAppeUser(userId); // 操作人员数据 |
| | | waitMatchk.setAppeTime(new Date()); |
| | |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.entity.MatCode; |
| | | import com.zy.asrs.service.LocDetlService; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.asrs.service.MatCodeService; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.ints.entity.WaitMatchk; |
| | | import com.zy.ints.service.WaitMatchkLogService; |
| | | import com.zy.ints.service.WaitMatchkService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class WaitMatchkController extends BaseController { |
| | | |
| | | @Autowired |
| | | private WaitMatchkService waitMatchkService; |
| | | @Autowired |
| | | private WaitMatchkLogService waitMatchkLogService; |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | @Autowired |
| | | private MatCodeService matCodeService; |
| | | |
| | | //盘点通知档 |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 删除盘点通知档,删除前转历史档 |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/waitMatchk/delete/auth") |
| | | @ManagerAuth |
| | | @Transactional |
| | | public R delete(@RequestParam String param){ |
| | | List<WaitMatchk> list = JSONArray.parseArray(param, WaitMatchk.class); |
| | | if (Cools.isEmpty(list)){ |
| | | return R.error(); |
| | | } |
| | | for (WaitMatchk entity : list){ |
| | | waitMatchkService.delete(new EntityWrapper<>(entity)); |
| | | boolean res = waitMatchkLogService.save(entity.getBillNo(),entity.getLocNo(),entity.getMatNo()); |
| | | if(!res){ |
| | | throw new CoolException("转历史档出错[locNo:"+entity.getLocNo()+"],[matNo:"+entity.getMatNo()+"]"); |
| | | }else { |
| | | waitMatchkService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 审核盘点单据 |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/waitMatchk/verify/auth") |
| | | @ManagerAuth |
| | | @Transactional |
| | | public R verify(@RequestParam String param){ |
| | | List<WaitMatchk> list = JSONArray.parseArray(param, WaitMatchk.class); |
| | | if (Cools.isEmpty(list)){ |
| | | return R.error(); |
| | | } |
| | | Date now = new Date(); |
| | | for (WaitMatchk entity : list){ |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no",entity.getLocNo())); |
| | | if(null != locMast && locMast.getLocSts().equals("F")){ |
| | | Wrapper<LocDetl> wrapperDetl = new EntityWrapper<LocDetl>().eq("loc_no",entity.getLocNo()).eq("mat_no",entity.getMatNo()); |
| | | LocDetl locDetl = locDetlService.selectOne(wrapperDetl); |
| | | if(null != locDetl) {//更新数量,删除明细 |
| | | if(entity.getCheckQty().equals(0)){ |
| | | if(!locDetlService.delete(wrapperDetl)){ |
| | | throw new CoolException("删除数量为0明细出错[locNo:"+locDetl.getLocNo()+"],[matNo:"+locDetl.getMatNo()+"]"); |
| | | } |
| | | }else{ |
| | | if(!entity.getCheckQty().equals(locDetl.getQty())){ //库存数量与盘点数量相同不用更新 |
| | | locDetl.setQty(entity.getCheckQty()); |
| | | if(!locDetlService.update(locDetl,wrapperDetl)){ |
| | | throw new CoolException("更新库存明细出错[locNo:"+locDetl.getLocNo()+"],[matNo:"+locDetl.getMatNo()+"]"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } else {//插入明细 |
| | | LocDetl one = new LocDetl(); |
| | | one.setLocNo(entity.getLocNo()); |
| | | one.setMatNo(entity.getMatNo()); |
| | | one.setQty(entity.getCheckQty()); |
| | | one.setModiUser(getUserId()); |
| | | one.setModiTime(now); |
| | | one.setAppeUser(getUserId()); |
| | | one.setAppeTime(now); |
| | | |
| | | WaitMatchk waitMatchk = waitMatchkService.selectOne(new EntityWrapper<WaitMatchk>().eq("loc_no",entity.getLocNo())); |
| | | if(null != waitMatchk){ |
| | | one.setZpallet(waitMatchk.getZpallet()); |
| | | } |
| | | MatCode matCode = matCodeService.selectOne(new EntityWrapper<MatCode>().eq("mat_no",entity.getMatNo())); |
| | | if(null != matCode) { |
| | | one.setMatName(matCode.getMatName()); |
| | | one.setUnit(matCode.getUnit()); |
| | | one.setSpecs(matCode.getSpecs()); |
| | | one.setSize(matCode.getSize()); |
| | | one.setColor(matCode.getColor()); |
| | | } else { |
| | | throw new CoolException("新增明细物料编码不存在出错[matNo:"+entity.getMatNo()+"]"); |
| | | } |
| | | |
| | | if(!locDetlService.insert(one)){ |
| | | throw new CoolException("插入库存明细出错[locNo:"+entity.getLocNo()+"],[matNo:"+entity.getMatNo()+"]"); |
| | | } |
| | | } |
| | | |
| | | entity.setVerifyStatus(1); |
| | | entity.setVerifyUser(getUserId()); |
| | | entity.setModiTime(now); |
| | | Wrapper<WaitMatchk> wrapper = new EntityWrapper<WaitMatchk>().eq("loc_no",entity.getLocNo()).eq("mat_no",entity.getMatNo()); |
| | | waitMatchkService.update(entity,wrapper); |
| | | } else { |
| | | throw new CoolException("库位非在库状态:" + locMast.getLocNo()); |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | package com.zy.ints.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.core.common.SpringUtils; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.core.common.SpringUtils; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.core.common.SpringUtils; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.core.common.SpringUtils; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @TableName("ints_wait_matchk") |
| | | public class WaitMatchk implements Serializable { |
| | |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'locNo$', align: 'center',title: '库位号', merge:true}//,event: 'locNo', style: 'cursor:pointer' |
| | | // ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80} |
| | | ,{field: 'billNo', align: 'center',title: '单据编号'} |
| | | ,{field: 'seqNo', align: 'center',title: '序号'} |
| | | ,{field: 'billType$', align: 'center',title: '单据类型', hide: true} |
| | | ,{field: 'locNo$', align: 'center',title: '库位号',event: 'locNo', style: 'cursor:pointer'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘号'} |
| | | ,{field: 'matNo', align: 'center',title: '物料编码'} |
| | | ,{field: 'matName', align: 'center',title: '物料名称'} |
| | |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | form.on('checkbox(tableCheckbox)', function (data) { |
| | | var _index = $(data.elem).attr('table-index')||0; |
| | | if(data.elem.checked){ |
| | | res.data[_index][data.value] = 'Y'; |
| | | }else{ |
| | | res.data[_index][data.value] = 'N'; |
| | | } |
| | | }); |
| | | // form.on('checkbox(tableCheckbox)', function (data) { |
| | | // var _index = $(data.elem).attr('table-index')||0; |
| | | // if(data.elem.checked){ |
| | | // res.data[_index][data.value] = 'Y'; |
| | | // }else{ |
| | | // res.data[_index][data.value] = 'N'; |
| | | // } |
| | | // }); |
| | | // $('.layui-form-checkbox').css("pointer-events", "none"); |
| | | // $('td[data-field="0').css("cursor", "pointer") |
| | | merge(res);//调用 |
| | | } |
| | | }); |
| | | |
| | |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '新增', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | content: 'waitMatchk_detail.html', |
| | | success: function(layero, index){ |
| | | layer.getChildFrame('#data-detail-submit-edit', index).hide(); |
| | | clearFormVal(layer.getChildFrame('#detail', index)); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | var data = checkStatus.data; |
| | | |
| | | for(var i=0;i<data.length;i++){ |
| | | if (data[i].verifyStatus === 1) { |
| | | layer.msg('数据状态已审'); |
| | | return; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | if (data.length === 0){ |
| | | layer.msg('请选择数据'); |
| | | } else { |
| | | layer.confirm('确定审核'+(data.length===1?'此':data.length)+'条数据吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/waitMatchk/verify/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {param: JSON.stringify(data)}, |
| | | method: 'POST', |
| | | traditional:true, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | tableReload(false); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | // layer.open({ |
| | | // type: 2, |
| | | // title: '新增', |
| | | // maxmin: true, |
| | | // area: [top.detailWidth, top.detailHeight], |
| | | // content: 'waitMatchk_detail.html', |
| | | // success: function(layero, index){ |
| | | // layer.getChildFrame('#data-detail-submit-edit', index).hide(); |
| | | // clearFormVal(layer.getChildFrame('#detail', index)); |
| | | // layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | // } |
| | | // }); |
| | | break; |
| | | case 'deleteData': |
| | | var data = checkStatus.data; |
| | |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | function merge(res) { |
| | | var data = res.data; |
| | | var mergeIndex = 0;//定位需要添加合并属性的行数 |
| | | var mark = 1; //这里涉及到简单的运算,mark是计算每次需要合并的格子数 |
| | | var columsName = ['', 'locNo\\$'];//需要合并的列名称 |
| | | var columsIndex = [0, 1];//需要合并的列索引值 |
| | | |
| | | for (var k = 0; k < columsName.length; k++) { //这里循环所有要合并的列 |
| | | var trArr = $(".layui-table-body>.layui-table").find("tr");//所有行 |
| | | for (var i = 1; i < res.data.length; i++) { //这里循环表格当前的数据 |
| | | var tdCurArr = trArr.eq(i).find("td").eq(columsIndex[k]);//获取当前行的当前列 |
| | | var tdPreArr = trArr.eq(mergeIndex).find("td").eq(columsIndex[k]);//获取相同列的第一列 |
| | | |
| | | if (data[i][columsName[k]] === data[i - 1][columsName[k]]) { //后一行的值与前一行的值做比较,相同就需要合并 |
| | | mark += 1; |
| | | tdPreArr.each(function () {//相同列的第一列增加rowspan属性 |
| | | $(this).attr("rowspan", mark); |
| | | }); |
| | | tdCurArr.each(function () {//当前行隐藏 |
| | | $(this).css("display", "none"); |
| | | }); |
| | | } else { |
| | | mergeIndex = i; |
| | | mark = 1;//一旦前后两行的值不一样了,那么需要合并的格子数mark就需要重新计算 |
| | | } |
| | | } |
| | | mergeIndex = 0; |
| | | mark = 1; |
| | | } |
| | | } |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | |
| | | } |
| | | }); |
| | | break; |
| | | case 'locNo': |
| | | var param = top.reObject(data).locNo; |
| | | if (param === undefined) { |
| | | layer.msg("无数据"); |
| | | } else { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '库位号详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: '../locMast/locMast_detail.html', |
| | | success: function(layero, index){ |
| | | $.ajax({ |
| | | url: "baseUrl+/locMast/"+ param +"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | setFormVal(layer.getChildFrame('#detail', index), res.data, true); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); |
| | | layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide(); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | break; |
| | | case 'verifyUser': |
| | | var param = top.reObject(data).verifyUser; |
| | | if (param === undefined) { |
| | | layer.msg("无数据"); |
| | | } else { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '审核人员详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: '../user/user_detail.html', |
| | | success: function(layero, index){ |
| | | $.ajax({ |
| | | url: "baseUrl+/user/"+ param +"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | setFormVal(layer.getChildFrame('#detail', index), res.data, true); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); |
| | | layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide(); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | break; |
| | | case 'modiUser': |
| | | var param = top.reObject(data).modiUser; |
| | | if (param === undefined) { |
| | | layer.msg("无数据"); |
| | | } else { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '修改人员详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: '../user/user_detail.html', |
| | | success: function(layero, index){ |
| | | $.ajax({ |
| | | url: "baseUrl+/user/"+ param +"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | setFormVal(layer.getChildFrame('#detail', index), res.data, true); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); |
| | | layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide(); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | break; |
| | | case 'appeUser': |
| | | var param = top.reObject(data).appeUser; |
| | | if (param === undefined) { |
| | | layer.msg("无数据"); |
| | | } else { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '建档人员详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: '../user/user_detail.html', |
| | | success: function(layero, index){ |
| | | $.ajax({ |
| | | url: "baseUrl+/user/"+ param +"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | setFormVal(layer.getChildFrame('#detail', index), res.data, true); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); |
| | | layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide(); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | break; |
| | | |
| | | } |
| | | }); |
| | | |
| | |
| | | |
| | | }); |
| | | |
| | | // var b = true; |
| | | // $(function(){ |
| | | // $(document.body).on('click','td[data-field="0"]',function(){ |
| | | // var locNo = $(this).next().children("div").html(); |
| | | // if (b) { |
| | | // b = false; |
| | | // $("tr td[data-field=locNo\\$] div:contains("+ locNo +")").parent().prev().children().children("div").click(); |
| | | // setTimeout(function () { |
| | | // b = true; |
| | | // }, 200) |
| | | // } |
| | | // }); |
| | | // }) |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | |
| | | pageCurr -= 1; |
| | | } |
| | | limit(child); |
| | | // $('.layui-form-checkbox').css("pointer-events", "none"); |
| | | // $('td[data-field="0').css("cursor", "pointer") |
| | | } |
| | | }); |
| | | } |
| | |
| | | </div> |
| | | <div class="form-item"> |
| | | <span>规格型号</span> |
| | | <input id="str2" type="text" disabled="disabled"> |
| | | <input id="specs" type="text" disabled="disabled"> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span>单位</span> |
| | | <input id="str1" type="text" disabled="disabled"> |
| | | <input id="unit" type="text" disabled="disabled"> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span style="vertical-align: middle">数量</span> |
| | |
| | | if (res.code === 200) { |
| | | if (res.data != null) { |
| | | $('#matName').val(res.data.matName); |
| | | $('#str1').val(res.data.str1); |
| | | $('#str2').val(res.data.str2); |
| | | $('#specs').val(res.data.specs); |
| | | $('#unit').val(res.data.unit); |
| | | countDom.val(initMatCount); |
| | | $('#count').focus().select(); |
| | | } |
| | |
| | | checkList.push({ |
| | | locNo: item.locNo, |
| | | matNo: item.matNo, |
| | | count: item.count |
| | | checkQty: item.count |
| | | }); |
| | | }); |
| | | } |
| | |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify({ |
| | | checkList: checkList, |
| | | sourceList: sourceList, |
| | | // sourceList: sourceList, |
| | | }), |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | |
| | | limit: 500, |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {field: 'matnr', align: 'center', title: '编码', event: 'detail'}, |
| | | {field: 'maktx', align: 'center', title: '名称', event: 'detail'}, |
| | | {field: 'locNo', align: 'center', title: '库位', event: 'detail'}, |
| | | {field: 'count', align: 'center', title: '数量', event: 'detail', style:'color: blue', width:50}, |
| | | {field: 'pickNum', align: 'center', title: '拣料', event: 'detail', width:50}, |
| | | {field: 'matNo', align: 'center', title: '编码', event: 'detail'} |
| | | ,{field: 'matName', align: 'center', title: '名称', event: 'detail'} |
| | | ,{field: 'locNo', align: 'center', title: '库位', event: 'detail'} |
| | | ,{field: 'count', align: 'center', title: '数量', event: 'detail', style:'color: blue', width:50} |
| | | // ,{field: 'pickNum', align: 'center', title: '拣料', event: 'detail', width:50} |
| | | ]], |
| | | done: function (res, curr, count) { |
| | | } |
| | |
| | | </div> |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <!-- <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button>--> |
| | | <!-- <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">删除</button>--> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="margin-top: 10px">导出</button> |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">审核</button> |
| | | <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" >导出</button> |
| | | <!-- style="margin-top: 10px"--> |
| | | </div> |
| | | </script> |
| | | |