Merge branch 'dev' of https://gitee.com/luxiaotao1123/zy-asrs
Conflicts:
src/main/webapp/views/wrkMast/wrkMast.html
| | |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.boot.builder.SpringApplicationBuilder; |
| | | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | |
| | | @EnableScheduling |
| | | @SpringBootApplication |
| | | public class Boot extends SpringBootServletInitializer { |
| | | |
| | |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | |
| | | @RequestMapping(value = "/locDetl/update") |
| | | public R update1() { |
| | | if (!locDetlService.updateLocNo("0402805", "0402804")) { |
| | | return R.error(); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locDetl/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | |
| | | import com.zy.asrs.entity.MatCodePrint; |
| | | import com.zy.asrs.service.MatCodeService; |
| | | import com.zy.common.CodeRes; |
| | | import com.zy.common.config.AdminInterceptor; |
| | | import com.zy.common.utils.BarcodeUtils; |
| | | import com.zy.common.utils.QrCode; |
| | | import com.zy.common.utils.excel.matcode.MatCodeExcel; |
| | |
| | | @RequestMapping(value = "/matCode/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(matCodeService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/matCode/auth") |
| | | @ManagerAuth |
| | | public R find(@RequestParam("id") String id) { |
| | | return R.ok(matCodeService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | // 打印 |
| | | @RequestMapping(value = "/macCode/print/auth") |
| | | @RequestMapping(value = "/matCode/print/auth") |
| | | @ManagerAuth(memo = "物料编码打印") |
| | | public R matCodePrint(@RequestParam(value = "param[]") String[] param) { |
| | | if(Cools.isEmpty(param)) { |
| | |
| | | public R matCodeBarcode(@RequestParam(defaultValue = "1") Integer type |
| | | , @RequestParam String param |
| | | , HttpServletResponse response) throws Exception { |
| | | AdminInterceptor.cors(response); |
| | | if (Cools.isEmpty(param)){ |
| | | return R.parse(BaseRes.EMPTY); |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | 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.LocDetl; |
| | | import com.zy.asrs.entity.LocMast; |
| | | 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.common.model.MobileLocDetlVo; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | 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.List; |
| | | |
| | | /** |
| | | * 移动端接口控制器 |
| | | * Created by vincent on 2020/6/10 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("mobile") |
| | | public class MobileController extends BaseController { |
| | | |
| | | @Autowired |
| | | private MobileService mobileService; |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | |
| | | /** |
| | | * 组托 |
| | | */ |
| | | @RequestMapping("/comb/auth") |
| | | @ManagerAuth(memo = "组托") |
| | | public R comb(@RequestBody CombParam combParam){ |
| | | mobileService.comb(combParam, getUserId()); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 组托 |
| | | */ |
| | | @RequestMapping("/comb/form") |
| | | @ManagerAuth(memo = "组托") |
| | | public R combForm(@RequestParam CombParam combParam){ |
| | | mobileService.comb(combParam, getUserId()); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 根据库位号查找库存明细 |
| | | */ |
| | | @RequestMapping("/locDetl") |
| | | @ManagerAuth |
| | | public R getLocDetl(@RequestParam(required = false)String locNo, |
| | | @RequestParam(required = false)String matNo){ |
| | | if (!Cools.isEmpty(locNo)) { |
| | | LocMast locMast = locMastService.selectById(locNo); |
| | | if (null == locMast || !"F".equals(locMast.getLocType())) { |
| | | return R.parse(BaseRes.EMPTY); |
| | | } |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>() |
| | | .eq("loc_no", locNo).orderBy("appe_time", false)); |
| | | List<MobileLocDetlVo> res = new ArrayList<>(); |
| | | locDetls.forEach(locDetl -> { |
| | | MobileLocDetlVo vo = new MobileLocDetlVo(); |
| | | vo.setLocNo(locDetl.getLocNo()); |
| | | vo.setMatnr(locDetl.getMatnr()); |
| | | vo.setMaktx(locDetl.getMaktx()); |
| | | vo.setCount(locDetl.getAnfme()); |
| | | res.add(vo); |
| | | }); |
| | | return R.ok().add(res); |
| | | } |
| | | if (!Cools.isEmpty(matNo)) { |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>() |
| | | .eq("matnr", matNo).orderBy("appe_time", false)); |
| | | List<MobileLocDetlVo> res = new ArrayList<>(); |
| | | locDetls.forEach(locDetl -> { |
| | | MobileLocDetlVo vo = new MobileLocDetlVo(); |
| | | vo.setLocNo(locDetl.getLocNo()); |
| | | vo.setMatnr(locDetl.getMatnr()); |
| | | vo.setMaktx(locDetl.getMaktx()); |
| | | vo.setCount(locDetl.getAnfme()); |
| | | res.add(vo); |
| | | }); |
| | | return R.ok().add(res); |
| | | } |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | } |
| New file |
| | |
| | | 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.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | 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.TrayCode; |
| | | import com.zy.asrs.service.TrayCodeService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class TrayCodeController extends BaseController { |
| | | |
| | | @Autowired |
| | | private TrayCodeService trayCodeService; |
| | | |
| | | @RequestMapping(value = "/trayCode/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(trayCodeService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/trayCode/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<TrayCode> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | else { |
| | | // wrapper.orderBy("id", false); |
| | | } |
| | | return R.ok(trayCodeService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/trayCode/add/auth") |
| | | @ManagerAuth |
| | | public R add(TrayCode trayCode) { |
| | | trayCodeService.insert(trayCode); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/trayCode/update/auth") |
| | | @ManagerAuth |
| | | public R update(TrayCode trayCode){ |
| | | if (Cools.isEmpty(trayCode) || null==trayCode.getId()){ |
| | | return R.error(); |
| | | } |
| | | trayCodeService.updateById(trayCode); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/trayCode/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam String param){ |
| | | List<TrayCode> list = JSONArray.parseArray(param, TrayCode.class); |
| | | if (Cools.isEmpty(list)){ |
| | | return R.error(); |
| | | } |
| | | for (TrayCode entity : list){ |
| | | trayCodeService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/trayCode/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<TrayCode> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("trayCode")); |
| | | convert(map, wrapper); |
| | | List<TrayCode> list = trayCodeService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/trayCodeQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<TrayCode> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<TrayCode> page = trayCodeService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (TrayCode trayCode : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", trayCode.getId()); |
| | | map.put("value", trayCode.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/trayCode/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<TrayCode> wrapper = new EntityWrapper<TrayCode>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != trayCodeService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(TrayCode.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/trayCode/latest") |
| | | @ManagerAuth |
| | | public R trayCodeLatest() { |
| | | List<TrayCode> latest = trayCodeService.selectList(new EntityWrapper<TrayCode>().orderBy("id", false)); |
| | | return R.ok().add(latest.isEmpty()?"10000001": Integer.parseInt(latest.get(0).getTrayNo())+1); |
| | | } |
| | | |
| | | @RequestMapping(value = "/trayCode/print/preview") |
| | | @ManagerAuth |
| | | public R printPreview(@RequestParam String startNo, |
| | | @RequestParam Integer count, |
| | | @RequestParam Integer type) { |
| | | if (count <= 0) { |
| | | return R.error("数量必须大于零"); |
| | | } |
| | | List<Map<String, Object>> res = new ArrayList<>(); |
| | | for (int i = 0; i<count; i++) { |
| | | res.add(Cools.add("item", String.valueOf(Integer.parseInt(startNo)+i))); |
| | | } |
| | | return R.ok().add(res); |
| | | } |
| | | |
| | | @RequestMapping(value = "/trayCode/print/auth") |
| | | @ManagerAuth(memo = "托盘码打印") |
| | | public R print(@RequestParam String startNo, |
| | | @RequestParam Integer count, |
| | | @RequestParam Integer type){ |
| | | if (count <= 0) { |
| | | return R.error("数量必须大于零"); |
| | | } |
| | | for (int i = 0; i<count; i++) { |
| | | TrayCode trayCode = new TrayCode( |
| | | String.valueOf(Integer.parseInt(startNo)+i), // 序列号[非空] |
| | | i==0?"Y":"N", // 起始 |
| | | i==count-1?"Y":"N", // 终止 |
| | | null, // 备注 |
| | | new Date(), // 修改时间 |
| | | getUserId(), // 修改人员 |
| | | new Date(), // 添加时间 |
| | | getUserId() // 添加人员 |
| | | ); |
| | | if (!trayCodeService.insert(trayCode)) { |
| | | throw new CoolException("保存序列号失败"); |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | 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.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.WaitPakin; |
| | | import com.zy.asrs.service.WaitPakinService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | public class WaitPakinController extends BaseController { |
| | | |
| | | @Autowired |
| | | private WaitPakinService waitPakinService; |
| | | |
| | | @RequestMapping(value = "/waitPakin/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(waitPakinService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitPakin/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<WaitPakin> wrapper = new EntityWrapper<>(); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | else { |
| | | wrapper.orderBy("modi_time", false); |
| | | } |
| | | return R.ok(waitPakinService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitPakin/add/auth") |
| | | @ManagerAuth |
| | | public R add(WaitPakin waitPakin) { |
| | | waitPakinService.insert(waitPakin); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitPakin/update/auth") |
| | | @ManagerAuth |
| | | public R update(WaitPakin waitPakin){ |
| | | if (Cools.isEmpty(waitPakin) || null==waitPakin.getId()){ |
| | | return R.error(); |
| | | } |
| | | waitPakinService.updateById(waitPakin); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitPakin/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam String param){ |
| | | List<WaitPakin> list = JSONArray.parseArray(param, WaitPakin.class); |
| | | if (Cools.isEmpty(list)){ |
| | | return R.error(); |
| | | } |
| | | for (WaitPakin entity : list){ |
| | | waitPakinService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitPakin/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<WaitPakin> wrapper = new EntityWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("waitPakin")); |
| | | convert(map, wrapper); |
| | | List<WaitPakin> list = waitPakinService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitPakinQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<WaitPakin> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<WaitPakin> page = waitPakinService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (WaitPakin waitPakin : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", waitPakin.getId()); |
| | | map.put("value", waitPakin.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitPakin/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<WaitPakin> wrapper = new EntityWrapper<WaitPakin>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != waitPakinService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(WaitPakin.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | 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.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.WaitPakinLog; |
| | | import com.zy.asrs.service.WaitPakinLogService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | public class WaitPakinLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private WaitPakinLogService waitPakinLogService; |
| | | |
| | | @RequestMapping(value = "/waitPakinLog/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(waitPakinLogService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitPakinLog/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<WaitPakinLog> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | else { |
| | | wrapper.orderBy("id", false); |
| | | } |
| | | return R.ok(waitPakinLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitPakinLog/add/auth") |
| | | @ManagerAuth |
| | | public R add(WaitPakinLog waitPakinLog) { |
| | | waitPakinLogService.insert(waitPakinLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitPakinLog/update/auth") |
| | | @ManagerAuth |
| | | public R update(WaitPakinLog waitPakinLog){ |
| | | if (Cools.isEmpty(waitPakinLog) || null==waitPakinLog.getId()){ |
| | | return R.error(); |
| | | } |
| | | waitPakinLogService.updateById(waitPakinLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitPakinLog/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam String param){ |
| | | List<WaitPakinLog> list = JSONArray.parseArray(param, WaitPakinLog.class); |
| | | if (Cools.isEmpty(list)){ |
| | | return R.error(); |
| | | } |
| | | for (WaitPakinLog entity : list){ |
| | | waitPakinLogService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitPakinLog/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<WaitPakinLog> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("waitPakinLog")); |
| | | convert(map, wrapper); |
| | | List<WaitPakinLog> list = waitPakinLogService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitPakinLogQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<WaitPakinLog> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<WaitPakinLog> page = waitPakinLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (WaitPakinLog waitPakinLog : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", waitPakinLog.getId()); |
| | | map.put("value", waitPakinLog.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitPakinLog/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<WaitPakinLog> wrapper = new EntityWrapper<WaitPakinLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != waitPakinLogService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(WaitPakinLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | @RequestMapping("/plate/out/start") |
| | | @ManagerAuth(memo = "全板出库") |
| | | @ManagerAuth(memo = "出库作业") |
| | | public R fullStoreTakeStart(@RequestBody StockOutParam param) { |
| | | workService.startupFullTakeStore(param, getUserId()); |
| | | return R.ok("出库启动成功"); |
| | |
| | | } else if (type == 2) { |
| | | workService.cancelWrkMast(workNo, getUserId()); |
| | | return R.ok("工作档已取消"); |
| | | } else if (type == 3) { |
| | | workService.pickWrkMast(workNo, getUserId()); |
| | | return R.ok("工作档已拣料入库"); |
| | | } |
| | | return R.ok(); |
| | | } |
| New file |
| | |
| | | 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.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.WrkDetlLog; |
| | | import com.zy.asrs.service.WrkDetlLogService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | public class WrkDetlLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private WrkDetlLogService wrkDetlLogService; |
| | | |
| | | @RequestMapping(value = "/wrkDetlLog/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(wrkDetlLogService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetlLog/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<WrkDetlLog> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | else { |
| | | wrapper.orderBy("appe_time", false); |
| | | } |
| | | return R.ok(wrkDetlLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetlLog/add/auth") |
| | | @ManagerAuth |
| | | public R add(WrkDetlLog wrkDetlLog) { |
| | | wrkDetlLogService.insert(wrkDetlLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetlLog/update/auth") |
| | | @ManagerAuth |
| | | public R update(WrkDetlLog wrkDetlLog){ |
| | | if (Cools.isEmpty(wrkDetlLog) || null==wrkDetlLog.getWrkNo()){ |
| | | return R.error(); |
| | | } |
| | | wrkDetlLogService.updateById(wrkDetlLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetlLog/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam String param){ |
| | | List<WrkDetlLog> list = JSONArray.parseArray(param, WrkDetlLog.class); |
| | | if (Cools.isEmpty(list)){ |
| | | return R.error(); |
| | | } |
| | | for (WrkDetlLog entity : list){ |
| | | wrkDetlLogService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetlLog/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<WrkDetlLog> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("wrkDetlLog")); |
| | | convert(map, wrapper); |
| | | List<WrkDetlLog> list = wrkDetlLogService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetlLogQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<WrkDetlLog> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<WrkDetlLog> page = wrkDetlLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (WrkDetlLog wrkDetlLog : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", wrkDetlLog.getWrkNo()); |
| | | map.put("value", wrkDetlLog.getWrkNo()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetlLog/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<WrkDetlLog> wrapper = new EntityWrapper<WrkDetlLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != wrkDetlLogService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(WrkDetlLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | wrapper.eq(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | }else { |
| | | wrapper.orderBy("io_time", false); |
| | | wrapper.orderBy("modi_time", false).orderBy("wrk_no", false); |
| | | } |
| | | return R.ok(wrkMastLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | |
| | | |
| | | public LocDetl() {} |
| | | |
| | | public LocDetl(String lgnum,Integer tbnum,Integer tbpos,String zmatid,String maktx,String werks,Double anfme,String altme,String zpallet,String bname,String memo,Long modiUser,Date modiTime,Long appeUser,Date appeTime) { |
| | | public LocDetl(String locNo, String matnr, String lgnum,Integer tbnum,Integer tbpos,String zmatid,String maktx,String werks,Double anfme,String altme,String zpallet,String bname,String memo,Long modiUser,Date modiTime,Long appeUser,Date appeTime) { |
| | | this.locNo = locNo; |
| | | this.matnr = matnr; |
| | | this.lgnum = lgnum; |
| | | this.tbnum = tbnum; |
| | | this.tbpos = tbpos; |
| | |
| | | |
| | | private String matNo; |
| | | |
| | | private int count; |
| | | private Double count; |
| | | |
| | | public MatCodeCountDto() { |
| | | } |
| | | |
| | | public MatCodeCountDto(String matNo, int count) { |
| | | public MatCodeCountDto(String matNo, Double count) { |
| | | this.matNo = matNo; |
| | | this.count = count; |
| | | } |
| | |
| | | this.matNo = matNo; |
| | | } |
| | | |
| | | public int getCount() { |
| | | public Double getCount() { |
| | | return count; |
| | | } |
| | | |
| | | public void setCount(int count) { |
| | | public void setCount(Double count) { |
| | | this.count = count; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.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.system.service.UserService; |
| | | import com.zy.system.entity.User; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @TableName("bas_tray_code") |
| | | public class TrayCode implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 序列号 |
| | | */ |
| | | @ApiModelProperty(value= "序列号") |
| | | @TableField("tray_no") |
| | | private String trayNo; |
| | | |
| | | /** |
| | | * 起始 |
| | | */ |
| | | @ApiModelProperty(value= "起始") |
| | | private String start; |
| | | |
| | | /** |
| | | * 终止 |
| | | */ |
| | | @ApiModelProperty(value= "终止") |
| | | private String finish; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | public TrayCode() {} |
| | | |
| | | public TrayCode(String trayNo,String start,String finish,String memo,Date modiTime,Long modiUser,Date appeTime,Long appeUser) { |
| | | this.trayNo = trayNo; |
| | | this.start = start; |
| | | this.finish = finish; |
| | | this.memo = memo; |
| | | this.modiTime = modiTime; |
| | | this.modiUser = modiUser; |
| | | this.appeTime = appeTime; |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | // TrayCode trayCode = new TrayCode( |
| | | // null, // 序列号[非空] |
| | | // null, // 起始 |
| | | // null, // 终止 |
| | | // null, // 备注 |
| | | // null, // 修改时间 |
| | | // null, // 修改人员 |
| | | // null, // 添加时间 |
| | | // null // 添加人员 |
| | | // ); |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getTrayNo() { |
| | | return trayNo; |
| | | } |
| | | |
| | | public void setTrayNo(String trayNo) { |
| | | this.trayNo = trayNo; |
| | | } |
| | | |
| | | public String getStart() { |
| | | return start; |
| | | } |
| | | |
| | | public void setStart(String start) { |
| | | this.start = start; |
| | | } |
| | | |
| | | public String getFinish() { |
| | | return finish; |
| | | } |
| | | |
| | | public void setFinish(String finish) { |
| | | this.finish = finish; |
| | | } |
| | | |
| | | public String getMemo() { |
| | | return memo; |
| | | } |
| | | |
| | | public void setMemo(String memo) { |
| | | this.memo = memo; |
| | | } |
| | | |
| | | public Date getModiTime() { |
| | | return modiTime; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public Long getModiUser() { |
| | | return modiUser; |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public Date getAppeTime() { |
| | | return appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | public Long getAppeUser() { |
| | | return appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.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.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @TableName("cust_wait_pakin") |
| | | public class WaitPakin implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 托盘码 |
| | | */ |
| | | @ApiModelProperty(value= "托盘码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 物料编码 |
| | | */ |
| | | @ApiModelProperty(value= "物料编码") |
| | | private String matnr; |
| | | |
| | | /** |
| | | * 物料描述 |
| | | */ |
| | | @ApiModelProperty(value= "物料描述") |
| | | private String maktx; |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | @ApiModelProperty(value= "数量") |
| | | private Double anfme; |
| | | |
| | | /** |
| | | * 单位 |
| | | */ |
| | | @ApiModelProperty(value= "单位") |
| | | private String unit; |
| | | |
| | | /** |
| | | * 状态 |
| | | */ |
| | | @ApiModelProperty(value= "状态") |
| | | private String status; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | public WaitPakin() {} |
| | | |
| | | public WaitPakin(String barcode,String matnr,String maktx,Double anfme,String unit,String status,String memo,Date modiTime,Long modiUser,Date appeTime,Long appeUser) { |
| | | this.barcode = barcode; |
| | | this.matnr = matnr; |
| | | this.maktx = maktx; |
| | | this.anfme = anfme; |
| | | this.unit = unit; |
| | | this.status = status; |
| | | this.memo = memo; |
| | | this.modiTime = modiTime; |
| | | this.modiUser = modiUser; |
| | | this.appeTime = appeTime; |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | // WaitPakin waitPakin = new WaitPakin( |
| | | // null, // 托盘码 |
| | | // null, // 物料编码 |
| | | // null, // 物料描述 |
| | | // null, // 数量 |
| | | // null, // 单位 |
| | | // null, // 状态 |
| | | // null, // 备注 |
| | | // null, // 修改时间 |
| | | // null, // 修改人员 |
| | | // null, // 添加时间 |
| | | // null // 创建者 |
| | | // ); |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getBarcode() { |
| | | return barcode; |
| | | } |
| | | |
| | | public void setBarcode(String barcode) { |
| | | this.barcode = barcode; |
| | | } |
| | | |
| | | public String getMatnr() { |
| | | return matnr; |
| | | } |
| | | |
| | | public void setMatnr(String matnr) { |
| | | this.matnr = matnr; |
| | | } |
| | | |
| | | public String getMaktx() { |
| | | return maktx; |
| | | } |
| | | |
| | | public void setMaktx(String maktx) { |
| | | this.maktx = maktx; |
| | | } |
| | | |
| | | public Double getAnfme() { |
| | | return anfme; |
| | | } |
| | | |
| | | public void setAnfme(Double anfme) { |
| | | this.anfme = anfme; |
| | | } |
| | | |
| | | public String getUnit() { |
| | | return unit; |
| | | } |
| | | |
| | | public void setUnit(String unit) { |
| | | this.unit = unit; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getMemo() { |
| | | return memo; |
| | | } |
| | | |
| | | public void setMemo(String memo) { |
| | | this.memo = memo; |
| | | } |
| | | |
| | | public Date getModiTime() { |
| | | return modiTime; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public Long getModiUser() { |
| | | return modiUser; |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public Date getAppeTime() { |
| | | return appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | public Long getAppeUser() { |
| | | return appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.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.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @TableName("cust_wait_pakin_log") |
| | | public class WaitPakinLog implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 入库通知号 |
| | | */ |
| | | @ApiModelProperty(value= "入库通知号") |
| | | @TableField("pakin_id") |
| | | private Long pakinId; |
| | | |
| | | /** |
| | | * 托盘码 |
| | | */ |
| | | @ApiModelProperty(value= "托盘码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 物料编码 |
| | | */ |
| | | @ApiModelProperty(value= "物料编码") |
| | | private String matnr; |
| | | |
| | | /** |
| | | * 物料描述 |
| | | */ |
| | | @ApiModelProperty(value= "物料描述") |
| | | private String maktx; |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | @ApiModelProperty(value= "数量") |
| | | private Double anfme; |
| | | |
| | | /** |
| | | * 单位 |
| | | */ |
| | | @ApiModelProperty(value= "单位") |
| | | private String unit; |
| | | |
| | | /** |
| | | * 状态 |
| | | */ |
| | | @ApiModelProperty(value= "状态") |
| | | private String status; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | public WaitPakinLog() {} |
| | | |
| | | public WaitPakinLog(Long pakinId,String barcode,String matnr,String maktx,Double anfme,String unit,String status,String memo,Date modiTime,Long modiUser,Date appeTime,Long appeUser) { |
| | | this.pakinId = pakinId; |
| | | this.barcode = barcode; |
| | | this.matnr = matnr; |
| | | this.maktx = maktx; |
| | | this.anfme = anfme; |
| | | this.unit = unit; |
| | | this.status = status; |
| | | this.memo = memo; |
| | | this.modiTime = modiTime; |
| | | this.modiUser = modiUser; |
| | | this.appeTime = appeTime; |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | // WaitPakinLog waitPakinLog = new WaitPakinLog( |
| | | // null, // 入库通知号 |
| | | // null, // 托盘码 |
| | | // null, // 物料编码 |
| | | // null, // 物料描述 |
| | | // null, // 数量 |
| | | // null, // 单位 |
| | | // null, // 状态 |
| | | // null, // 备注 |
| | | // null, // 修改时间 |
| | | // null, // 修改人员 |
| | | // null, // 添加时间 |
| | | // null // 创建者 |
| | | // ); |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getPakinId() { |
| | | return pakinId; |
| | | } |
| | | |
| | | public void setPakinId(Long pakinId) { |
| | | this.pakinId = pakinId; |
| | | } |
| | | |
| | | public String getBarcode() { |
| | | return barcode; |
| | | } |
| | | |
| | | public void setBarcode(String barcode) { |
| | | this.barcode = barcode; |
| | | } |
| | | |
| | | public String getMatnr() { |
| | | return matnr; |
| | | } |
| | | |
| | | public void setMatnr(String matnr) { |
| | | this.matnr = matnr; |
| | | } |
| | | |
| | | public String getMaktx() { |
| | | return maktx; |
| | | } |
| | | |
| | | public void setMaktx(String maktx) { |
| | | this.maktx = maktx; |
| | | } |
| | | |
| | | public Double getAnfme() { |
| | | return anfme; |
| | | } |
| | | |
| | | public void setAnfme(Double anfme) { |
| | | this.anfme = anfme; |
| | | } |
| | | |
| | | public String getUnit() { |
| | | return unit; |
| | | } |
| | | |
| | | public void setUnit(String unit) { |
| | | this.unit = unit; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getMemo() { |
| | | return memo; |
| | | } |
| | | |
| | | public void setMemo(String memo) { |
| | | this.memo = memo; |
| | | } |
| | | |
| | | public Date getModiTime() { |
| | | return modiTime; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public Long getModiUser() { |
| | | return modiUser; |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public Date getAppeTime() { |
| | | return appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | public Long getAppeUser() { |
| | | return appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @TableName("asr_wrk_detl_log") |
| | | public class WrkDetlLog implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 工作时间 |
| | | */ |
| | | @ApiModelProperty(value= "工作时间") |
| | | @TableField("io_time") |
| | | private Date ioTime; |
| | | |
| | | /** |
| | | * 物料编号 |
| | | */ |
| | | @ApiModelProperty(value= "物料编号") |
| | | private String matnr; |
| | | |
| | | /** |
| | | * 仓库号 |
| | | */ |
| | | @ApiModelProperty(value= "仓库号") |
| | | private String lgnum; |
| | | |
| | | /** |
| | | * 转储请求编号 |
| | | */ |
| | | @ApiModelProperty(value= "转储请求编号") |
| | | private Integer tbnum; |
| | | |
| | | /** |
| | | * 行项目 |
| | | */ |
| | | @ApiModelProperty(value= "行项目") |
| | | private Integer tbpos; |
| | | |
| | | /** |
| | | * 物料标签ID |
| | | */ |
| | | @ApiModelProperty(value= "物料标签ID") |
| | | private String zmatid; |
| | | |
| | | /** |
| | | * 物料描述 |
| | | */ |
| | | @ApiModelProperty(value= "物料描述") |
| | | private String maktx; |
| | | |
| | | /** |
| | | * 工厂 |
| | | */ |
| | | @ApiModelProperty(value= "工厂") |
| | | private String werks; |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | @ApiModelProperty(value= "数量") |
| | | private Double anfme; |
| | | |
| | | /** |
| | | * 单位 |
| | | */ |
| | | @ApiModelProperty(value= "单位") |
| | | private String altme; |
| | | |
| | | /** |
| | | * 托盘条码 |
| | | */ |
| | | @ApiModelProperty(value= "托盘条码") |
| | | private String zpallet; |
| | | |
| | | /** |
| | | * 用户ID |
| | | */ |
| | | @ApiModelProperty(value= "用户ID") |
| | | private String bname; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private Double nista; |
| | | |
| | | public WrkDetlLog() {} |
| | | |
| | | public WrkDetlLog(Integer wrkNo,Date ioTime,String matnr,String lgnum,Integer tbnum,Integer tbpos,String zmatid,String maktx,String werks,Double anfme,String altme,String zpallet,String bname,String memo,Long modiUser,Date modiTime,Long appeUser,Date appeTime,Double nista) { |
| | | this.wrkNo = wrkNo; |
| | | this.ioTime = ioTime; |
| | | this.matnr = matnr; |
| | | this.lgnum = lgnum; |
| | | this.tbnum = tbnum; |
| | | this.tbpos = tbpos; |
| | | this.zmatid = zmatid; |
| | | this.maktx = maktx; |
| | | this.werks = werks; |
| | | this.anfme = anfme; |
| | | this.altme = altme; |
| | | this.zpallet = zpallet; |
| | | this.bname = bname; |
| | | this.memo = memo; |
| | | this.modiUser = modiUser; |
| | | this.modiTime = modiTime; |
| | | this.appeUser = appeUser; |
| | | this.appeTime = appeTime; |
| | | this.nista = nista; |
| | | } |
| | | |
| | | // WrkDetlLog wrkDetlLog = new WrkDetlLog( |
| | | // null, // 工作号[非空] |
| | | // null, // 工作时间 |
| | | // null, // 物料编号[非空] |
| | | // null, // 仓库号[非空] |
| | | // null, // 转储请求编号[非空] |
| | | // null, // 行项目[非空] |
| | | // null, // 物料标签ID |
| | | // null, // 物料描述 |
| | | // null, // 工厂 |
| | | // null, // 数量 |
| | | // null, // 单位 |
| | | // null, // 托盘条码 |
| | | // null, // 用户ID |
| | | // null, // 备注 |
| | | // null, // 修改人员 |
| | | // null, // 修改时间 |
| | | // null, // 创建者 |
| | | // null, // 添加时间 |
| | | // null // |
| | | // ); |
| | | |
| | | public Integer getWrkNo() { |
| | | return wrkNo; |
| | | } |
| | | |
| | | public void setWrkNo(Integer wrkNo) { |
| | | this.wrkNo = wrkNo; |
| | | } |
| | | |
| | | public Date getIoTime() { |
| | | return ioTime; |
| | | } |
| | | |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime); |
| | | } |
| | | |
| | | public void setIoTime(Date ioTime) { |
| | | this.ioTime = ioTime; |
| | | } |
| | | |
| | | public String getMatnr() { |
| | | return matnr; |
| | | } |
| | | |
| | | public void setMatnr(String matnr) { |
| | | this.matnr = matnr; |
| | | } |
| | | |
| | | public String getLgnum() { |
| | | return lgnum; |
| | | } |
| | | |
| | | public void setLgnum(String lgnum) { |
| | | this.lgnum = lgnum; |
| | | } |
| | | |
| | | public Integer getTbnum() { |
| | | return tbnum; |
| | | } |
| | | |
| | | public void setTbnum(Integer tbnum) { |
| | | this.tbnum = tbnum; |
| | | } |
| | | |
| | | public Integer getTbpos() { |
| | | return tbpos; |
| | | } |
| | | |
| | | public void setTbpos(Integer tbpos) { |
| | | this.tbpos = tbpos; |
| | | } |
| | | |
| | | public String getZmatid() { |
| | | return zmatid; |
| | | } |
| | | |
| | | public void setZmatid(String zmatid) { |
| | | this.zmatid = zmatid; |
| | | } |
| | | |
| | | public String getMaktx() { |
| | | return maktx; |
| | | } |
| | | |
| | | public void setMaktx(String maktx) { |
| | | this.maktx = maktx; |
| | | } |
| | | |
| | | public String getWerks() { |
| | | return werks; |
| | | } |
| | | |
| | | public void setWerks(String werks) { |
| | | this.werks = werks; |
| | | } |
| | | |
| | | public Double getAnfme() { |
| | | return anfme; |
| | | } |
| | | |
| | | public void setAnfme(Double anfme) { |
| | | this.anfme = anfme; |
| | | } |
| | | |
| | | public String getAltme() { |
| | | return altme; |
| | | } |
| | | |
| | | public void setAltme(String altme) { |
| | | this.altme = altme; |
| | | } |
| | | |
| | | public String getZpallet() { |
| | | return zpallet; |
| | | } |
| | | |
| | | public void setZpallet(String zpallet) { |
| | | this.zpallet = zpallet; |
| | | } |
| | | |
| | | public String getBname() { |
| | | return bname; |
| | | } |
| | | |
| | | public void setBname(String bname) { |
| | | this.bname = bname; |
| | | } |
| | | |
| | | public String getMemo() { |
| | | return memo; |
| | | } |
| | | |
| | | public void setMemo(String memo) { |
| | | this.memo = memo; |
| | | } |
| | | |
| | | public Long getModiUser() { |
| | | return modiUser; |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public Date getModiTime() { |
| | | return modiTime; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public Long getAppeUser() { |
| | | return appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | public Date getAppeTime() { |
| | | return appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | public Double getNista() { |
| | | return nista; |
| | | } |
| | | |
| | | public void setNista(Double nista) { |
| | | this.nista = nista; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | public void setErrorMemo(String errorMemo) { |
| | | if (errorMemo.length() > 255) { |
| | | errorMemo = errorMemo.substring(0, 150); |
| | | } |
| | | this.errorMemo = errorMemo; |
| | | } |
| | | |
| New file |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/6/28 |
| | | */ |
| | | public class CombParam { |
| | | |
| | | // 托盘条码 |
| | | private String barcode; |
| | | |
| | | private List<CombMat> combMats; |
| | | |
| | | public static class CombMat { |
| | | |
| | | // 物料编号 |
| | | private String matNo; |
| | | |
| | | // 物料数量 |
| | | private Double count; |
| | | |
| | | public String getMatNo() { |
| | | return matNo; |
| | | } |
| | | |
| | | public void setMatNo(String matNo) { |
| | | this.matNo = matNo; |
| | | } |
| | | |
| | | public Double getCount() { |
| | | return count; |
| | | } |
| | | |
| | | public void setCount(Double count) { |
| | | this.count = count; |
| | | } |
| | | |
| | | } |
| | | |
| | | public String getBarcode() { |
| | | return barcode; |
| | | } |
| | | |
| | | public void setBarcode(String barcode) { |
| | | this.barcode = barcode; |
| | | } |
| | | |
| | | public List<CombMat> getCombMats() { |
| | | return combMats; |
| | | } |
| | | |
| | | public void setCombMats(List<CombMat> combMats) { |
| | | this.combMats = combMats; |
| | | } |
| | | } |
| | |
| | | */ |
| | | public class FullStoreParam { |
| | | |
| | | // 托盘条码 |
| | | private String barcode; |
| | | |
| | | // 站点编号 |
| | | private Integer devpNo; |
| | | |
| | |
| | | private String matNo; |
| | | |
| | | // 物料数量 |
| | | private Integer count; |
| | | private Double count; |
| | | |
| | | public String getMatNo() { |
| | | return matNo; |
| | |
| | | this.matNo = matNo; |
| | | } |
| | | |
| | | public Integer getCount() { |
| | | public Double getCount() { |
| | | return count; |
| | | } |
| | | |
| | | public void setCount(Integer count) { |
| | | public void setCount(Double count) { |
| | | this.count = count; |
| | | } |
| | | } |
| | | |
| | | public String getBarcode() { |
| | | return barcode; |
| | | } |
| | | |
| | | public void setBarcode(String barcode) { |
| | | this.barcode = barcode; |
| | | } |
| | | |
| | | public Integer getDevpNo() { |
| | | return devpNo; |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/2 |
| | | */ |
| | | public class TrayCodeParam { |
| | | |
| | | private String startNo; |
| | | |
| | | private Integer count; |
| | | |
| | | private Integer type; |
| | | |
| | | public String getStartNo() { |
| | | return startNo; |
| | | } |
| | | |
| | | public void setStartNo(String startNo) { |
| | | this.startNo = startNo; |
| | | } |
| | | |
| | | public Integer getCount() { |
| | | return count; |
| | | } |
| | | |
| | | public void setCount(Integer count) { |
| | | this.count = count; |
| | | } |
| | | |
| | | public Integer getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(Integer type) { |
| | | this.type = type; |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Update; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | Integer getStockOutPageCount(Map<String, Object> map); |
| | | |
| | | @Update("update asr_loc_detl set anfme=#{anfme}, modi_time = getDate() where loc_no = #{locNo} and matnr = #{matnr}") |
| | | int updateAnfme(Double anfme, String locNo, String matnr); |
| | | |
| | | @Update("update asr_loc_detl set loc_no = #{newLocNo}, modi_time=getDate() where loc_no = #{oldLocNo}") |
| | | int updateLocNo(String newLocNo, String oldLocNo); |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.TrayCode; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface TrayCodeMapper extends BaseMapper<TrayCode> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.WaitPakinLog; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface WaitPakinLogMapper extends BaseMapper<WaitPakinLog> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.WaitPakin; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface WaitPakinMapper extends BaseMapper<WaitPakin> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.WrkDetlLog; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Insert; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface WrkDetlLogMapper extends BaseMapper<WrkDetlLog> { |
| | | |
| | | @Insert("insert into asr_wrk_detl_log select * from asr_wrk_detl where wrk_no=#{workNo}") |
| | | int save(Integer workNo); |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.WrkMastLog; |
| | | import org.apache.ibatis.annotations.Insert; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | @Repository |
| | | public interface WrkMastLogMapper extends BaseMapper<WrkMastLog> { |
| | | |
| | | @Insert("insert into asr_wrk_mast_log select * from asr_wrk_mast where wrk_no=#{workNo}") |
| | | int save(Integer workNo); |
| | | |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface WrkMastMapper extends BaseMapper<WrkMast> { |
| | | |
| | | // @Select("select * from asr_wrk_mast where ((wrk_sts = 4 Or wrk_sts = 14 ) and io_type <> 103 and io_type <> 104 and io_type <> 107 ) or (wrk_sts = 2 and io_type=6) order by upd_mk,io_time,wrk_no") |
| | | List<WrkMast> selectToBeCompleteData(); |
| | | |
| | | List<WrkMast> selectToBeHistoryData(); |
| | | |
| | | } |
| | |
| | | |
| | | Page<LocDetl> getStockOut(Page<LocDetl> page); |
| | | |
| | | /** |
| | | * 修改库存明细数量,如果数量为0,则删除记录 |
| | | */ |
| | | boolean updateAnfme(Double anfme, String locNo, String matnr); |
| | | |
| | | boolean updateLocNo(String newLocNo, String oldLocNo); |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.param.CombParam; |
| | | |
| | | public interface MobileService { |
| | | |
| | | /** |
| | | * 组托 |
| | | * @param param |
| | | */ |
| | | void comb(CombParam param, Long userId); |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.TrayCode; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface TrayCodeService extends IService<TrayCode> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.WaitPakinLog; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface WaitPakinLogService extends IService<WaitPakinLog> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.WaitPakin; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface WaitPakinService extends IService<WaitPakin> { |
| | | |
| | | } |
| | |
| | | String startupFullPutStore(FullStoreParam param, Long userId); |
| | | |
| | | /** |
| | | * 全板出库 |
| | | * 出库作业 |
| | | */ |
| | | void startupFullTakeStore(StockOutParam param, Long userId); |
| | | |
| | |
| | | * 手动取消工作档 |
| | | */ |
| | | void cancelWrkMast(String workNo, Long userId); |
| | | |
| | | /** |
| | | * 手动拣料入库工作档 |
| | | */ |
| | | void pickWrkMast(String workNo, Long userId); |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.WrkDetlLog; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface WrkDetlLogService extends IService<WrkDetlLog> { |
| | | |
| | | boolean save(Integer workNo); |
| | | |
| | | } |
| | |
| | | |
| | | public interface WrkDetlService extends IService<WrkDetl> { |
| | | |
| | | void createWorkDetail(Integer workNo, List<MatCodeCountDto> matCodeCountDtos, Long userId); |
| | | void createWorkDetail(Integer workNo, List<MatCodeCountDto> matCodeCountDtos, String barcode, Long userId); |
| | | |
| | | } |
| | |
| | | |
| | | public interface WrkMastLogService extends IService<WrkMastLog> { |
| | | |
| | | boolean save(Integer workNo); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface WrkMastService extends IService<WrkMast> { |
| | | |
| | | int getWorkingMast(Integer devpNo); |
| | | |
| | | List<WrkMast> selectToBeCompleteData(); |
| | | |
| | | List<WrkMast> selectToBeHistoryData(); |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.LocDetl; |
| | |
| | | return page; |
| | | } |
| | | |
| | | @Override |
| | | public boolean updateAnfme(Double anfme, String locNo, String matnr) { |
| | | if (anfme <= 0) { |
| | | return delete(new EntityWrapper<LocDetl>().eq("loc_no", locNo).eq("matnr", matnr)); |
| | | } else { |
| | | int res = baseMapper.updateAnfme(anfme, locNo, matnr); |
| | | return res > 0; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public boolean updateLocNo(String newLocNo, String oldLocNo) { |
| | | return baseMapper.updateLocNo(newLocNo, oldLocNo) > 0; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.MatCode; |
| | | import com.zy.asrs.entity.WaitPakin; |
| | | import com.zy.asrs.entity.param.CombParam; |
| | | import com.zy.asrs.service.MatCodeService; |
| | | import com.zy.asrs.service.MobileService; |
| | | import com.zy.asrs.service.WaitPakinService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 移动端服务核心类 |
| | | * Created by vincent on 2020/6/28 |
| | | */ |
| | | @Service |
| | | public class MobileServiceImpl implements MobileService { |
| | | |
| | | @Autowired |
| | | private MatCodeService matCodeService; |
| | | @Autowired |
| | | private WaitPakinService waitPakinService; |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void comb(CombParam param, Long userId) { |
| | | if (Cools.isEmpty(param.getBarcode()) || param.getCombMats().isEmpty()) { |
| | | throw new CoolException(BaseRes.PARAM); |
| | | } |
| | | int count = waitPakinService.selectCount(new EntityWrapper<WaitPakin>(). |
| | | eq("barcode", param.getBarcode()).eq("status", "N")); |
| | | if (count > 0) { |
| | | throw new CoolException("条码数据已存在"); |
| | | } |
| | | for (CombParam.CombMat combMat : param.getCombMats()) { |
| | | MatCode matCode = matCodeService.selectById(combMat.getMatNo()); |
| | | if (Cools.isEmpty(matCode)) { |
| | | throw new CoolException("物料数据错误"); |
| | | } |
| | | WaitPakin waitPakin = new WaitPakin( |
| | | param.getBarcode(), // 托盘码 |
| | | matCode.getMatNo(), // 物料编码 |
| | | matCode.getMatName(), // 物料描述 |
| | | combMat.getCount(), // 数量 |
| | | matCode.getStr1(), // 单位 |
| | | "N", // 状态 |
| | | null, // 备注 |
| | | new Date(), // 修改时间 |
| | | userId, // 修改人员 |
| | | new Date(), // 添加时间 |
| | | userId // 创建者 |
| | | ); |
| | | if (!waitPakinService.insert(waitPakin)) { |
| | | throw new CoolException("保存数据失败"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.TrayCodeMapper; |
| | | import com.zy.asrs.entity.TrayCode; |
| | | import com.zy.asrs.service.TrayCodeService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("trayCodeService") |
| | | public class TrayCodeServiceImpl extends ServiceImpl<TrayCodeMapper, TrayCode> implements TrayCodeService { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.WaitPakinLogMapper; |
| | | import com.zy.asrs.entity.WaitPakinLog; |
| | | import com.zy.asrs.service.WaitPakinLogService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("waitPakinLogService") |
| | | public class WaitPakinLogServiceImpl extends ServiceImpl<WaitPakinLogMapper, WaitPakinLog> implements WaitPakinLogService { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.WaitPakinMapper; |
| | | import com.zy.asrs.entity.WaitPakin; |
| | | import com.zy.asrs.service.WaitPakinService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("waitPakinService") |
| | | public class WaitPakinServiceImpl extends ServiceImpl<WaitPakinMapper, WaitPakin> implements WaitPakinService { |
| | | |
| | | } |
| | |
| | | |
| | | // 工作号生成规则默认类型 |
| | | private static final int DEFAULT_WORK_NO_TYPE = 0; |
| | | // 库位排号分配默认类别 |
| | | private static final int DEFAULT_ROW_NO_TYPE = 1; |
| | | |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | |
| | | private MatCodeService matCodeService; |
| | | @Autowired |
| | | private AdjDetlService adjDetlService; |
| | | @Autowired |
| | | private WrkMastLogService wrkMastLogService; |
| | | @Autowired |
| | | private WrkDetlLogService wrkDetlLogService; |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | // 生成工作号 |
| | | int workNo = commonService.getWorkNo(DEFAULT_WORK_NO_TYPE); |
| | | // 检索库位 |
| | | StartupDto dto = commonService.getLocNo(1, 1, param.getDevpNo()); |
| | | StartupDto dto = commonService.getLocNo(DEFAULT_ROW_NO_TYPE, 1, param.getDevpNo()); |
| | | // 生成工作档 |
| | | WrkMast wrkMast = new WrkMast(); |
| | | wrkMast.setWrkNo(workNo); |
| | |
| | | wrkMast.setSourceStaNo(dto.getSourceStaNo()); |
| | | wrkMast.setStaNo(dto.getStaNo()); |
| | | wrkMast.setLocNo(dto.getLocNo()); |
| | | wrkMast.setBarcode(param.getBarcode()); // 托盘码 |
| | | wrkMast.setFullPlt("Y"); // 满板:Y |
| | | wrkMast.setPicking("N"); // 拣料 |
| | | wrkMast.setExitMk("N"); // 退出 |
| | |
| | | param.getList().forEach(elem -> { |
| | | matDtos.add(new MatCodeCountDto(elem.getMatNo(), elem.getCount())); |
| | | }); |
| | | wrkDetlService.createWorkDetail(workNo, matDtos, userId); |
| | | wrkDetlService.createWorkDetail(workNo, matDtos, param.getBarcode(), userId); |
| | | // 更新源站点信息 |
| | | sourceStaNo.setWrkNo(workNo); |
| | | sourceStaNo.setModiUser(userId); |
| | |
| | | } |
| | | if (!locDetlDtos.isEmpty()) { |
| | | // 启动出库开始 101.出库 |
| | | stockOut(staNo, locDetlDtos, 101, userId); |
| | | stockOut(staNo, locDetlDtos, null, userId); |
| | | } else { |
| | | throw new CoolException("库位物料不存在"); |
| | | } |
| | |
| | | } |
| | | // 生成工作档 |
| | | for (OutLocDto dto : dtos) { |
| | | // 判断入出库类型:101.全板出库 or 103.拣料出库 |
| | | if (ioType == null) { |
| | | ioType = dto.isAll() ? 101 : 103; |
| | | } |
| | | // 获取库位 |
| | | LocMast locMast = locMastService.selectById(dto.getLocNo()); |
| | | // 获取路径 |
| | |
| | | wrkMast.setWrkNo(workNo); |
| | | wrkMast.setIoTime(new Date()); |
| | | wrkMast.setWrkSts(11L); // 工作状态:11.生成出库ID |
| | | wrkMast.setIoType(ioType); // 入出库状态:101.出库 |
| | | wrkMast.setIoType(ioType); // 入出库状态 |
| | | wrkMast.setIoPri(13D); // 优先级:13 |
| | | wrkMast.setCrnNo(locMast.getCrnNo()); |
| | | wrkMast.setSourceStaNo(staDesc.getCrnStn()); // 源站 |
| | |
| | | throw new CoolException("保存工作档明细失败"); |
| | | } |
| | | } |
| | | // 修改库位状态: F.在库 ====>>> R.出库预约 |
| | | // 修改库位状态: F.在库 ====>>> R.出库预约/P.拣料/盘点/并板出库中 |
| | | locMast = locMastService.selectById(dto.getLocNo()); |
| | | if (locMast.getLocType().equals("F")) { |
| | | locMast.setLocType("R"); |
| | | locMast.setLocType(ioType==101?"R":"P"); |
| | | locMast.setModiUser(userId); |
| | | locMast.setModiTime(new Date()); |
| | | if (!locMastService.updateById(locMast)) { |
| | |
| | | // 生成工作号 |
| | | int workNo = commonService.getWorkNo(DEFAULT_WORK_NO_TYPE); |
| | | // 检索库位 |
| | | StartupDto dto = commonService.getLocNo(1, 10, devpNo); |
| | | StartupDto dto = commonService.getLocNo(DEFAULT_ROW_NO_TYPE, 10, devpNo); |
| | | // 生成工作档 |
| | | WrkMast wrkMast = new WrkMast(); |
| | | wrkMast.setWrkNo(workNo); |
| | |
| | | wrkMast.setWrkNo(workNo); |
| | | wrkMast.setIoTime(new Date()); |
| | | wrkMast.setWrkSts(11L); // 工作状态:11.生成出库ID |
| | | wrkMast.setIoType(110); // 入出库状态: 110.空板出库 |
| | | wrkMast.setIoType(11); // 入出库状态: 11.库格移载 |
| | | wrkMast.setIoPri(10D); |
| | | wrkMast.setCrnNo(sourceLoc.getCrnNo()); |
| | | wrkMast.setSourceLocNo(sourceLocNo); // 源库位 |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void pickWrkMast(String workNo, Long userId) { |
| | | WrkMast wrkMast = wrkMastService.selectById(workNo); |
| | | if (Cools.isEmpty(wrkMast)){ |
| | | throw new CoolException(workNo+"工作档不存在"); |
| | | } |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | String locNo = wrkMast.getSourceLocNo(); |
| | | // 拣料作业判断 |
| | | if (wrkMast.getIoType() != 103) { |
| | | throw new CoolException("入出库类型不是103.拣料出库"); |
| | | } |
| | | // 工作状态判断 |
| | | if (wrkMast.getWrkSts() < 11 || wrkMast.getWrkSts() == 15) { |
| | | throw new CoolException("当前工作状态不能拣料入库"); |
| | | } |
| | | // 保存工作明细档历史档 |
| | | // if (!wrkDetlLogService.save(wrkMast.getWrkNo())) { |
| | | // throw new CoolException("保存工作明细档历史档失败"); |
| | | // } |
| | | // 删除工作明细档 |
| | | // if (!wrkDetlService.delete(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo()))) { |
| | | // throw new CoolException("删除工作明细档档历史档失败"); |
| | | // } |
| | | // 保存工作主档历史档 |
| | | if (!wrkMastLogService.save(wrkMast.getWrkNo())) { |
| | | throw new CoolException("保存工作主档历史档失败"); |
| | | } |
| | | // 获取目标站 |
| | | Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() |
| | | .eq("type_no", 53) // type_no: 53.拣料再入库 |
| | | .eq("stn_no", wrkMast.getStaNo()) // 作业站点 = 拣料出库的目标站 |
| | | .eq("crn_no", wrkMast.getCrnNo()); // 堆垛机号 |
| | | StaDesc staDesc = staDescService.selectOne(wrapper); |
| | | if (Cools.isEmpty(staDesc)) { |
| | | throw new CoolException("入库路径不存在"); |
| | | } |
| | | // 堆垛机站点(目标站) |
| | | Integer staNo = staDesc.getCrnStn(); |
| | | // 更新工作档数据状态 |
| | | wrkMast.setIoType(53); // 入出库类型: 53.拣料再入库 |
| | | wrkMast.setWrkSts(2L); // 工作状态: 2.设备上走 |
| | | wrkMast.setSourceStaNo(wrkMast.getStaNo()); // 源站 |
| | | wrkMast.setStaNo(staNo); // 目标站 |
| | | wrkMast.setLocNo(wrkMast.getSourceLocNo()); // 目标库位 = 出库时的源库位 |
| | | wrkMast.setSourceLocNo(""); // 源库位清空 |
| | | wrkMast.setModiTime(new Date()); |
| | | wrkMast.setModiUser(userId); |
| | | if (!wrkMastService.updateById(wrkMast)) { |
| | | throw new CoolException("更新工作档数据状态失败"); |
| | | } |
| | | // // 更新/删除拣料库存明细 |
| | | // for (WrkDetl wrkDetl : wrkDetls) { |
| | | // LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no", locNo).eq("matnr", wrkDetl.getMatnr())); |
| | | // // 库存数量计算 |
| | | // locDetl.setAnfme(locDetl.getAnfme() - wrkDetl.getAnfme()); |
| | | // if (locDetl.getAnfme() > 0) { |
| | | // locDetl.setModiTime(new Date()); |
| | | // locDetl.setModiUser(userId); |
| | | // if (!locDetlService.updateById(locDetl)) { |
| | | // throw new CoolException("更新库存明细失败"); |
| | | // } |
| | | // } else { |
| | | // if (!locDetlService.delete(new EntityWrapper<>(locDetl))) { |
| | | // throw new CoolException("删除库存明细失败"); |
| | | // } |
| | | // } |
| | | // } |
| | | // 修改库位状态 Q.拣料/盘点/并板再入库 |
| | | LocMast locMast = locMastService.selectById(wrkMast.getLocNo()); |
| | | locMast.setLocType("Q"); |
| | | locMast.setModiTime(new Date()); |
| | | locMast.setModiUser(userId); |
| | | if (!locMastService.updateById(locMast)) { |
| | | throw new CoolException("修改库位状态失败"); |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.WrkDetlLogMapper; |
| | | import com.zy.asrs.entity.WrkDetlLog; |
| | | import com.zy.asrs.service.WrkDetlLogService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("wrkDetlLogService") |
| | | public class WrkDetlLogServiceImpl extends ServiceImpl<WrkDetlLogMapper, WrkDetlLog> implements WrkDetlLogService { |
| | | |
| | | @Override |
| | | public boolean save(Integer workNo) { |
| | | return this.baseMapper.save(workNo)>0; |
| | | } |
| | | } |
| | |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void createWorkDetail(Integer workNo, List<MatCodeCountDto> matCodeCountDtos, Long userId) { |
| | | public void createWorkDetail(Integer workNo, List<MatCodeCountDto> matCodeCountDtos, String barcode, Long userId) { |
| | | if (matCodeCountDtos.isEmpty()){ |
| | | return; |
| | | } |
| | |
| | | wrkDetl.setWrkNo(workNo); |
| | | wrkDetl.setIoTime(new Date()); |
| | | wrkDetl.setMatnr(matCode.getMatNo()); // 物料编号 |
| | | wrkDetl.setAnfme((double) dto.getCount()); // 数量 |
| | | wrkDetl.setAnfme(dto.getCount()); // 数量 |
| | | wrkDetl.setZpallet(barcode); // 托盘条码 |
| | | wrkDetl.setLgnum("待定"); // todo |
| | | wrkDetl.setTbnum(0); // todo |
| | | wrkDetl.setTbpos(0); // todo |
| | |
| | | @Service("wrkMastLogService") |
| | | public class WrkMastLogServiceImpl extends ServiceImpl<WrkMastLogMapper, WrkMastLog> implements WrkMastLogService { |
| | | |
| | | @Override |
| | | public boolean save(Integer workNo) { |
| | | return this.baseMapper.save(workNo) > 0; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service("wrkMastService") |
| | | public class WrkMastServiceImpl extends ServiceImpl<WrkMastMapper, WrkMast> implements WrkMastService { |
| | | |
| | |
| | | public int getWorkingMast(Integer devpNo) { |
| | | return selectCount(new EntityWrapper<WrkMast>().eq("source_sta_no", devpNo).in("wrk_sts", 1, 6)); |
| | | } |
| | | |
| | | @Override |
| | | public List<WrkMast> selectToBeCompleteData() { |
| | | return this.baseMapper.selectToBeCompleteData(); |
| | | } |
| | | |
| | | @Override |
| | | public List<WrkMast> selectToBeHistoryData() { |
| | | return this.baseMapper.selectToBeHistoryData(); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.zy.asrs.task.core.AsrsException; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | |
| | | import java.text.MessageFormat; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/4 |
| | | */ |
| | | public abstract class AbstractHandler<T> { |
| | | |
| | | public final ReturnT<T> SUCCESS = new ReturnT<>(200, null); |
| | | public final ReturnT<T> FAIL = new ReturnT<>(500, null); |
| | | |
| | | // protected abstract ReturnT<T> start(); |
| | | |
| | | protected void exceptionHandle(String errorMsg){ |
| | | exceptionHandle(errorMsg, (Object) null); |
| | | } |
| | | |
| | | protected void exceptionHandle(String errorMsg, Object... args){ |
| | | throw new AsrsException(MessageFormat.format(errorMsg, args)); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.ErrorStockHandler; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/7 |
| | | */ |
| | | @Component |
| | | public class ErrorStockScheduler { |
| | | |
| | | private static final Logger log = LoggerFactory.getLogger(ErrorStockScheduler.class); |
| | | |
| | | @Autowired |
| | | private ErrorStockHandler errorStockHandler; |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void execute(){ |
| | | ReturnT<String> returnT = errorStockHandler.start(); |
| | | if (!returnT.isSuccess()) { |
| | | log.error(returnT.getMsg()); |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.NotifyLogHandler; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/7 |
| | | */ |
| | | @Component |
| | | public class NotifyLogScheduler { |
| | | |
| | | private static final Logger log = LoggerFactory.getLogger(NotifyLogScheduler.class); |
| | | |
| | | @Autowired |
| | | private NotifyLogHandler notifyLogHandler; |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void execute(){ |
| | | ReturnT<String> returnT = notifyLogHandler.start(); |
| | | if (!returnT.isSuccess()) { |
| | | log.error(returnT.getMsg()); |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.OverYearLogHandler; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/7 |
| | | */ |
| | | @Component |
| | | public class OverYearLogScheduler { |
| | | |
| | | private static final Logger log = LoggerFactory.getLogger(OverYearLogScheduler.class); |
| | | |
| | | @Autowired |
| | | private OverYearLogHandler overYearLogHandler; |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void execute(){ |
| | | ReturnT<String> returnT = overYearLogHandler.start(); |
| | | if (!returnT.isSuccess()) { |
| | | log.error(returnT.getMsg()); |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.PlcLogHandler; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/7 |
| | | */ |
| | | @Component |
| | | public class PlcLogScheduler { |
| | | |
| | | private static final Logger log = LoggerFactory.getLogger(PlcLogScheduler.class); |
| | | |
| | | @Autowired |
| | | private PlcLogHandler plcLogHandler; |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void execute(){ |
| | | ReturnT<String> returnT = plcLogHandler.start(); |
| | | if (!returnT.isSuccess()) { |
| | | log.error(returnT.getMsg()); |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.WorkLogHandler; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/7 |
| | | */ |
| | | @Component |
| | | public class WorkLogScheduler { |
| | | |
| | | private static final Logger log = LoggerFactory.getLogger(WorkLogScheduler.class); |
| | | |
| | | @Autowired |
| | | private WorkLogHandler workLogHandler; |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void execute(){ |
| | | List<WrkMast> wrkMasts = wrkMastService.selectToBeHistoryData(); |
| | | if (wrkMasts.isEmpty()) { |
| | | return; |
| | | } |
| | | for (WrkMast wrkMast : wrkMasts) { |
| | | ReturnT<String> result = workLogHandler.start(wrkMast); |
| | | if (!result.isSuccess()) { |
| | | log.error("工作档[workNo={}]历史档处理失败", wrkMast.getWrkNo()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.WorkMastHandler; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/7 |
| | | */ |
| | | @Component |
| | | public class WorkMastScheduler { |
| | | |
| | | private static final Logger log = LoggerFactory.getLogger(WorkMastScheduler.class); |
| | | |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | | @Autowired |
| | | private WorkMastHandler workMastHandler; |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void execute(){ |
| | | List<WrkMast> wrkMasts = wrkMastService.selectToBeCompleteData(); |
| | | if (wrkMasts.isEmpty()) { |
| | | return; |
| | | } |
| | | for (WrkMast wrkMast : wrkMasts) { |
| | | ReturnT<String> returnT = workMastHandler.start(wrkMast); |
| | | if (!returnT.isSuccess()) { |
| | | wrkMast.setUpdMk("X"); |
| | | wrkMast.setErrorMemo(returnT.getMsg()); |
| | | wrkMast.setErrorTime(new Date()); |
| | | if (!wrkMastService.updateById(wrkMast)) { |
| | | log.error("工作档[workNo={}]标记待处理失败", wrkMast.getWrkNo()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.task.core; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/7 |
| | | */ |
| | | public class AsrsException extends RuntimeException { |
| | | |
| | | public AsrsException(Throwable e) { |
| | | super(e); |
| | | } |
| | | |
| | | public AsrsException(String message) { |
| | | super(message); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.task.core; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/7 |
| | | */ |
| | | public class ReturnT<T> implements Serializable { |
| | | |
| | | public static final long serialVersionUID = 42L; |
| | | public static final int SUCCESS_CODE = 200; |
| | | public static final int FAIL_CODE = 500; |
| | | private int code; |
| | | private String msg; |
| | | private T content; |
| | | |
| | | public ReturnT() { |
| | | } |
| | | |
| | | public ReturnT(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public ReturnT(T content) { |
| | | this.code = 200; |
| | | this.content = content; |
| | | } |
| | | |
| | | public boolean isSuccess(){ |
| | | return this.code == 200; |
| | | } |
| | | |
| | | public int getCode() { |
| | | return this.code; |
| | | } |
| | | |
| | | public ReturnT<T> setCode(int code) { |
| | | this.code = code; |
| | | return this; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return this.msg; |
| | | } |
| | | |
| | | public ReturnT<T> setMsg(String msg) { |
| | | this.msg = msg; |
| | | return this; |
| | | } |
| | | |
| | | public T getContent() { |
| | | return this.content; |
| | | } |
| | | |
| | | public ReturnT<T> setContent(T content) { |
| | | this.content = content; |
| | | return this; |
| | | } |
| | | |
| | | public String toString() { |
| | | return "ReturnT [code=" + this.code + ", msg=" + this.msg + ", content=" + this.content + "]"; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.task.core; |
| | | |
| | | import com.zy.asrs.task.handler.WorkLogHandler; |
| | | import com.zy.asrs.task.handler.WorkMastHandler; |
| | | import com.zy.system.service.ConfigService; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import javax.annotation.PreDestroy; |
| | | |
| | | /** |
| | | * 单线程模式 ( 已弃用 ) |
| | | * 任务中心调度器 |
| | | * Created by vincent on 2020/7/4 |
| | | */ |
| | | //@Component |
| | | @Deprecated |
| | | public class WcsDispatcher { |
| | | |
| | | private static final Logger log = LoggerFactory.getLogger(WcsDispatcher.class); |
| | | private Thread thread; |
| | | |
| | | @Autowired |
| | | private WorkMastHandler workMastHandler; |
| | | @Autowired |
| | | private WorkLogHandler workLogHandler; |
| | | @Autowired |
| | | private ConfigService configService; |
| | | |
| | | @PostConstruct |
| | | private void start(){ |
| | | thread = new Thread(() -> { |
| | | while (!Thread.currentThread().isInterrupted()) { |
| | | try { |
| | | Thread.sleep(3000); |
| | | |
| | | // workMastHandler.start(); |
| | | // |
| | | // workLogHandler.start(); |
| | | |
| | | } catch (Exception e) { |
| | | log.error("Exception", e); |
| | | } |
| | | } |
| | | }); |
| | | thread.start(); |
| | | log.info("任务中心调度器已启动......"); |
| | | } |
| | | |
| | | @PreDestroy |
| | | public void shutDown(){ |
| | | if (thread != null) |
| | | thread.interrupt(); |
| | | log.info("任务中心调度器已停止......"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.task.handler; |
| | | |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.jdbc.core.JdbcTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/7 |
| | | */ |
| | | @Service |
| | | public class ErrorStockHandler extends AbstractHandler<String> { |
| | | |
| | | @Autowired |
| | | private JdbcTemplate jdbcTemplate; |
| | | |
| | | @Transactional |
| | | public ReturnT<String> start() { |
| | | try { |
| | | String sql = "SELECT distinct a.loc_no as locNo FROM asr_loc_mast a,asr_loc_detl b where a.loc_no=b.loc_no and (a.loc_type ='O' or a.loc_type ='D')"; |
| | | List<Map<String, Object>> result = jdbcTemplate.queryForList(sql); |
| | | if (!result.isEmpty()) { |
| | | for (Map<String, Object> map : result) { |
| | | int delCount = jdbcTemplate.update("delete from asr_loc_detl where loc_no=?;", map.get("locNo")); |
| | | System.out.println(delCount); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg(e.getMessage()); |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.task.handler; |
| | | |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.jdbc.core.JdbcTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/7 |
| | | */ |
| | | @Service |
| | | public class NotifyLogHandler extends AbstractHandler<String> { |
| | | |
| | | @Autowired |
| | | private JdbcTemplate jdbcTemplate; |
| | | |
| | | @Transactional |
| | | public ReturnT<String> start() { |
| | | try { |
| | | // 入库通知档转历史档 |
| | | int pakInLog = jdbcTemplate.update("insert into cust_wait_pakin_log select * from cust_wait_pakin where status = 'Y';"); |
| | | if (pakInLog > 0) { |
| | | int pakInDelete = jdbcTemplate.update("delete from cust_wait_pakin where status = 'Y';"); |
| | | if (pakInDelete <= 0) { |
| | | exceptionHandle("入库通知档转历史档失败"); |
| | | } |
| | | } |
| | | // todo:luxiaotao |
| | | // 出库通知档转历史档 |
| | | |
| | | // 盘点通知档转历史档 |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg(e.getMessage()); |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.task.handler; |
| | | |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.jdbc.core.JdbcTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/7 |
| | | */ |
| | | @Service |
| | | public class OverYearLogHandler extends AbstractHandler<String> { |
| | | |
| | | @Autowired |
| | | private JdbcTemplate jdbcTemplate; |
| | | |
| | | @Transactional |
| | | public ReturnT<String> start() { |
| | | try { |
| | | // 删除半年以上的历史档 |
| | | jdbcTemplate.update("delete from asr_stk_hplc where dateadd(day,180,appe_time) <= getdate();"); |
| | | jdbcTemplate.update("delete from asr_wrk_detl_log where dateadd(day,360,appe_time) <= getdate();"); |
| | | jdbcTemplate.update("delete from asr_wrk_mast_log where dateadd(day,360,appe_time) <= getdate();"); |
| | | jdbcTemplate.update("delete from cust_wait_pakin_log where dateadd(day,360,appe_time) <= getdate();"); |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg(e.getMessage()); |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.task.handler; |
| | | |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.jdbc.core.JdbcTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/7 |
| | | */ |
| | | @Service |
| | | public class PlcLogHandler extends AbstractHandler<String> { |
| | | |
| | | @Autowired |
| | | private JdbcTemplate jdbcTemplate; |
| | | |
| | | @Transactional |
| | | public ReturnT<String> start() { |
| | | try { |
| | | // 下位机命令转历史档 |
| | | int updateCount = jdbcTemplate.update("insert into asr_stk_hplc select * from asr_stk_plcm where dateadd(day,7,appe_time) <= getdate();"); |
| | | if (updateCount > 0) { |
| | | int deleteCount = jdbcTemplate.update("delete from asr_stk_plcm where dateadd(day,7,io_time) <= getdate();"); |
| | | if (deleteCount <= 0) { |
| | | exceptionHandle("堆垛机&PLC命令转历史档错误 ! "); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg(e.getMessage()); |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.task.handler; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.zy.asrs.entity.WrkDetl; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.service.WrkDetlLogService; |
| | | import com.zy.asrs.service.WrkDetlService; |
| | | import com.zy.asrs.service.WrkMastLogService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/6 |
| | | */ |
| | | @Service |
| | | public class WorkLogHandler extends AbstractHandler<String> { |
| | | |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | | @Autowired |
| | | private WrkMastLogService wrkMastLogService; |
| | | @Autowired |
| | | private WrkDetlService wrkDetlService; |
| | | @Autowired |
| | | private WrkDetlLogService wrkDetlLogService; |
| | | |
| | | @Transactional |
| | | public ReturnT<String> start(WrkMast wrkMast) { |
| | | try { |
| | | // 保存工作主档历史档 |
| | | if (!wrkMastLogService.save(wrkMast.getWrkNo())) { |
| | | exceptionHandle("保存工作历史档[workNo={0}]失败", wrkMast.getWrkNo()); |
| | | } |
| | | // 删除工作主档 |
| | | if (!wrkMastService.deleteById(wrkMast)) { |
| | | exceptionHandle("删除工作主档[workNo={0}]失败", wrkMast.getWrkNo()); |
| | | } |
| | | // 保存工作明细档历史档 |
| | | if (!wrkDetlLogService.save(wrkMast.getWrkNo())) { |
| | | // exceptionHandle("保存工作明细历史档[workNo={0}]失败", wrkMast.getWrkNo()); |
| | | } |
| | | // 删除工作明细档 |
| | | if (!wrkDetlService.delete(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo()))) { |
| | | // exceptionHandle("删除工作明细档[workNo={0}]失败", wrkMast.getWrkNo()); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg(e.getMessage()); |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.task.handler; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/4 |
| | | */ |
| | | @Service |
| | | @Transactional |
| | | public class WorkMastHandler extends AbstractHandler<String> { |
| | | |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | | @Autowired |
| | | private WrkDetlService wrkDetlService; |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | @Autowired |
| | | private WaitPakinService waitPakinService; |
| | | |
| | | public ReturnT<String> start(WrkMast wrkMast) { |
| | | // 4.入库完成 |
| | | if (wrkMast.getWrkSts() == 4) { |
| | | return doIn(wrkMast); |
| | | // 14.出库完成 |
| | | } else if (wrkMast.getWrkSts() == 14) { |
| | | return doOut(wrkMast); |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | |
| | | private ReturnT<String> doIn(WrkMast wrkMast){ |
| | | Date now = new Date(); |
| | | LocMast locMast = locMastService.selectById(wrkMast.getLocNo()); |
| | | try { |
| | | if (null == locMast) { |
| | | exceptionHandle("工作档[workNo={0}]库位号错误[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | } |
| | | switch (wrkMast.getIoType()) { |
| | | // 空板入库 |
| | | case 10: |
| | | // 修改库位状态=D |
| | | if (locMast.getLocType().equals("S") || locMast.getLocType().equals("Q")) { |
| | | locMast.setLocType("D"); |
| | | locMast.setIoTime(now); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | exceptionHandle("空板入库 ===>> 修改库位状态失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | } |
| | | } |
| | | break; |
| | | // 全板入库 |
| | | case 1: |
| | | // 清除所属库位之前的库存明细 |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", wrkMast.getLocNo())); |
| | | if (!locDetls.isEmpty()) { |
| | | locDetlService.delete(new EntityWrapper<LocDetl>().eq("loc_no", wrkMast.getLocNo())); |
| | | } |
| | | // 根据工作号,查询工作明细档 |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | if (wrkDetls.isEmpty()) { |
| | | exceptionHandle("全板入库 ===>> 工作明细档不存在;[workNo={0}]", wrkMast.getWrkNo()); |
| | | } |
| | | // 遍历工作明细,更新库存明细和入库通知档 |
| | | for (WrkDetl wrkDetl : wrkDetls) { |
| | | LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no", wrkMast.getLocNo()).eq("matnr", wrkDetl.getMatnr())); |
| | | if (null != locDetl) { |
| | | boolean res = locDetlService.updateAnfme(wrkDetl.getAnfme(), wrkMast.getLocNo(), wrkDetl.getMatnr()); |
| | | if (!res) { |
| | | exceptionHandle("全板入库 ===>> 更新库存明细失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | } |
| | | } else { |
| | | locDetl = new LocDetl( |
| | | wrkMast.getLocNo(), // 库位号 |
| | | wrkDetl.getMatnr(), // 物料号 |
| | | null, // 仓库号 |
| | | null, // 转储请求编号 |
| | | null, // 行项目 |
| | | null, // 物料标签ID |
| | | wrkDetl.getMaktx(), // 物料描述 |
| | | null, // 工厂 |
| | | wrkDetl.getAnfme(), // 数量 |
| | | wrkDetl.getAltme(), // 单位 |
| | | wrkDetl.getZpallet(), // 托盘条码 |
| | | null, // 用户ID |
| | | null, // 备注 |
| | | null, // 修改人员 |
| | | now, // 修改时间 |
| | | null, // 创建者 |
| | | now // 添加时间 |
| | | ); |
| | | if (!locDetlService.insert(locDetl)) { |
| | | exceptionHandle("全板入库 ===>> 添加库存明细失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | } |
| | | } |
| | | // 更新入库通知档 status ===>> Y |
| | | WaitPakin setParam = new WaitPakin(); |
| | | setParam.setStatus("Y"); |
| | | boolean updateRes = waitPakinService.update(setParam |
| | | , new EntityWrapper<WaitPakin>().eq("barcode", wrkDetl.getZpallet()) |
| | | .eq("matnr", wrkDetl.getMatnr()) |
| | | .eq("anfme", wrkDetl.getAnfme())); |
| | | if (!updateRes && updateRes) { |
| | | exceptionHandle("全板入库 ===>> 更新入库通知档失败;[workNo={0}]", wrkMast.getWrkNo()); |
| | | } |
| | | } |
| | | // 修改库位状态 S ====>> F |
| | | if (locMast.getLocType().equals("S")) { |
| | | locMast.setLocType("F"); |
| | | locMast.setBarcode(wrkMast.getBarcode()); |
| | | locMast.setIoTime(now); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | exceptionHandle("全板入库 ===>> 修改库位状态失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | } |
| | | } |
| | | break; |
| | | // 拣料入库 |
| | | case 53: |
| | | // 根据工作号,查询工作明细档 |
| | | List<WrkDetl> wrkDetls53 = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | if (wrkDetls53.isEmpty()) { |
| | | exceptionHandle("拣料入库 ===>> 工作明细档为空;[workNo={0}]", wrkMast.getWrkNo()); |
| | | } |
| | | for (WrkDetl wrkDetl:wrkDetls53) { |
| | | // 修改库存明细数量,如果工作明细数量为0时,删除库存明细 |
| | | LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no", locMast.getLocNo()).eq("matnr", wrkDetl.getMatnr())); |
| | | if (null != locDetl) { |
| | | if (!locDetlService.updateAnfme(locDetl.getAnfme() - wrkDetl.getAnfme(), locMast.getLocNo(), wrkDetl.getMatnr())) { |
| | | exceptionHandle("拣料入库 ===>> 修改库存明细数量失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | } |
| | | // todo:luxiaotao 3)修改出库通知档 status ==> Y |
| | | } |
| | | } |
| | | // 修改库位状态 Q ====>> F |
| | | if (locMast.getLocType().equals("Q")) { |
| | | locMast.setLocType("F"); |
| | | locMast.setBarcode(wrkMast.getBarcode()); |
| | | locMast.setIoTime(now); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | exceptionHandle("拣料入库 ===>> 修改库位状态失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | } |
| | | } |
| | | break; |
| | | // 并板入库 |
| | | case 54: |
| | | // 根据工作号,查询工作明细档 |
| | | List<WrkDetl> wrkDetls54 = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | if (wrkDetls54.isEmpty()) { |
| | | exceptionHandle("并板入库 ===>> 工作明细档为空;[workNo={0}]", wrkMast.getWrkNo()); |
| | | } |
| | | // 修改库存明细数量,如无库存,曾新增 |
| | | for (WrkDetl wrkDetl:wrkDetls54) { |
| | | LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no", locMast.getLocNo()).eq("matnr", wrkDetl.getMatnr())); |
| | | if (null != locDetl) { |
| | | if (!locDetlService.updateAnfme(wrkDetl.getAnfme(), locMast.getLocNo(), wrkDetl.getMatnr())) { |
| | | exceptionHandle("并板入库 ===>> 修改库存明细数量失败;[workNo={0}],[matnr={1}]", wrkMast.getWrkNo(), wrkDetl.getMatnr()); |
| | | } |
| | | } else { |
| | | locDetl = new LocDetl( |
| | | wrkMast.getLocNo(), // 库位号 |
| | | wrkDetl.getMatnr(), // 物料号 |
| | | null, // 仓库号 |
| | | null, // 转储请求编号 |
| | | null, // 行项目 |
| | | null, // 物料标签ID |
| | | wrkDetl.getMaktx(), // 物料描述 |
| | | null, // 工厂 |
| | | wrkDetl.getAnfme(), // 数量 |
| | | wrkDetl.getAltme(), // 单位 |
| | | wrkDetl.getZpallet(), // 托盘条码 |
| | | null, // 用户ID |
| | | null, // 备注 |
| | | null, // 修改人员 |
| | | now, // 修改时间 |
| | | null, // 创建者 |
| | | now // 添加时间 |
| | | ); |
| | | if (!locDetlService.insert(locDetl)) { |
| | | exceptionHandle("并板入库 ===>> 新增库存明细失败;[workNo={0}],[matnr={1}]", wrkMast.getWrkNo(), wrkDetl.getMatnr()); |
| | | } |
| | | } |
| | | // todo:luxiaotao 3)修改出库通知档 status ==> Y |
| | | } |
| | | // 修改库位状态 Q ====>> F |
| | | if (locMast.getLocType().equals("Q")) { |
| | | locMast.setLocType("F"); |
| | | locMast.setBarcode(wrkMast.getBarcode()); |
| | | locMast.setIoTime(now); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | exceptionHandle("并板入库 ===>> 修改库位状态失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | } |
| | | } |
| | | break; |
| | | // 盘点入库 |
| | | case 57: |
| | | // 根据工作号,查询工作明细档 |
| | | List<WrkDetl> wrkDetls57 = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | if (wrkDetls57.isEmpty()) { |
| | | exceptionHandle("盘点入库 ===>> 工作明细档为空;[workNo={0}]", wrkMast.getWrkNo()); |
| | | } |
| | | // todo:luxiaotao 3)修改盘点通知档 status ==> Y |
| | | // 修改库位状态 Q ====>> F |
| | | if (locMast.getLocType().equals("Q")) { |
| | | locMast.setLocType("F"); |
| | | locMast.setBarcode(wrkMast.getBarcode()); |
| | | locMast.setIoTime(now); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | exceptionHandle("盘点入库 ===>> 修改库位状态失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | } |
| | | } |
| | | break; |
| | | // 库位移转 |
| | | case 11: |
| | | // 默认目标库位是空板 |
| | | String locType = "D"; |
| | | // 库位移转判断是否为空板移转 |
| | | if (wrkMast.getEmptyMk().equals("N")) { |
| | | locType = "F"; |
| | | // 转移库存明细数据: 库存号 由工作档源库位变为目标库位 |
| | | if (!locDetlService.updateLocNo(wrkMast.getLocNo(), wrkMast.getSourceLocNo())) { |
| | | exceptionHandle("库位移转 ===>> 转移库存明细数据失败;[源库位={0}],[目标库位={1}]", wrkMast.getSourceLocNo(), wrkMast.getLocNo()); |
| | | } |
| | | } |
| | | // todo:luxiaotao 3)修改盘点通知档 status ==> Y |
| | | // 修改源库位状态 ==> O |
| | | LocMast sourceLoc = locMastService.selectById(wrkMast.getSourceLocNo()); |
| | | if (null != sourceLoc) { |
| | | sourceLoc.setBarcode(""); |
| | | sourceLoc.setLocType("O"); |
| | | sourceLoc.setModiTime(now); |
| | | sourceLoc.setIoTime(now); |
| | | if (!locMastService.updateById(sourceLoc)) { |
| | | exceptionHandle("库位移转 ===>> 修改源库位状态失败;[workNo={0}],[sourceLoc={1}]", wrkMast.getWrkNo(), wrkMast.getSourceLocNo()); |
| | | } |
| | | } |
| | | // 修改目标库位状态 ==> .locType |
| | | locMast.setLocType(locType); |
| | | locMast.setBarcode(wrkMast.getBarcode()); |
| | | locMast.setIoTime(now); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | exceptionHandle("库位移转 ===>> 修改目标库位状态失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | } |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | // 修改工作主档状态 |
| | | wrkMast.setWrkSts(5L); |
| | | wrkMast.setModiTime(now); |
| | | if (!wrkMastService.updateById(wrkMast)) { |
| | | exceptionHandle("更新入库完成状态失败;[workNo={0}]", wrkMast.getWrkNo()); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg(e.getMessage()); |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | |
| | | private ReturnT<String> doOut(WrkMast wrkMast){ |
| | | Date now = new Date(); |
| | | LocMast locMast = locMastService.selectById(wrkMast.getSourceLocNo()); |
| | | try { |
| | | if (null == locMast) { |
| | | exceptionHandle("工作档[workNo={0}]库位号错误[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | } |
| | | switch (wrkMast.getIoType()) { |
| | | // 全板出库 |
| | | case 101: |
| | | // 根据工作号,查询工作明细档 |
| | | List<WrkDetl> wrkDetls101 = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | if (wrkDetls101.isEmpty()) { |
| | | exceptionHandle("全板出库 ===>> 工作明细档为空;[workNo={0}]", wrkMast.getWrkNo()); |
| | | } |
| | | for (WrkDetl wrkDetl : wrkDetls101) { |
| | | // todo:luxiaotao 3)修改出库通知档 status ==> Y |
| | | } |
| | | // 删除工作档源库位的库存明细 |
| | | if (!locDetlService.delete(new EntityWrapper<LocDetl>().eq("loc_no", wrkMast.getSourceLocNo()))) { |
| | | exceptionHandle("全板出库 ===>> 删除库存明细失败;[workNo={0}],[sourceLocNo={1}]", wrkMast.getWrkNo(), wrkMast.getSourceLocNo()); |
| | | } |
| | | // 修改源库位状态 R ===>> O |
| | | if (locMast.getLocType().equals("R")) { |
| | | locMast.setLocType("O"); |
| | | locMast.setBarcode(""); |
| | | locMast.setModiTime(now); |
| | | locMast.setIoTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | exceptionHandle("全板出库 ===>> 修改源库位状态失败;[workNo={0}],[sourceLocNo={1}]", wrkMast.getWrkNo(), wrkMast.getSourceLocNo()); |
| | | } |
| | | } |
| | | break; |
| | | // 空板出库 |
| | | case 110: |
| | | // 修改库位状态 R ===>> O |
| | | if (locMast.getLocType().equals("R")) { |
| | | locMast.setLocType("O"); |
| | | locMast.setBarcode(""); |
| | | locMast.setModiTime(now); |
| | | locMast.setIoTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | exceptionHandle("空板出库 ===>> 修改源库位状态失败;[workNo={0}],[sourceLocNo={1}]", wrkMast.getWrkNo(), wrkMast.getSourceLocNo()); |
| | | } |
| | | } |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | // 修改工作主档状态 |
| | | wrkMast.setWrkSts(15L); |
| | | wrkMast.setModiTime(now); |
| | | if (!wrkMastService.updateById(wrkMast)) { |
| | | exceptionHandle("更新出库完成状态失败;[workNo={0}]", wrkMast.getWrkNo()); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg(e.getMessage()); |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | |
| | | } |
| | |
| | | generator.url="127.0.0.1:1433;databasename=dlasrs"; |
| | | generator.username="sa"; |
| | | generator.password="sa@123"; |
| | | generator.table="asr_adj_detl"; |
| | | generator.table="asr_wrk_detl_log"; |
| | | generator.packagePath="com.zy.asrs"; |
| | | generator.build(); |
| | | } |
| | |
| | | /** |
| | | * 跨域 |
| | | */ |
| | | private void cors(HttpServletResponse response){ |
| | | public static void cors(HttpServletResponse response){ |
| | | // 跨域设置 |
| | | response.setHeader("Access-Control-Allow-Origin", "*"); |
| | | response.setHeader("Access-Control-Allow-Credentials", "true"); |
| New file |
| | |
| | | package com.zy.common.model; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/6/29 |
| | | */ |
| | | public class MobileLocDetlVo { |
| | | |
| | | private String locNo; |
| | | |
| | | private String matnr; |
| | | |
| | | private String maktx; |
| | | |
| | | private Double count; |
| | | |
| | | public String getLocNo() { |
| | | return locNo; |
| | | } |
| | | |
| | | public void setLocNo(String locNo) { |
| | | this.locNo = locNo; |
| | | } |
| | | |
| | | public String getMatnr() { |
| | | return matnr; |
| | | } |
| | | |
| | | public void setMatnr(String matnr) { |
| | | this.matnr = matnr; |
| | | } |
| | | |
| | | public String getMaktx() { |
| | | return maktx; |
| | | } |
| | | |
| | | public void setMaktx(String maktx) { |
| | | this.maktx = maktx; |
| | | } |
| | | |
| | | public Double getCount() { |
| | | return count; |
| | | } |
| | | |
| | | public void setCount(Double count) { |
| | | this.count = count; |
| | | } |
| | | } |
| | |
| | | package com.zy.common.model; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import com.zy.asrs.service.LocDetlService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public void setLocDetlDtos(List<LocDetlDto> locDetlDtos) { |
| | | this.locDetlDtos = locDetlDtos; |
| | | } |
| | | |
| | | public boolean isAll(){ |
| | | // 查询当前库位号所有的库存明细 |
| | | LocDetlService locDetlService = SpringUtils.getBean(LocDetlService.class); |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", this.locNo)); |
| | | if (locDetls == null || locDetls.isEmpty()){ |
| | | return true; |
| | | } |
| | | int sameNumber = 0; |
| | | for (LocDetl locDetl : locDetls) { |
| | | for (LocDetlDto dto : this.locDetlDtos) { |
| | | if (dto.getLocDetl().getMatnr().equals(locDetl.getMatnr()) && dto.getCount().equals(locDetl.getAnfme())) { |
| | | sameNumber++; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | return sameNumber == locDetls.size(); |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | public class BarcodeUtils { |
| | | |
| | | private static final int DEFAULT_WIDTH = 264; |
| | | private static final int DEFAULT_HEIGHT = 48; |
| | | private static final int DEFAULT_WIDTH = 110; |
| | | private static final int DEFAULT_HEIGHT = 40; |
| | | |
| | | /** |
| | | * 条形码编码 |
| | |
| | | private static final String CHARSET = "utf-8"; |
| | | private static final String FORMAT_NAME = "JPG"; |
| | | // 二维码尺寸 |
| | | private static final int QRCODE_SIZE = 100; |
| | | private static final int QRCODE_SIZE = 150; |
| | | |
| | | public static BufferedImage createImg(String content) throws WriterException { |
| | | ConcurrentHashMap hints = new ConcurrentHashMap(); |
| | | return createImg(content, QRCODE_SIZE, QRCODE_SIZE); |
| | | } |
| | | |
| | | public static BufferedImage createImg(String content, Integer wid, Integer hei) throws WriterException { |
| | | ConcurrentHashMap<EncodeHintType, Object> hints = new ConcurrentHashMap<>(); |
| | | hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H); |
| | | hints.put(EncodeHintType.CHARACTER_SET, CHARSET); |
| | | hints.put(EncodeHintType.MARGIN, 1); |
| | | BitMatrix bitMatrix = new MultiFormatWriter().encode(content, BarcodeFormat.QR_CODE, QRCODE_SIZE, QRCODE_SIZE, hints); |
| | | BitMatrix bitMatrix = new MultiFormatWriter().encode(content, BarcodeFormat.QR_CODE, wid, hei, hints); |
| | | int width = bitMatrix.getWidth(); |
| | | int height = bitMatrix.getHeight(); |
| | | BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); |
| | |
| | | } |
| | | |
| | | @RequestMapping("/menu/auth") |
| | | @ManagerAuth(memo = "首页菜单") |
| | | @ManagerAuth |
| | | public R menu(){ |
| | | // 获取所有一级菜单 |
| | | List<Resource> oneLevel = resourceService.selectList(new EntityWrapper<Resource>().eq("level", 1).eq("status", 1).orderBy("sort")); |
| | |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.MatCode; |
| | | import com.zy.asrs.service.MatCodeService; |
| | | import com.zy.common.config.AdminInterceptor; |
| | | import com.zy.common.utils.BarcodeUtils; |
| | | import com.zy.common.utils.QrCode; |
| | | import com.zy.common.utils.excel.matcode.MatCodeExcel; |
| | | import com.zy.common.utils.excel.matcode.MatCodeExcelListener; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.imageio.ImageIO; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.util.ArrayList; |
| | |
| | | * Created by vincent on 2019-11-25 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("excel/") |
| | | @RequestMapping("file/") |
| | | public class FileController { |
| | | |
| | | @Autowired |
| | |
| | | EasyExcel.write(response.getOutputStream(), MatCodeExcel.class).sheet("模板").doWrite(excels); |
| | | } |
| | | |
| | | @RequestMapping(value = "/barcode/qrcode/auth") |
| | | // @ManagerAuth(memo = "物料编码条形码获取(type:1(条形码);2(二维码)") |
| | | public R matCodeBarcode(@RequestParam(defaultValue = "1") Integer type |
| | | , @RequestParam String param |
| | | , @RequestParam(required = false) Integer width |
| | | , @RequestParam(required = false) Integer height |
| | | , HttpServletResponse response) throws Exception { |
| | | AdminInterceptor.cors(response); |
| | | if (Cools.isEmpty(param)){ |
| | | return R.parse(BaseRes.EMPTY); |
| | | } |
| | | BufferedImage img; |
| | | if (type == 1) { |
| | | img = BarcodeUtils.encode(param, width, height); |
| | | } else { |
| | | img = QrCode.createImg(param, width, height); |
| | | } |
| | | if (!ImageIO.write(img, "jpg", response.getOutputStream())) { |
| | | throw new IOException("Could not write an image of format jpg"); |
| | | } |
| | | response.getOutputStream().flush(); |
| | | response.getOutputStream().close(); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | @RequestMapping("/pda") |
| | | public void pda(HttpServletResponse response) { |
| | | try{ |
| | | String redirect = Cools.isEmpty(applicationName)?"/views/pda/login.html":"/"+applicationName+"/views/pda/login.html"; |
| | | response.sendRedirect(redirect); |
| | | } catch (Exception ex){ |
| | | ex.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @RequestMapping("/pda/ce") |
| | | public void pdaCe(HttpServletResponse response) { |
| | | try{ |
| | | String redirect = Cools.isEmpty(applicationName)?"/views/pdaCe/login.html":"/"+applicationName+"/views/pdaCe/login.html"; |
| | | response.sendRedirect(redirect); |
| | | } catch (Exception ex){ |
| | | ex.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | return R.error(); |
| | | } |
| | | if (null == user.getId()){ |
| | | user.setStatus(1); |
| | | user.setCreateTime(new Date()); |
| | | userService.insert(user); |
| | | } else { |
| | | userService.updateById(user); |
| | |
| | | @RequestMapping(value = "/user/add/auth") |
| | | @ManagerAuth(memo = "系统用户添加") |
| | | public R add(User user) { |
| | | user.setStatus(1); |
| | | user.setCreateTime(new Date()); |
| | | userService.insert(user); |
| | | return R.ok(); |
| | | } |
| | |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 状态 1: 启用 2: 冻结 3: 删除 |
| | | * 状态 1: 启用 0: 禁用 |
| | | */ |
| | | private Integer status; |
| | | |
| | |
| | | switch (this.status){ |
| | | case 1: |
| | | return "启用"; |
| | | case 2: |
| | | return "冻结"; |
| | | case 3: |
| | | return "删除"; |
| | | case 0: |
| | | return "禁用"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading; |
| | | using DevComponents.DotNetBar.Controls; |
| | | using System.Windows.Forms; |
| | | using System.Drawing; |
| | | //using com.force.json; |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | |
| | | namespace WCS |
| | | { |
| | | /// <summary> |
| | | /// 回报处理线程 |
| | | /// </summary> |
| | | class UpdateThread |
| | | { |
| | | #region 画面上同步显示控件 |
| | | public ListViewEx frmdata; |
| | | delegate void SetTextCallback(string seq, string Errif, string arg_string); |
| | | #endregion |
| | | |
| | | Thread trd = null; |
| | | |
| | | public UpdateThread() |
| | | { |
| | | try |
| | | { |
| | | trd = new Thread(new ThreadStart(this.ThreadTask)); |
| | | trd.IsBackground = true; |
| | | trd.Start(); |
| | | } |
| | | catch (Exception em) |
| | | { |
| | | Common.WriteLogFile("WcsError", "UpdateThread/UpdateThread--回报线程启动出错:" + em.Message); |
| | | } |
| | | } |
| | | |
| | | #region 通讯反馈同步显示 |
| | | /// <summary> |
| | | /// 显示处理信息 |
| | | /// </summary> |
| | | /// <param name="text"></param> |
| | | private void DisplayInfo(string seq, string Errif, string arg_string) |
| | | { |
| | | if (frmdata == null) |
| | | { |
| | | return; |
| | | } |
| | | if (frmdata.InvokeRequired) |
| | | { |
| | | try |
| | | { |
| | | SetTextCallback d = new SetTextCallback(DisplayInfo); |
| | | frmdata.Invoke(d, new object[] { seq, Errif, arg_string }); |
| | | } |
| | | catch (Exception em) |
| | | { |
| | | Common.WriteLogFile("WcsError", "UpdateThread/DisplayInfo--同步回报信息失败:" + em.Message); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | add_dw_log(seq, Errif, arg_string); |
| | | if (frmdata.Items.Count > 200) |
| | | { |
| | | frmdata.Items.Clear(); ; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 添加ListView界面显示 |
| | | /// </summary> |
| | | /// <param name="le">listview</param> |
| | | /// <param name="seq">需要</param> |
| | | /// <param name="Errif">异常信息</param> |
| | | /// <param name="arg_string">显示内容</param> |
| | | public void add_dw_log(string seq, string Errif, string arg_string) |
| | | { |
| | | try |
| | | { |
| | | ListViewItem lvi = new ListViewItem(); |
| | | lvi.SubItems[0].Text = "【" + DateTime.Now.ToString() + "】" + seq + arg_string; |
| | | if (Errif == "N") |
| | | { |
| | | lvi.ForeColor = Color.Black; |
| | | } |
| | | else if (Errif == "E") |
| | | { |
| | | lvi.ForeColor = Color.Red; |
| | | } |
| | | else if (Errif == "P") |
| | | { |
| | | lvi.ForeColor = Color.Blue; |
| | | } |
| | | frmdata.Items.Add(lvi); |
| | | frmdata.EnsureVisible(frmdata.Items.Count - 1); |
| | | } |
| | | catch (Exception em) |
| | | { |
| | | ListViewItem lvi = new ListViewItem(); |
| | | lvi.SubItems[0].Text = "【" + DateTime.Now.ToString() + "】" + seq + arg_string + "异常:" + em.Message; |
| | | frmdata.Items.Add(lvi); |
| | | Common.WriteLogFile("WcsError", "UpdateThread/add_dw_log--回报添加界面显示出错:" + em.Message); |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 业务处理 |
| | | /// <summary> |
| | | /// 生成出库工作档 |
| | | /// </summary> |
| | | public void ProcOutToWorkData(string seq) |
| | | { |
| | | string ls_locno = ""; |
| | | string ls_error_memo = "", sql = ""; |
| | | int li_wrkno = 0, li_io_type = 0, li_stnNo = 0, li_e_stnNo = 0; |
| | | DateTime ldt_date = System.DateTime.Now; |
| | | double d_outQty = 0, d_stkQty = 0; |
| | | int action = 0, prnstatus = 0; |
| | | |
| | | DisplayInfo(seq, "N", " --处理出库通知档,生成出库工作档......"); |
| | | |
| | | try |
| | | { |
| | | //查找最早一条待出库库位 |
| | | sql = "select top 1 vlpla from cust_wait_pakout where status<>'Y' and nltyp<>'A01' order by status,modi_time"; |
| | | DataView dvLoc = Common.ExecAsrsSelect(sql); |
| | | if (dvLoc.Count <= 0) |
| | | { |
| | | return; |
| | | } |
| | | foreach (DataRowView drow in dvLoc) |
| | | { |
| | | ls_locno = drow[0].ToString(); |
| | | } |
| | | if (ls_locno == "") |
| | | { |
| | | return; |
| | | } |
| | | |
| | | //查询库位号是否在库状态,并查询条码号 |
| | | sql = "select loc_no,barcode from asr_loc_mast where loc_no='" + ls_locno + "' and loc_sts='F'"; |
| | | string barcode = ""; |
| | | DataView dv = Common.ExecAsrsSelect(sql); |
| | | if (dv.Count <= 0) |
| | | { |
| | | ls_error_memo = " " + seq + ".1 库位" + ls_locno + "不存在或非在库状态,请检查"; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | else |
| | | { |
| | | foreach (DataRowView drow in dv) |
| | | { |
| | | barcode = drow[1].ToString(); |
| | | } |
| | | } |
| | | |
| | | //根据库位号查找该库位所有出库资料 |
| | | sql = "select lgnum,tanum,tapos,matnr,maktx,werks,vsolm,meins,bname "; |
| | | sql += " from cust_wait_pakout where status<>'Y' and nltyp<>'A01' and vlpla='" + ls_locno + "' order by status,modi_time"; |
| | | dv = Common.ExecAsrsSelect(sql); |
| | | if (dv.Count <= 0) |
| | | { |
| | | return; |
| | | } |
| | | li_wrkno = Common.GetWrkno(0); |
| | | string sqlDetl = "", sqlWaitIn = ""; |
| | | foreach (DataRowView drow in dv) |
| | | { |
| | | string lgnum = drow[0].ToString(); |
| | | string tanum = drow[1].ToString(); |
| | | string tapos = drow[2].ToString(); |
| | | string matnr = drow[3].ToString(); |
| | | string maktx = drow[4].ToString(); |
| | | string werks = drow[5].ToString(); |
| | | string vsolm = drow[6].ToString(); |
| | | string meins = drow[7].ToString(); |
| | | string bname = drow[8].ToString(); |
| | | sqlDetl += " insert into asr_wrk_detl(wrk_no,io_time,lgnum,tbnum,tbpos,matnr,maktx,werks,anfme,altme,bname,zpallet) "; |
| | | sqlDetl += " values(" + li_wrkno + ",'" + ldt_date + "','" + lgnum + "'," + tanum + "," + tapos + ", "; |
| | | sqlDetl += " '" + matnr + "','" + maktx + "','" + werks + "'," + vsolm + ",'" + meins + "','" + bname + "','" + barcode + "');"; |
| | | sqlWaitIn += " update cust_wait_pakout set status='Y' where lgnum='" + lgnum + "' and tanum=" + tanum + " and tapos=" + tapos + " and vlpla=" + ls_locno + ";"; |
| | | d_outQty += double.Parse(vsolm); |
| | | } |
| | | DisplayInfo("", "P", " " + seq + ".2 正在处理待出库资料!库位:" + ls_locno); |
| | | |
| | | //查询库位号对应库存明细总数量 |
| | | sql = "select sum(anfme) from asr_loc_detl where loc_no='" + ls_locno + "' "; |
| | | dv = Common.ExecAsrsSelect(sql); |
| | | if (dv.Count <= 0) |
| | | { |
| | | ls_error_memo = " " + seq + ".3 库位" + ls_locno + "没有库存明细,请检查"; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | else |
| | | { |
| | | foreach (DataRowView drow in dv) |
| | | { |
| | | d_stkQty += double.Parse(drow[0].ToString()); |
| | | } |
| | | } |
| | | |
| | | int li_crnrow = int.Parse(ls_locno.Substring(0, 2)); |
| | | int li_crnno = (li_crnrow + 1) / 2; |
| | | string new_loc_sts = ""; |
| | | if (d_outQty < d_stkQty) |
| | | { |
| | | li_io_type = 103; |
| | | new_loc_sts = "P"; |
| | | li_e_stnNo = 4; |
| | | li_stnNo = Common.getIoStaNo(li_io_type, li_crnno, li_e_stnNo); |
| | | action = 2; //单独打印 |
| | | //prnstatus = 0; //默认等待,拣料站更新 |
| | | } |
| | | else if (d_outQty == d_stkQty) |
| | | { |
| | | li_io_type = 101; |
| | | new_loc_sts = "R"; |
| | | li_e_stnNo = 13; |
| | | li_stnNo = Common.getIoStaNo(li_io_type, li_crnno, li_e_stnNo); |
| | | action = 3; //既打印又确认 |
| | | //prnstatus = 0; //默认等待,拣料站更新 |
| | | } |
| | | else |
| | | { |
| | | ls_error_memo = " " + seq + ".4 库位" + ls_locno + "通知出库数量超出库存数量,请检查"; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | |
| | | sqlWaitIn = sqlWaitIn.Replace("update cust_wait_pakout set", "update cust_wait_pakout set action=" + action + ","); |
| | | |
| | | sql = sqlDetl; |
| | | sql += "insert into asr_wrk_mast(wrk_no,io_time,wrk_sts,io_type,crn_no,io_pri,source_loc_no,sta_no,source_sta_no,barcode) "; |
| | | sql += " values(" + li_wrkno + ",'" + ldt_date + "',11," + li_io_type + "," + li_crnno + ",13,'" + ls_locno + "', "; |
| | | sql += " " + li_e_stnNo + "," + li_stnNo + ",'" + barcode + "'); "; |
| | | sql += " update asr_loc_mast set loc_sts='" + new_loc_sts + "' where loc_no='" + ls_locno + "'; "; |
| | | sql += sqlWaitIn; |
| | | SqlConnection sqlconn = new SqlConnection(Common.sqlcon); |
| | | sqlconn.Open(); |
| | | SqlTransaction sqltrans = sqlconn.BeginTransaction(); |
| | | SqlCommand sqlcmd = new SqlCommand(sql, sqlconn); |
| | | sqlcmd.Transaction = sqltrans; |
| | | try |
| | | { |
| | | sqlcmd.ExecuteNonQuery(); |
| | | sqltrans.Commit(); |
| | | } |
| | | catch (SqlException t) |
| | | { |
| | | sqltrans.Rollback(); |
| | | //sqlcommon.Close(); |
| | | ls_error_memo = " " + seq + ".4 插入工作主档[asr_wrk_mast]错误 !库位:" + ls_locno + " 异常:" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | finally |
| | | { |
| | | sqlcmd.Dispose(); |
| | | sqlconn.Dispose(); |
| | | } |
| | | return; |
| | | |
| | | re: |
| | | sql = "update cust_wait_pakout set status='X',action=" + action + ",modi_time='" + ldt_date + "' where vlpla='" + ls_locno + "'"; |
| | | bool result = Common.ExecAsrsModify(sql); |
| | | if (!result) |
| | | { |
| | | ls_error_memo = " " + seq + ".5 更新出库档失败!库位:" + ls_locno; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | } |
| | | } |
| | | catch (Exception em) |
| | | { |
| | | ls_error_memo = " " + seq + ".6 处理待处理档生成出库工作档失败:" + em.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 生成库位调整工作档 |
| | | /// </summary> |
| | | public void ProcLocToWorkData(string seq) |
| | | { |
| | | string ls_slocno = "", ls_dlocno = ""; |
| | | string ls_error_memo = "", sql = ""; |
| | | int li_wrkno = 0, li_io_type = 0, li_stnNo = 0, li_e_stnNo = 0; |
| | | DateTime ldt_date = System.DateTime.Now; |
| | | double d_outQty = 0, d_stkQty = 0; |
| | | |
| | | DisplayInfo(seq, "N", " --处理出库通知档,生成出库工作档......"); |
| | | |
| | | try |
| | | { |
| | | //查找最早一条待出库库位 |
| | | sql = "select top 1 vlpla,nlpla from cust_wait_pakout where status<>'Y' and nltyp='A01' order by status,modi_time"; |
| | | DataView dvLoc = Common.ExecAsrsSelect(sql); |
| | | if (dvLoc.Count <= 0) |
| | | { |
| | | return; |
| | | } |
| | | foreach (DataRowView drow in dvLoc) |
| | | { |
| | | ls_slocno = drow[0].ToString(); |
| | | ls_dlocno = drow[1].ToString(); |
| | | } |
| | | if (ls_slocno == "" || ls_dlocno=="") |
| | | { |
| | | ls_error_memo = " " + seq + ".1 出库通知档源库位为空[cust_wait_pakout]错误 !库位:" + ls_slocno; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | |
| | | //查询目标库位状态,如果为空表示库位已转,如果在库表示源库位出库,目标库位并板,如果不在库,则报警停止执行 |
| | | string loc_sts = "", barcoded = ""; |
| | | sql = "select loc_sts,barcode from asr_loc_mast where loc_no='" + ls_dlocno + "' "; |
| | | DataView dv = Common.ExecAsrsSelect(sql); |
| | | if (dv.Count <= 0) |
| | | { |
| | | ls_error_memo = " " + seq + ".2 目标库位" + ls_dlocno + "不存在,请检查"; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | else |
| | | { |
| | | foreach (DataRowView drow in dv) |
| | | { |
| | | loc_sts = drow[0].ToString(); |
| | | barcoded = drow[1].ToString(); |
| | | } |
| | | } |
| | | |
| | | if (loc_sts == "O") |
| | | { //库位移转 |
| | | sql = "select lgnum,tbnum,tbpos,matnr,maktx,werks,anfme,altme,bname "; |
| | | sql += " from asr_loc_detl where loc_no='" + ls_slocno + "' order by matnr,modi_time"; |
| | | dv = Common.ExecAsrsSelect(sql); |
| | | if (dv.Count <= 0) |
| | | { |
| | | return; |
| | | } |
| | | li_wrkno = Common.GetWrkno(0); |
| | | string sqlDetl = "", sqlWaitIn = ""; |
| | | foreach (DataRowView drow in dv) |
| | | { |
| | | string lgnum = drow[0].ToString(); |
| | | string tanum = drow[1].ToString(); |
| | | string tapos = drow[2].ToString(); |
| | | string matnr = drow[3].ToString(); |
| | | string maktx = drow[4].ToString(); |
| | | string werks = drow[5].ToString(); |
| | | string vsolm = drow[6].ToString(); |
| | | string meins = drow[7].ToString(); |
| | | string bname = drow[8].ToString(); |
| | | sqlDetl += " insert into asr_wrk_detl(wrk_no,io_time,lgnum,tbnum,tbpos,matnr,maktx,werks,anfme,altme,bname) "; |
| | | sqlDetl += " values(" + li_wrkno + ",'" + ldt_date + "','" + lgnum + "'," + tanum + "," + tapos + ", "; |
| | | sqlDetl += " '" + matnr + "','" + maktx + "','" + werks + "'," + vsolm + ",'" + meins + "','" + bname + "');"; |
| | | sqlWaitIn += " update cust_wait_pakout set status='Y' where nltyp='A01' and vlpla='" + ls_slocno + "' and nlpla='" + ls_dlocno + "';"; |
| | | } |
| | | DisplayInfo("", "P", " " + seq + ".3 正在处理待出库资料!库位:" + ls_slocno); |
| | | |
| | | //查询库位号是否在库状态,并查询条码号 |
| | | sql = "select loc_no,barcode from asr_loc_mast where loc_no='" + ls_slocno + "' and loc_sts='F'"; |
| | | string barcode = ""; |
| | | dv = Common.ExecAsrsSelect(sql); |
| | | if (dv.Count <= 0) |
| | | { |
| | | ls_error_memo = " " + seq + ".4 源库位" + ls_slocno + "不存在或非在库状态,请检查"; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | else |
| | | { |
| | | foreach (DataRowView drow in dv) |
| | | { |
| | | barcode = drow[1].ToString(); |
| | | } |
| | | } |
| | | int li_crnrow = int.Parse(ls_slocno.Substring(0, 2)); |
| | | int li_crnno = (li_crnrow + 1) / 2; |
| | | li_io_type = 11; |
| | | |
| | | sql = sqlDetl; |
| | | sql += "insert into asr_wrk_mast(wrk_no,io_time,wrk_sts,io_type,crn_no,io_pri,source_loc_no,loc_no,barcode,empty_mk) "; |
| | | sql += " values(" + li_wrkno + ",'" + ldt_date + "',11," + li_io_type + "," + li_crnno + ",13,'" + ls_slocno + "', "; |
| | | sql += " '" + ls_dlocno + "','" + barcode + "','N'); "; |
| | | sql += " update asr_loc_mast set loc_sts='R' where loc_no='" + ls_slocno + "'; "; |
| | | sql += " update asr_loc_mast set loc_sts='S' where loc_no='" + ls_dlocno + "'; "; |
| | | sql += sqlWaitIn; |
| | | SqlConnection sqlconn = new SqlConnection(Common.sqlcon); |
| | | sqlconn.Open(); |
| | | SqlTransaction sqltrans = sqlconn.BeginTransaction(); |
| | | SqlCommand sqlcmd = new SqlCommand(sql, sqlconn); |
| | | sqlcmd.Transaction = sqltrans; |
| | | try |
| | | { |
| | | sqlcmd.ExecuteNonQuery(); |
| | | sqltrans.Commit(); |
| | | } |
| | | catch (SqlException t) |
| | | { |
| | | sqltrans.Rollback(); |
| | | //sqlcommon.Close(); |
| | | ls_error_memo = " " + seq + ".5 插入工作主档[asr_wrk_mast]错误 !库位:" + ls_slocno + " 异常:" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | finally |
| | | { |
| | | sqlcmd.Dispose(); |
| | | sqlconn.Dispose(); |
| | | } |
| | | } |
| | | else if (loc_sts == "F") |
| | | {//目标库位并板 |
| | | //源库位出库 |
| | | string sqlDetld = ""; |
| | | int li_wrknod = 0; |
| | | int action = 0; |
| | | sql = "select lgnum,tanum,tapos,matnr,maktx,werks,vsolm,meins,bname "; |
| | | sql += " from cust_wait_pakout where status<>'Y' and nltyp='A01' and vlpla='" + ls_slocno + "' and nlpla='" + ls_dlocno + "' order by status,modi_time"; |
| | | dv = Common.ExecAsrsSelect(sql); |
| | | if (dv.Count <= 0) |
| | | { |
| | | return; |
| | | } |
| | | li_wrkno = Common.GetWrkno(0); |
| | | li_wrknod = Common.GetWrkno(0); |
| | | string sqlDetl = "", sqlWaitIn = ""; |
| | | foreach (DataRowView drow in dv) |
| | | { |
| | | string lgnum = drow[0].ToString(); |
| | | string tanum = drow[1].ToString(); |
| | | string tapos = drow[2].ToString(); |
| | | string matnr = drow[3].ToString(); |
| | | string maktx = drow[4].ToString(); |
| | | string werks = drow[5].ToString(); |
| | | string vsolm = drow[6].ToString(); |
| | | string meins = drow[7].ToString(); |
| | | string bname = drow[8].ToString(); |
| | | sqlDetl += " insert into asr_wrk_detl(wrk_no,io_time,lgnum,tbnum,tbpos,matnr,maktx,werks,anfme,altme,bname) "; |
| | | sqlDetl += " values(" + li_wrkno + ",'" + ldt_date + "','" + lgnum + "'," + tanum + "," + tapos + ", "; |
| | | sqlDetl += " '" + matnr + "','" + maktx + "','" + werks + "'," + vsolm + ",'" + meins + "','" + bname + "');"; |
| | | |
| | | sqlDetld += " insert into asr_wrk_detl(wrk_no,io_time,lgnum,tbnum,tbpos,matnr,maktx,werks,anfme,altme,bname) "; |
| | | sqlDetld += " values(" + li_wrknod + ",'" + ldt_date + "','" + lgnum + "'," + tanum + "," + tapos + ", "; |
| | | sqlDetld += " '" + matnr + "','" + maktx + "','" + werks + "'," + vsolm + ",'" + meins + "','" + bname + "');"; |
| | | |
| | | sqlWaitIn += " update cust_wait_pakout set status='Y' where lgnum='" + lgnum + "' and tanum=" + tanum + " and tapos=" + tapos + " and vlpla=" + ls_slocno + ";"; |
| | | d_outQty += double.Parse(vsolm); |
| | | } |
| | | DisplayInfo("", "P", " " + seq + ".6 正在处理待出库资料!库位:" + ls_slocno); |
| | | |
| | | //查询库位号是否在库状态,并查询条码号 |
| | | sql = "select loc_no,barcode from asr_loc_mast where loc_no='" + ls_slocno + "' and loc_sts='F'"; |
| | | string barcode = ""; |
| | | dv = Common.ExecAsrsSelect(sql); |
| | | if (dv.Count <= 0) |
| | | { |
| | | ls_error_memo = " " + seq + ".7 源库位" + ls_slocno + "不存在或非在库状态,请检查"; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | else |
| | | { |
| | | foreach (DataRowView drow in dv) |
| | | { |
| | | barcode = drow[1].ToString(); |
| | | } |
| | | } |
| | | |
| | | //查询库位号对应库存明细总数量 |
| | | sql = "select sum(anfme) from asr_loc_detl where loc_no='" + ls_slocno + "' "; |
| | | dv = Common.ExecAsrsSelect(sql); |
| | | if (dv.Count <= 0) |
| | | { |
| | | ls_error_memo = " " + seq + ".8 库位" + ls_slocno + "没有库存明细,请检查"; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | else |
| | | { |
| | | foreach (DataRowView drow in dv) |
| | | { |
| | | d_stkQty += double.Parse(drow[0].ToString()); |
| | | } |
| | | } |
| | | |
| | | int li_crnrow = int.Parse(ls_slocno.Substring(0, 2)); |
| | | int li_crnno = (li_crnrow + 1) / 2; |
| | | string new_loc_sts = ""; |
| | | if (d_outQty < d_stkQty) |
| | | { |
| | | li_io_type = 103; |
| | | new_loc_sts = "P"; |
| | | li_e_stnNo = 4; |
| | | li_stnNo = Common.getIoStaNo(li_io_type, li_crnno, li_e_stnNo); |
| | | action = 2; |
| | | } |
| | | else if (d_outQty == d_stkQty) |
| | | { |
| | | li_io_type = 101; |
| | | new_loc_sts = "R"; |
| | | li_e_stnNo = 13; |
| | | li_stnNo = Common.getIoStaNo(li_io_type, li_crnno, li_e_stnNo); |
| | | action = 3; |
| | | } |
| | | else |
| | | { |
| | | ls_error_memo = " " + seq + ".9 库位" + ls_slocno + "通知出库数量超出库存数量,请检查"; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | |
| | | int li_crnrowd = int.Parse(ls_dlocno.Substring(0, 2)); |
| | | int li_crnnod = (li_crnrowd + 1) / 2; |
| | | int li_io_typed = 104; |
| | | int li_e_stnNod = 4; |
| | | int li_stnNod = Common.getIoStaNo(li_io_typed, li_crnnod, li_e_stnNod); |
| | | |
| | | sqlWaitIn = sqlWaitIn.Replace("update cust_wait_pakout set", "update cust_wait_pakout set action=" + action + ","); |
| | | |
| | | sql = sqlDetl; |
| | | sql += "insert into asr_wrk_mast(wrk_no,io_time,wrk_sts,io_type,crn_no,io_pri,source_loc_no,sta_no,source_sta_no,barcode) "; |
| | | sql += " values(" + li_wrkno + ",'" + ldt_date + "',11," + li_io_type + "," + li_crnno + ",13,'" + ls_slocno + "', "; |
| | | sql += " " + li_e_stnNo + "," + li_stnNo + ",'" + barcode + "'); "; |
| | | sql += sqlDetld; |
| | | sql += "insert into asr_wrk_mast(wrk_no,io_time,wrk_sts,io_type,crn_no,io_pri,source_loc_no,sta_no,source_sta_no,barcode) "; |
| | | sql += " values(" + li_wrknod + ",'" + ldt_date + "',11," + li_io_typed + "," + li_crnnod + ",13,'" + ls_dlocno + "', "; |
| | | sql += " " + li_e_stnNod + "," + li_stnNod + ",'" + barcoded + "'); "; |
| | | sql += " update asr_loc_mast set loc_sts='" + new_loc_sts + "' where loc_no='" + ls_slocno + "'; "; |
| | | sql += " update asr_loc_mast set loc_sts='P' where loc_no='" + ls_dlocno + "'; "; |
| | | sql += sqlWaitIn; |
| | | SqlConnection sqlconn = new SqlConnection(Common.sqlcon); |
| | | sqlconn.Open(); |
| | | SqlTransaction sqltrans = sqlconn.BeginTransaction(); |
| | | SqlCommand sqlcmd = new SqlCommand(sql, sqlconn); |
| | | sqlcmd.Transaction = sqltrans; |
| | | try |
| | | { |
| | | sqlcmd.ExecuteNonQuery(); |
| | | sqltrans.Commit(); |
| | | } |
| | | catch (SqlException t) |
| | | { |
| | | sqltrans.Rollback(); |
| | | //sqlcommon.Close(); |
| | | ls_error_memo = " " + seq + ".10 插入工作主档[asr_wrk_mast]错误 !库位:" + ls_slocno + " 异常:" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | finally |
| | | { |
| | | sqlcmd.Dispose(); |
| | | sqlconn.Dispose(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | ls_error_memo = " " + seq + ".11 目标库位" + ls_dlocno + "不是在库或空库位状态,请检查"; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | return; |
| | | |
| | | re: |
| | | sql = "update cust_wait_pakout set status='X',modi_time='" + ldt_date + "' where vlpla='" + ls_slocno + "'"; |
| | | bool result = Common.ExecAsrsModify(sql); |
| | | if (!result) |
| | | { |
| | | ls_error_memo = " " + seq + ".12 更新出库档失败!库位:" + ls_slocno; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | } |
| | | } |
| | | catch (Exception em) |
| | | { |
| | | ls_error_memo = " " + seq + ".13 处理待处理档生成出库工作档失败:" + em.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 生成盘点工作档 |
| | | /// </summary> |
| | | public void ProcCheckToWorkData(string seq) |
| | | { |
| | | string ls_locno = ""; |
| | | string ls_error_memo = "", sql = ""; |
| | | int li_wrkno = 0, li_io_type = 0, li_stnNo = 0, li_e_stnNo = 0; |
| | | DateTime ldt_date = System.DateTime.Now; |
| | | int type = 1; |
| | | |
| | | DisplayInfo(seq, "N", " --处理盘点通知档,生成盘点工作档......"); |
| | | |
| | | try |
| | | { |
| | | //查找最早一条待出库库位 |
| | | sql = "select top 1 lgpla from cust_wait_check where status<>'Y' order by status,modi_time"; |
| | | DataView dvLoc = Common.ExecAsrsSelect(sql); |
| | | if (dvLoc.Count <= 0) |
| | | { |
| | | return; |
| | | } |
| | | foreach (DataRowView drow in dvLoc) |
| | | { |
| | | ls_locno = drow[0].ToString(); |
| | | } |
| | | if (ls_locno == "") |
| | | { |
| | | return; |
| | | } |
| | | |
| | | //查询库位号是否在库状态,并查询条码号 |
| | | sql = "select loc_no,barcode from asr_loc_mast where loc_no='" + ls_locno + "' and loc_sts='F'"; |
| | | string barcode = ""; |
| | | DataView dv = Common.ExecAsrsSelect(sql); |
| | | if (dv.Count <= 0) |
| | | { |
| | | ls_error_memo = " " + seq + ".2 库位" + ls_locno + "不存在或非在库状态,请检查"; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | else |
| | | { |
| | | foreach (DataRowView drow in dv) |
| | | { |
| | | barcode = drow[1].ToString(); |
| | | } |
| | | } |
| | | |
| | | //根据库位号查找该库位所有出库资料 |
| | | sql = "select a.lgnum,a.ivnum,a.ivpos,b.matnr,b.maktx,b.altme,b.werks "; |
| | | sql += " from cust_wait_check a, asr_loc_detl b "; |
| | | sql += " where a.status<>'Y' and a.lgpla='" + ls_locno + "' and a.matnr=b.matnr and lgpla=b.loc_no and io_status='N'"; |
| | | sql += " order by a.status,a.modi_time"; |
| | | dv = Common.ExecAsrsSelect(sql); |
| | | if (dv == null || dv.Count <= 0) |
| | | { |
| | | sql = "select b.lgnum,b.tbnum,b.tbpos,b.matnr,b.maktx,b.altme,b.werks "; |
| | | sql += " from cust_wait_check a, asr_loc_detl b "; |
| | | sql += " where a.status<>'Y' and a.lgpla='" + ls_locno + "' and a.lgpla=b.loc_no and io_status='N'"; |
| | | sql += " order by a.status,a.modi_time"; |
| | | dv = Common.ExecAsrsSelect(sql); |
| | | if (dv == null || dv.Count <= 0) |
| | | { |
| | | ls_error_memo = " " + seq + ".3 查询库存明细[asr_loc_detl]没有 !库位:" + ls_locno; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | type = 2; |
| | | //return; |
| | | } |
| | | li_wrkno = Common.GetWrkno(0); |
| | | string sqlDetl = "", sqlWaitIn = ""; |
| | | foreach (DataRowView drow in dv) |
| | | { |
| | | string lgnum = drow[0].ToString(); |
| | | string tanum = drow[1].ToString(); |
| | | string tapos = drow[2].ToString(); |
| | | string matnr = drow[3].ToString(); |
| | | string maktx = drow[4].ToString(); |
| | | string altme = drow[5].ToString(); |
| | | string werks = drow[6].ToString(); |
| | | sqlDetl += " insert into asr_wrk_detl(wrk_no,io_time,lgnum,tbnum,tbpos,matnr,maktx,altme,werks,zpallet) "; |
| | | sqlDetl += " values(" + li_wrkno + ",'" + ldt_date + "','" + lgnum + "'," + tanum + "," + tapos + ", "; |
| | | sqlDetl += " '" + matnr + "','" + maktx + "','" + altme + "','" + werks + "','" + barcode + "');"; |
| | | if (type == 1) |
| | | { |
| | | sqlWaitIn += " update cust_wait_check set status='Y' where lgnum='" + lgnum + "' and ivnum=" + tanum + " and ivpos=" + tapos + ";"; |
| | | } |
| | | else |
| | | { |
| | | sqlWaitIn += " update cust_wait_check set status='Y' where lgpla='" + ls_locno + "';"; |
| | | } |
| | | } |
| | | DisplayInfo("", "P", " " + seq + ".1 正在处理待盘点资料!库位:" + ls_locno); |
| | | |
| | | int li_crnrow = int.Parse(ls_locno.Substring(0, 2)); |
| | | int li_crnno = (li_crnrow + 1) / 2; |
| | | li_io_type = 107; |
| | | li_e_stnNo = 4; |
| | | li_stnNo = Common.getIoStaNo(li_io_type, li_crnno, li_e_stnNo); |
| | | |
| | | sql = sqlDetl; |
| | | sql += "insert into asr_wrk_mast(wrk_no,io_time,wrk_sts,io_type,crn_no,io_pri,source_loc_no,sta_no,source_sta_no,barcode) "; |
| | | sql += " values(" + li_wrkno + ",'" + ldt_date + "',11," + li_io_type + "," + li_crnno + ",13,'" + ls_locno + "', "; |
| | | sql += " " + li_e_stnNo + "," + li_stnNo + ",'" + barcode + "'); "; |
| | | sql += " update asr_loc_mast set loc_sts='P' where loc_no='" + ls_locno + "'; "; |
| | | sql += sqlWaitIn; |
| | | SqlConnection sqlconn = new SqlConnection(Common.sqlcon); |
| | | sqlconn.Open(); |
| | | SqlTransaction sqltrans = sqlconn.BeginTransaction(); |
| | | SqlCommand sqlcmd = new SqlCommand(sql, sqlconn); |
| | | sqlcmd.Transaction = sqltrans; |
| | | try |
| | | { |
| | | sqlcmd.ExecuteNonQuery(); |
| | | sqltrans.Commit(); |
| | | } |
| | | catch (SqlException t) |
| | | { |
| | | sqltrans.Rollback(); |
| | | //sqlcommon.Close(); |
| | | ls_error_memo = " " + seq + ".3 插入工作主档[asr_wrk_mast]错误 !库位:" + ls_locno + " 异常:" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | finally |
| | | { |
| | | sqlcmd.Dispose(); |
| | | sqlconn.Dispose(); |
| | | } |
| | | return; |
| | | |
| | | re: |
| | | sql = "update cust_wait_check set status='X',modi_time='" + ldt_date + "' where lgpla='" + ls_locno + "'"; |
| | | bool result = Common.ExecAsrsModify(sql); |
| | | if (!result) |
| | | { |
| | | ls_error_memo = " " + seq + ".4 更新盘点档失败!库位:" + ls_locno; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | } |
| | | } |
| | | catch (Exception em) |
| | | { |
| | | ls_error_memo = " " + seq + ".5 处理盘点通知档生成盘点工作档失败:" + em.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 处理工作档中工作状态为4和14、6的资料,更新库存档、待处理档 |
| | | /// </summary> |
| | | public void ProcWorkMast(string seq) |
| | | { |
| | | string ls_error_memo = "", sql = "", ls_barcode = ""; |
| | | int li_wrk_no = 0, li_wrk_sts = 0, li_io_type = 0, li_sta_no = 0, li_source_sta_no = 0;//, li_wrk_model = 1; |
| | | string ls_loc_no = "", ls_source_loc_no = "";//, ls_wmsId = "", ls_boxId = ""; |
| | | DateTime ldt_date = System.DateTime.Now, ldt_io_time; |
| | | string ls_sheet_no = "", ls_empty_mk = "", ls_full_mk = "", ls_online_yn = ""; |
| | | int li_io_pri = 0, li_whs_type; |
| | | DisplayInfo(seq, "N", "--处理工作档 (status=4,14)......"); |
| | | try |
| | | { |
| | | try |
| | | { |
| | | DataView dv = Common.ExecAsrsSelect("select getdate() from sys_dual"); |
| | | foreach (System.Data.DataRowView drow in dv) |
| | | { |
| | | ldt_date = Convert.ToDateTime(drow[0]); |
| | | } |
| | | } |
| | | catch (SqlException) |
| | | { |
| | | return; |
| | | } |
| | | sql = "select wrk_no,sheet_no,wrk_sts,io_type,io_pri,empty_mk," + |
| | | " io_time,loc_no,sta_no,source_sta_no,source_loc_no,whs_type,online_yn,barcode" + |
| | | " from dbo.asr_wrk_mast where ((wrk_sts = 4 Or wrk_sts = 14 ) and io_type <> 103 and io_type <> 104 and io_type <> 107 ) or (wrk_sts = 2 and io_type=6)" + |
| | | " order by upd_mk,io_time,wrk_no"; |
| | | DataView dv_wrkmast = Common.ExecAsrsSelect(sql); |
| | | if (dv_wrkmast == null || dv_wrkmast.Count < 1) |
| | | { |
| | | DisplayInfo("", "N", " " + seq + ".1 工作档 [asr_wrk_mast] 没有资料!"); |
| | | return; |
| | | } |
| | | foreach (DataRowView drow_wrkmast in dv_wrkmast) |
| | | { |
| | | li_wrk_no = Convert.ToInt32(drow_wrkmast[0]); |
| | | ls_sheet_no = drow_wrkmast[1].ToString(); |
| | | li_wrk_sts = Convert.ToInt32(drow_wrkmast[2]); |
| | | li_io_type = Convert.ToInt32(drow_wrkmast[3]); |
| | | li_io_pri = Convert.ToInt32(drow_wrkmast[4]); |
| | | ls_empty_mk = drow_wrkmast[5].ToString(); |
| | | ldt_io_time = Convert.ToDateTime(drow_wrkmast[6]); |
| | | ls_loc_no = drow_wrkmast[7].ToString(); |
| | | li_sta_no = Convert.ToInt32(drow_wrkmast[8]); |
| | | li_source_sta_no = Convert.ToInt32(drow_wrkmast[9]); |
| | | ls_source_loc_no = drow_wrkmast[10].ToString(); |
| | | //li_whs_type = Convert.ToInt32(drow_wrkmast[11]); |
| | | //ls_full_mk = drow_wrkmast[12].ToString(); |
| | | ls_online_yn = drow_wrkmast[12].ToString(); |
| | | ls_barcode = drow_wrkmast[13].ToString(); |
| | | |
| | | DisplayInfo("", "P", " " + seq + ".2 处理工作档:" + li_wrk_no.ToString()); |
| | | SqlConnection sqlconn = new SqlConnection(Common.sqlcon); |
| | | sqlconn.Open(); |
| | | SqlTransaction sqltrans = sqlconn.BeginTransaction(); |
| | | if (li_wrk_sts == 4) |
| | | { |
| | | switch (li_io_type) |
| | | { |
| | | #region 空托盘入库 |
| | | case 10: |
| | | sql = "update asr_loc_mast set loc_sts='D',io_time='" + ldt_date + "',modi_time='" + ldt_date + "'"; |
| | | sql += " where loc_no='" + ls_loc_no + "' and (loc_sts = 'S' Or loc_sts = 'Q')"; |
| | | SqlCommand cmd_10 = new SqlCommand(sql, sqlconn); |
| | | cmd_10.Transaction = sqltrans; |
| | | try |
| | | { |
| | | cmd_10.ExecuteNonQuery(); |
| | | } |
| | | catch (SqlException t) |
| | | { |
| | | sqltrans.Rollback(); |
| | | cmd_10.Dispose(); |
| | | sqlconn.Dispose(); |
| | | ls_error_memo = " " + seq + ".3 入库-更新库位状态异常 [asr_loc_mast] !工作号:" + li_wrk_no.ToString() + " 库位号:" + ls_loc_no + " 异常:" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | break; |
| | | #endregion |
| | | #region 全板入库 |
| | | case 1: |
| | | ///检查库存明细档是否已存在数据 |
| | | int li_count1 = 0; |
| | | sql = ""; |
| | | try |
| | | { |
| | | li_count1 = Common.ExecAsrsSelect1("select count(*) from asr_loc_detl where loc_no ='" + ls_loc_no + "'"); |
| | | |
| | | } |
| | | catch (Exception em) |
| | | { |
| | | ls_error_memo = " " + seq + ".4 查询库存明细[asr_loc_detl]出错!工作号:" + li_wrk_no.ToString() + "!" + em.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | |
| | | ///根据工作号,查询工作明细档物料编码 |
| | | string sqlDetl = ""; |
| | | string sqlWaitIn = ""; |
| | | sql = "select lgnum,tbnum,tbpos,zmatid,matnr,maktx,werks,anfme,altme,zpallet,bname from asr_wrk_detl where wrk_no=" + li_wrk_no; |
| | | DataView dv_wrkdetl = Common.ExecAsrsSelect(sql); |
| | | if (dv_wrkdetl == null || dv_wrkdetl.Count < 1) |
| | | { |
| | | DisplayInfo("", "E", " " + seq + ".5 工作明细档 [asr_wrk_detl] 没有资料!"); |
| | | return; |
| | | } |
| | | foreach (DataRowView drow in dv_wrkdetl) |
| | | { |
| | | string lgnum = "", tbnum = "", tbpos = "", zmatid = "", matnr = "", maktx = "", werks = "", anfme = "", altme = "", zpallet = "", bname = ""; |
| | | lgnum = drow[0].ToString(); |
| | | tbnum = drow[1].ToString(); |
| | | tbpos = drow[2].ToString(); |
| | | zmatid = drow[3].ToString(); |
| | | matnr = drow[4].ToString(); |
| | | maktx = drow[5].ToString(); |
| | | werks = drow[6].ToString(); |
| | | anfme = drow[7].ToString(); |
| | | altme = drow[8].ToString(); |
| | | zpallet = drow[9].ToString(); |
| | | bname = drow[10].ToString(); |
| | | |
| | | string sqlLocDetl = "select anfme from asr_loc_detl where loc_no='" + ls_loc_no + "' and matnr='" + matnr + "'"; |
| | | DataView dvLocDetl = Common.ExecAsrsSelect(sqlLocDetl); |
| | | if (dvLocDetl != null) |
| | | { |
| | | if (dvLocDetl.Count > 0) |
| | | {//库存已有,更新数量 |
| | | sqlDetl = " update asr_loc_detl set anfme=anfme+" + anfme + " where loc_no='" + ls_loc_no + "' and matnr='" + matnr + "'; "; |
| | | Common.ExecAsrsModify(sqlDetl); |
| | | } |
| | | else |
| | | {//库存没有,插入 |
| | | sqlDetl = " insert into asr_loc_detl(loc_no,lgnum,tbnum,tbpos,zmatid,matnr,maktx,werks,anfme,altme,zpallet,bname) "; |
| | | sqlDetl += " values('" + ls_loc_no + "','" + lgnum + "'," + tbnum + "," + tbpos + ",'" + zmatid + "', "; |
| | | sqlDetl += " '" + matnr + "','" + maktx + "','" + werks + "'," + anfme + ",'" + altme + "','" + ls_barcode + "','" + bname + "');"; |
| | | Common.ExecAsrsModify(sqlDetl); |
| | | } |
| | | } |
| | | sqlWaitIn += " update cust_wait_pakin set io_status='Y' where lgnum='" + lgnum + "' and tbnum=" + tbnum + " and tbpos=" + tbpos + " and zmatid='" + zmatid + "';"; |
| | | } |
| | | |
| | | ///更新库存信息,插入库存明细档,并更新库存主档 |
| | | sql = ""; |
| | | if (li_count1 > 0) |
| | | { |
| | | sql += "delete from asr_loc_detl where loc_no ='" + ls_loc_no + "';"; |
| | | } |
| | | sql += " update asr_loc_mast set loc_sts='F',io_time='" + ldt_date + "',modi_time='" + ldt_date + "',barcode='" + ls_barcode + "'"; |
| | | sql += " where loc_no='" + ls_loc_no + "' and loc_sts = 'S';"; |
| | | //sql += sqlDetl; |
| | | sql += sqlWaitIn; |
| | | |
| | | SqlCommand cmd_1 = new SqlCommand(sql, sqlconn); |
| | | cmd_1.Transaction = sqltrans; |
| | | try |
| | | { |
| | | cmd_1.ExecuteNonQuery(); |
| | | } |
| | | catch (SqlException t) |
| | | { |
| | | sqltrans.Rollback(); |
| | | cmd_1.Dispose(); |
| | | sqlconn.Dispose(); |
| | | ls_error_memo = " " + seq + ".6 入库-更新库存异常 [asr_loc_mast] !工作号:" + li_wrk_no.ToString() + " 库位号:" + ls_loc_no + " !" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | break; |
| | | #endregion |
| | | #region 拣料再入库 |
| | | case 53: |
| | | ///根据工作号,查询工作明细档物料编码 |
| | | sqlDetl = ""; |
| | | sqlWaitIn = ""; |
| | | sql = "select lgnum,tbnum,tbpos,zmatid,matnr,maktx,werks,anfme,altme,zpallet,bname from asr_wrk_detl where wrk_no=" + li_wrk_no; |
| | | DataView dv_wrkdetl53 = Common.ExecAsrsSelect(sql); |
| | | if (dv_wrkdetl53 == null || dv_wrkdetl53.Count < 1) |
| | | { |
| | | DisplayInfo("", "E", " " + seq + ".6 工作明细档 [asr_wrk_detl] 没有资料!"); |
| | | return; |
| | | } |
| | | foreach (DataRowView drow in dv_wrkdetl53) |
| | | { |
| | | string lgnum = "", tbnum = "", tbpos = "", zmatid = "", matnr = "", maktx = "", werks = "", anfme = "", altme = "", zpallet = "", bname = ""; |
| | | lgnum = drow[0].ToString(); |
| | | tbnum = drow[1].ToString(); |
| | | tbpos = drow[2].ToString(); |
| | | zmatid = drow[3].ToString(); |
| | | matnr = drow[4].ToString(); |
| | | maktx = drow[5].ToString(); |
| | | werks = drow[6].ToString(); |
| | | anfme = drow[7].ToString(); |
| | | altme = drow[8].ToString(); |
| | | zpallet = drow[9].ToString(); |
| | | bname = drow[10].ToString(); |
| | | sqlDetl += " update asr_loc_detl set anfme=anfme-" + anfme + " where loc_no='" + ls_loc_no + "' and matnr='" + matnr + "'"; |
| | | sqlWaitIn += " update cust_wait_pakout set io_status='Y' where lgnum='" + lgnum + "' and tanum=" + tbnum + " and tapos=" + tbpos + " and matnr=" + matnr + ";"; |
| | | } |
| | | |
| | | ///更新库存信息,插入库存明细档,并更新库存主档 |
| | | sql = " update asr_loc_mast set loc_sts='F',io_time='" + ldt_date + "',modi_time='" + ldt_date + "',barcode='" + ls_barcode + "'"; |
| | | sql += " where loc_no='" + ls_loc_no + "' and loc_sts = 'Q';"; |
| | | sql += sqlDetl; |
| | | sql += sqlWaitIn; |
| | | |
| | | |
| | | SqlCommand cmd_53 = new SqlCommand(sql, sqlconn); |
| | | cmd_53.Transaction = sqltrans; |
| | | try |
| | | { |
| | | cmd_53.ExecuteNonQuery(); |
| | | } |
| | | catch (SqlException t) |
| | | { |
| | | sqltrans.Rollback(); |
| | | cmd_53.Dispose(); |
| | | sqlconn.Dispose(); |
| | | ls_error_memo = " " + seq + ".7 拣料-更新库存异常 [asr_loc_mast] !工作号:" + li_wrk_no.ToString() + " 库位号:" + ls_loc_no + " !" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | break; |
| | | #endregion |
| | | #region 并板再入库 |
| | | case 54: |
| | | ///根据工作号,查询工作明细档物料编码 |
| | | sqlDetl = ""; |
| | | sqlWaitIn = ""; |
| | | sql = "select lgnum,tbnum,tbpos,zmatid,matnr,maktx,werks,anfme,altme,zpallet,bname from asr_wrk_detl where wrk_no=" + li_wrk_no; |
| | | DataView dv_wrkdetl54 = Common.ExecAsrsSelect(sql); |
| | | if (dv_wrkdetl54 == null || dv_wrkdetl54.Count < 1) |
| | | { |
| | | DisplayInfo("", "E", " " + seq + ".8 工作明细档 [asr_wrk_detl] 没有资料!"); |
| | | return; |
| | | } |
| | | foreach (DataRowView drow in dv_wrkdetl54) |
| | | { |
| | | string lgnum = "", tbnum = "", tbpos = "", zmatid = "", matnr = "", maktx = "", werks = "", anfme = "", altme = "", zpallet = "", bname = ""; |
| | | lgnum = drow[0].ToString(); |
| | | tbnum = drow[1].ToString(); |
| | | tbpos = drow[2].ToString(); |
| | | zmatid = drow[3].ToString(); |
| | | matnr = drow[4].ToString(); |
| | | maktx = drow[5].ToString(); |
| | | werks = drow[6].ToString(); |
| | | anfme = drow[7].ToString(); |
| | | altme = drow[8].ToString(); |
| | | zpallet = drow[9].ToString(); |
| | | bname = drow[10].ToString(); |
| | | string sql1 = "select anfme from asr_loc_detl where loc_no='" + ls_loc_no + "' and matnr='" + matnr + "'"; |
| | | DataView dv_locdetl54 = Common.ExecAsrsSelect(sql1); |
| | | if (dv_locdetl54 != null && dv_locdetl54.Count > 0) |
| | | { |
| | | sqlDetl += " update asr_loc_detl set anfme=anfme+" + anfme + " where loc_no='" + ls_loc_no + "' and matnr='" + matnr + "'"; |
| | | //sqlWaitIn += " update cust_wait_pakin set io_status='Y' where matnr=" + matnr + ";"; |
| | | } |
| | | else |
| | | { |
| | | sqlDetl += " insert into asr_loc_detl(loc_no,lgnum,tbnum,tbpos,zmatid,matnr,maktx,werks,anfme,altme,zpallet,bname) "; |
| | | sqlDetl += " values('" + ls_loc_no + "','" + lgnum + "'," + tbnum + "," + tbpos + ",'" + zmatid + "', "; |
| | | sqlDetl += " '" + matnr + "','" + maktx + "','" + werks + "'," + anfme + ",'" + altme + "','" + ls_barcode + "','" + bname + "');"; |
| | | } |
| | | sqlWaitIn += " update cust_wait_pakout set io_status='Y' where lgnum='" + lgnum + "' and tanum=" + tbnum + " and tapos=" + tbpos + ";"; |
| | | } |
| | | |
| | | ///更新库存信息,插入库存明细档,并更新库存主档 |
| | | //sql = " update asr_loc_mast set loc_sts='F',io_time='" + ldt_date + "',modi_time='" + ldt_date + "',barcode='" + ls_barcode + "'"; |
| | | sql = " update asr_loc_mast set loc_sts='F',io_time='" + ldt_date + "',modi_time='" + ldt_date + "' "; |
| | | sql += " where loc_no='" + ls_loc_no + "' and loc_sts = 'Q';"; |
| | | sql += sqlDetl; |
| | | sql += sqlWaitIn; |
| | | |
| | | SqlCommand cmd_54 = new SqlCommand(sql, sqlconn); |
| | | cmd_54.Transaction = sqltrans; |
| | | try |
| | | { |
| | | cmd_54.ExecuteNonQuery(); |
| | | } |
| | | catch (SqlException t) |
| | | { |
| | | sqltrans.Rollback(); |
| | | cmd_54.Dispose(); |
| | | sqlconn.Dispose(); |
| | | ls_error_memo = " " + seq + ".9 并板再入库-更新库存异常 [asr_loc_mast] !工作号:" + li_wrk_no.ToString() + " 库位号:" + ls_loc_no + " !" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | break; |
| | | #endregion |
| | | #region 盘点再入库 |
| | | case 57: |
| | | ///根据工作号,查询工作明细档物料编码 |
| | | sqlDetl = ""; |
| | | sqlWaitIn = ""; |
| | | sql = "select lgnum,tbnum,tbpos,matnr from asr_wrk_detl where wrk_no=" + li_wrk_no; |
| | | DataView dv_wrkdetl57 = Common.ExecAsrsSelect(sql); |
| | | if (dv_wrkdetl57 == null || dv_wrkdetl57.Count < 1) |
| | | { |
| | | DisplayInfo("", "E", " " + seq + ".10 工作明细档 [asr_wrk_detl] 没有资料!"); |
| | | return; |
| | | } |
| | | foreach (DataRowView drow in dv_wrkdetl57) |
| | | { |
| | | string lgnum = "", tbnum = "", tbpos = "", matnr = ""; |
| | | lgnum = drow[0].ToString(); |
| | | tbnum = drow[1].ToString(); |
| | | tbpos = drow[2].ToString(); |
| | | matnr = drow[3].ToString(); |
| | | //sqlWaitIn += " update cust_wait_check set io_status='Y' where lgnum='" + lgnum + "' and ivnum=" + tbnum + " and ivpos=" + tbpos + ";"; |
| | | } |
| | | sqlWaitIn += " update cust_wait_check set io_status='Y' where lgpla='" + ls_loc_no + "';"; |
| | | ///更新库存信息,插入库存明细档,并更新库存主档 |
| | | sql = " update asr_loc_mast set loc_sts='F',io_time='" + ldt_date + "',modi_time='" + ldt_date + "',barcode='" + ls_barcode + "'"; |
| | | sql += " where loc_no='" + ls_loc_no + "' and loc_sts = 'Q';"; |
| | | sql += sqlDetl; |
| | | sql += sqlWaitIn; |
| | | |
| | | SqlCommand cmd_57 = new SqlCommand(sql, sqlconn); |
| | | cmd_57.Transaction = sqltrans; |
| | | try |
| | | { |
| | | cmd_57.ExecuteNonQuery(); |
| | | } |
| | | catch (SqlException t) |
| | | { |
| | | sqltrans.Rollback(); |
| | | cmd_57.Dispose(); |
| | | sqlconn.Dispose(); |
| | | ls_error_memo = " " + seq + ".11 盘点再入库-更新库存异常 [asr_loc_mast] !工作号:" + li_wrk_no.ToString() + " 库位号:" + ls_loc_no + " !" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | break; |
| | | #endregion |
| | | #region 库位移转 |
| | | case 11: |
| | | sql = ""; |
| | | string ls_loc_sts = ""; |
| | | if (ls_empty_mk == "N") |
| | | { |
| | | ls_loc_sts = "F"; |
| | | sql += "Update dbo.asr_loc_detl set loc_no='" + ls_loc_no + "',modi_time='" + ldt_date + "' where loc_no='" + ls_source_loc_no + "';"; |
| | | } |
| | | else |
| | | { |
| | | ls_loc_sts = "D"; |
| | | } |
| | | |
| | | sql += " Update dbo.asr_loc_mast set loc_sts='O',barcode='',io_time='" + ldt_date + "' where loc_no='" + ls_source_loc_no + "'; "; |
| | | sql += " Update dbo.asr_loc_mast set loc_sts='" + ls_loc_sts + "',barcode='" + ls_barcode + "',io_time='" + ldt_date + "' where loc_no='" + ls_loc_no + "';"; |
| | | sql += " update cust_wait_pakout set io_status='Y' where vlpla='" + ls_source_loc_no + "' and nlpla='" + ls_loc_no + "'"; |
| | | SqlCommand cmd_11 = new SqlCommand(sql, sqlconn); |
| | | cmd_11.Transaction = sqltrans; |
| | | try |
| | | { |
| | | cmd_11.ExecuteNonQuery(); |
| | | } |
| | | catch (SqlException t) |
| | | { |
| | | sqltrans.Rollback(); |
| | | cmd_11.Dispose(); |
| | | sqlconn.Dispose(); |
| | | ls_error_memo = " " + seq + ".12 库位移转-更新库存异常 [asr_loc_mast] !工作号:" + li_wrk_no.ToString() + " 库位号:" + ls_loc_no + " !" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | |
| | | break; |
| | | #endregion |
| | | } |
| | | |
| | | sql = "update asr_wrk_mast set wrk_sts=5,modi_time='" + ldt_date + "' where wrk_no=" + li_wrk_no + "; "; |
| | | SqlCommand cmd_wrk = new SqlCommand(sql, sqlconn); |
| | | cmd_wrk.Transaction = sqltrans; |
| | | try |
| | | { |
| | | cmd_wrk.ExecuteNonQuery(); |
| | | } |
| | | catch (SqlException t) |
| | | { |
| | | sqltrans.Rollback(); |
| | | cmd_wrk.Dispose(); |
| | | sqlconn.Dispose(); |
| | | ls_error_memo = " " + seq + ".13 更新工作状态异常 [asr_wrk_mast] !工作号:" + li_wrk_no.ToString() + " 时间:" + ldt_date.ToString() + " 异常:" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | } |
| | | else if (li_wrk_sts == 14) |
| | | { |
| | | switch (li_io_type) |
| | | { |
| | | #region 全板出库 |
| | | case 101: |
| | | ///根据工作号,查询工作明细档物料编码 |
| | | string sqlWaitIn = ""; |
| | | sql = "select lgnum,tbnum,tbpos,matnr from asr_wrk_detl where wrk_no=" + li_wrk_no; |
| | | DataView dv_wrkdetl = Common.ExecAsrsSelect(sql); |
| | | if (dv_wrkdetl == null || dv_wrkdetl.Count < 1) |
| | | { |
| | | DisplayInfo("", "E", " " + seq + ".14 工作明细档 [asr_wrk_detl] 没有资料!"); |
| | | goto re; |
| | | } |
| | | foreach (DataRowView drow in dv_wrkdetl) |
| | | { |
| | | string lgnum = drow[0].ToString(); |
| | | string tbnum = drow[1].ToString(); |
| | | string tbpos = drow[2].ToString(); |
| | | string matnr = drow[3].ToString(); |
| | | sqlWaitIn += " update cust_wait_pakout set io_status='Y' where lgnum='" + lgnum + "' and tanum=" + tbnum + " and tapos=" + tbpos + " and vlpla=" + ls_source_loc_no + ";"; |
| | | } |
| | | |
| | | sql = "delete from asr_loc_detl where loc_no ='" + ls_source_loc_no + "';"; |
| | | sql += " update asr_loc_mast set loc_sts='O',io_time='" + ldt_date + "',barcode=null"; |
| | | sql += " where loc_no='" + ls_source_loc_no + "' and loc_sts = 'R';"; |
| | | sql += sqlWaitIn; |
| | | SqlCommand cmd_101 = new SqlCommand(sql, sqlconn); |
| | | cmd_101.Transaction = sqltrans; |
| | | try |
| | | { |
| | | cmd_101.ExecuteNonQuery(); |
| | | } |
| | | catch (SqlException t) |
| | | { |
| | | sqltrans.Rollback(); |
| | | cmd_101.Dispose(); |
| | | sqlconn.Dispose(); |
| | | ls_error_memo = " " + seq + ".15 出库-更新库位状态异常[asr_loc_mast] !库位号:" + ls_source_loc_no + " 异常:" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | break; |
| | | #endregion |
| | | #region 空板出库 |
| | | case 110: |
| | | sql = "update asr_loc_mast set loc_sts='O',io_time='" + ldt_date + "'"; |
| | | sql += " where loc_no='" + ls_source_loc_no + "' and loc_sts = 'R'"; |
| | | SqlCommand cmd_110 = new SqlCommand(sql, sqlconn); |
| | | cmd_110.Transaction = sqltrans; |
| | | try |
| | | { |
| | | cmd_110.ExecuteNonQuery(); |
| | | } |
| | | catch (SqlException t) |
| | | { |
| | | sqltrans.Rollback(); |
| | | cmd_110.Dispose(); |
| | | sqlconn.Dispose(); |
| | | ls_error_memo = " " + seq + ".16 出库-更新库位状态异常[asr_loc_mast] !库位号:" + ls_source_loc_no + " 异常:" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | break; |
| | | #endregion |
| | | } |
| | | |
| | | sql = "update asr_wrk_mast set wrk_sts=15,modi_time='" + ldt_date + "' where wrk_no=" + li_wrk_no + "; "; |
| | | SqlCommand cmd_wrk1 = new SqlCommand(sql, sqlconn); |
| | | cmd_wrk1.Transaction = sqltrans; |
| | | try |
| | | { |
| | | cmd_wrk1.ExecuteNonQuery(); |
| | | } |
| | | catch (SqlException t) |
| | | { |
| | | sqltrans.Rollback(); |
| | | cmd_wrk1.Dispose(); |
| | | sqltrans.Dispose(); |
| | | ls_error_memo = " " + seq + ".17 更新工作状态异常 [asr_wrk_mast] !工作号:" + li_wrk_no.ToString() + " 异常:" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | goto re; |
| | | } |
| | | } |
| | | sqltrans.Commit(); |
| | | sqlconn.Dispose(); |
| | | } |
| | | } |
| | | catch (SqlException t) |
| | | { |
| | | ls_error_memo = " " + seq + ".18 处理工作档数据失败! 异常:" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | } |
| | | |
| | | re: |
| | | if (ls_error_memo != "") |
| | | { |
| | | try |
| | | { |
| | | bool bl = Common.ExecAsrsModify("update dbo.asr_wrk_mast set upd_mk ='X',error_time='" + ldt_date + "',error_memo='" + ls_error_memo + "' where wrk_no =" + li_wrk_no + ""); |
| | | } |
| | | catch (SqlException t) |
| | | { |
| | | ls_error_memo = " " + seq + ".19 更新工作主档状态 [asr_wrk_mast] 异常! 工作号:" + li_wrk_no.ToString() + " 时间:" + ldt_date.ToString(); |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | return; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 处理工作档中工作状态为5和15的资料,转历史档 |
| | | /// </summary> |
| | | public void ProcWorkToLog(string seq) |
| | | { |
| | | string ls_error_memo = ""; |
| | | DisplayInfo(seq, "N", "--处理工作档转历史档......"); |
| | | int wrkno = 0; |
| | | try |
| | | { |
| | | string sql = "select top 1 wrk_no from asr_wrk_mast where wrk_sts=5 ";// or wrk_sts=15 or (wrk_sts=15 and io_type=110) "; |
| | | sql += " or (wrk_sts=15 and ove_mk='Y' and wrk_no not in (select wrk_no from asr_bas_devp))"; |
| | | sql += " or (wrk_sts=15 and dateadd(mi,15,crn_end_time) <= getdate() and wrk_no not in (select wrk_no from asr_bas_devp))"; |
| | | sql += " or (wrk_sts=15 and crn_end_time is null and wrk_no not in (select wrk_no from asr_bas_devp)) "; |
| | | //sql += " or (wrk_sts=15 and dateadd(day,1,io_time) <= getdate() and crn_end_time is null) "; |
| | | //sql += " or (wrk_sts=15 and dateadd(hh,1,crn_end_time) <= getdate()) "; |
| | | //sql += " or (wrk_sts=15 and wrk_no not in (select wrk_no from asr_bas_devp))"; |
| | | sql += " order by io_time,wrk_no asc"; |
| | | DataView dv = Common.ExecAsrsSelect(sql); |
| | | if (dv.Count <= 0) |
| | | { |
| | | DisplayInfo("", "N", " " + seq + ".1 工作档 [asr_wrk_mast] 没有资料处理!"); |
| | | return; |
| | | } |
| | | foreach (DataRowView drow in dv) |
| | | { |
| | | wrkno = int.Parse(drow[0].ToString()); |
| | | } |
| | | DisplayInfo("", "P", " " + seq + ".2 正在处理转历史档" + wrkno); |
| | | |
| | | sql = "insert into asr_wrk_mast_log select * from asr_wrk_mast where wrk_no=" + wrkno + "; "; |
| | | //sql += " and wrk_no not in (select wrk_no from dbo.asr_bas_devp) "; |
| | | //sql += " and wrk_no not in (select wrk_no from dbo.asr_bas_crnp);"; |
| | | sql += " delete from asr_wrk_mast where wrk_no=" + wrkno + "; "; |
| | | sql += " insert into asr_wrk_detl_log select * from asr_wrk_detl where wrk_no=" + wrkno + "; "; |
| | | sql += " delete from asr_wrk_detl where wrk_no=" + wrkno + "; "; |
| | | //sql += " update asr_wrk_mast set wrk_sts=16 where wrk_sts=15 and dateadd(day,1,io_time) <= getdate();"; |
| | | //sql += " and wrk_no not in (select wrk_no from dbo.asr_bas_devp) "; |
| | | //sql += " and wrk_no not in (select wrk_no from dbo.asr_bas_crnp);"; |
| | | |
| | | SqlConnection sqlconn = new SqlConnection(Common.sqlcon); |
| | | sqlconn.Open(); |
| | | SqlTransaction sqltrans = sqlconn.BeginTransaction(); |
| | | SqlCommand sqlcmd = new SqlCommand(); |
| | | sqlcmd.Transaction = sqltrans; |
| | | string[] arraySql = sql.Split(';'); |
| | | try |
| | | { |
| | | for (int i = 0; i < arraySql.Length; i++) |
| | | { |
| | | if (arraySql[i] != "") |
| | | { |
| | | sqlcmd.CommandText = arraySql[i]; |
| | | sqlcmd.Connection = sqlconn; |
| | | sqlcmd.Transaction = sqltrans; |
| | | int result = sqlcmd.ExecuteNonQuery(); |
| | | } |
| | | } |
| | | sqltrans.Commit(); |
| | | } |
| | | catch (SqlException t) |
| | | { |
| | | sqltrans.Rollback(); |
| | | ls_error_memo = " " + seq + ".3 工作档[asr_wrk_mast]转历史档错误 ! 异常:" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | } |
| | | finally |
| | | { |
| | | sqlcmd.Dispose(); |
| | | sqltrans.Dispose(); |
| | | sqlconn.Dispose(); |
| | | } |
| | | return; |
| | | } |
| | | catch (Exception t) |
| | | { |
| | | ls_error_memo = " " + seq + ".4 处理工作档转历史档失败! 异常:" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 处理堆垛机、输送机命令,转历史档 |
| | | /// </summary> |
| | | public void ProcDevCommandToLog(string seq) |
| | | { |
| | | string ls_error_memo = ""; |
| | | DisplayInfo(seq, "N", "--处理堆垛机&PLC命令转历史档......"); |
| | | try |
| | | { |
| | | string sql = "insert into asr_stk_hplc "; |
| | | sql += " select * from asr_stk_plcm where dateadd(day,7,appe_time) <= getdate();"; |
| | | sql += " delete from asr_stk_plcm where dateadd(day,7,appe_time) <= getdate();"; |
| | | SqlConnection sqlconn = new SqlConnection(Common.sqlcon); |
| | | sqlconn.Open(); |
| | | SqlTransaction sqltrans = sqlconn.BeginTransaction(); |
| | | SqlCommand sqlcmd = new SqlCommand(); |
| | | sqlcmd.Transaction = sqltrans; |
| | | string[] arraySql = sql.Split(';'); |
| | | try |
| | | { |
| | | for (int i = 0; i < arraySql.Length; i++) |
| | | { |
| | | if (arraySql[i] != "") |
| | | { |
| | | sqlcmd.CommandText = arraySql[i]; |
| | | sqlcmd.Connection = sqlconn; |
| | | sqlcmd.Transaction = sqltrans; |
| | | int result = sqlcmd.ExecuteNonQuery(); |
| | | } |
| | | } |
| | | sqltrans.Commit(); |
| | | } |
| | | catch (SqlException t) |
| | | { |
| | | sqltrans.Rollback(); |
| | | //sqlcommon.Close(); |
| | | ls_error_memo = " " + seq + ".1 堆垛机&PLC命令转历史档错误 ! 异常:" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | } |
| | | finally |
| | | { |
| | | sqlcmd.Dispose(); |
| | | sqltrans.Dispose(); |
| | | sqlconn.Dispose(); |
| | | } |
| | | return; |
| | | } |
| | | catch (Exception t) |
| | | { |
| | | ls_error_memo = " " + seq + ".2 堆垛机&PLC命令转历史档失败! 异常:" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 转已完成物料信息到历史档 |
| | | /// </summary> |
| | | public void ProcMatCodeToLog(string seq) |
| | | { |
| | | string ls_error_memo = "", mat_no = ""; |
| | | DisplayInfo(seq, "N", "--处理已完成物料数据转历史档......"); |
| | | try |
| | | { |
| | | string condition = " and mat_no not in (select mat_no from asr_loc_detl) and mat_no not in (select mat_no from asr_wrk_detl) "; |
| | | //condition += " and mat_no not in (select mat_no from cust_wait_pakout) "; |
| | | string sql0 = " select top 1 mat_no from bas_mat_code where status>1 " + condition + " ;"; |
| | | DataView dv = Common.ExecAsrsSelect(sql0); |
| | | if (dv.Count <= 0) |
| | | { |
| | | DisplayInfo("", "N", " " + seq + ".1 物料档 [bas_mat_code] 没有资料处理!"); |
| | | return; |
| | | } |
| | | |
| | | foreach (DataRowView drow in dv) |
| | | { |
| | | mat_no = drow[0].ToString(); |
| | | } |
| | | |
| | | string sql = "delete from bas_mat_code_log where mat_no='" + mat_no + "';"; |
| | | sql += " insert into bas_mat_code_log "; |
| | | sql += " select * from bas_mat_code where status>1 " + condition + " ;"; |
| | | sql += " delete from bas_mat_code where status>1 " + condition + " ;"; |
| | | sql += " delete from bas_mat_code where status=0 and dateadd(hh,2,modi_time) <= getdate() " + condition + " ;"; |
| | | |
| | | SqlConnection sqlconn = new SqlConnection(Common.sqlcon); |
| | | sqlconn.Open(); |
| | | SqlTransaction sqltrans = sqlconn.BeginTransaction(); |
| | | SqlCommand sqlcmd = new SqlCommand(); |
| | | sqlcmd.Transaction = sqltrans; |
| | | string[] arraySql = sql.Split(';'); |
| | | try |
| | | { |
| | | for (int i = 0; i < arraySql.Length; i++) |
| | | { |
| | | if (arraySql[i] != "") |
| | | { |
| | | sqlcmd.CommandText = arraySql[i]; |
| | | sqlcmd.Connection = sqlconn; |
| | | sqlcmd.Transaction = sqltrans; |
| | | int result = sqlcmd.ExecuteNonQuery(); |
| | | } |
| | | } |
| | | sqltrans.Commit(); |
| | | } |
| | | catch (SqlException t) |
| | | { |
| | | sqltrans.Rollback(); |
| | | //sqlcommon.Close(); |
| | | ls_error_memo = " " + seq + ".1 已完成物料数据转历史档错误 ! 异常:" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | } |
| | | finally |
| | | { |
| | | sqlcmd.Dispose(); |
| | | sqlconn.Dispose(); |
| | | } |
| | | return; |
| | | } |
| | | catch (Exception t) |
| | | { |
| | | ls_error_memo = " " + seq + ".2 已完成物料数据转历史档失败! 异常:" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 转已完成待出库档信息到历史档 |
| | | /// </summary> |
| | | public void ProcWaitOutToLog(string seq) |
| | | { |
| | | string ls_error_memo = "", sql = ""; |
| | | DisplayInfo(seq, "N", "--处理已完成入/出库档数据转历史档......"); |
| | | try |
| | | { |
| | | string sql0 = " select lgnum,tbnum,tbpos from cust_wait_pakin where io_status='F';"; |
| | | DataView dv = Common.ExecAsrsSelect(sql0); |
| | | if (dv == null || dv.Count <= 0) |
| | | { |
| | | DisplayInfo("", "N", " " + seq + ".1 入库档 [cust_wait_pakin] 没有资料处理!"); |
| | | } |
| | | else |
| | | { |
| | | foreach (DataRowView drow in dv) |
| | | { |
| | | string lgnum = drow[0].ToString(); |
| | | string tanum = drow[1].ToString(); |
| | | string tapos = drow[2].ToString(); |
| | | sql = "insert into cust_wait_pakin_log "; |
| | | sql += " select * from cust_wait_pakin where lgnum='" + lgnum + "' and tbnum=" + tanum + " and tbpos=" + tapos + "; "; |
| | | sql += " delete from cust_wait_pakin where lgnum='" + lgnum + "' and tbnum=" + tanum + " and tbpos=" + tapos + "; "; |
| | | } |
| | | } |
| | | |
| | | sql0 = " select lgnum,tanum,tapos from cust_wait_pakout where io_status='F';"; |
| | | dv = Common.ExecAsrsSelect(sql0); |
| | | if (dv == null || dv.Count <= 0) |
| | | { |
| | | DisplayInfo("", "N", " " + seq + ".2 出库档 [cust_wait_pakout] 没有资料处理!"); |
| | | } |
| | | else |
| | | { |
| | | foreach (DataRowView drow in dv) |
| | | { |
| | | string lgnum = drow[0].ToString(); |
| | | string tanum = drow[1].ToString(); |
| | | string tapos = drow[2].ToString(); |
| | | sql = "insert into cust_wait_pakout_log "; |
| | | sql += " select * from cust_wait_pakout where lgnum='" + lgnum + "' and tanum=" + tanum + " and tapos=" + tapos + "; "; |
| | | sql += " delete from cust_wait_pakout where lgnum='" + lgnum + "' and tanum=" + tanum + " and tapos=" + tapos + "; "; |
| | | } |
| | | } |
| | | |
| | | sql0 = " select lgnum,ivnum,ivpos from cust_wait_check where io_status='Y';"; |
| | | dv = Common.ExecAsrsSelect(sql0); |
| | | if (dv == null || dv.Count <= 0) |
| | | { |
| | | DisplayInfo("", "N", " " + seq + ".3 盘点档 [cust_wait_check] 没有资料处理!"); |
| | | } |
| | | else |
| | | { |
| | | foreach (DataRowView drow in dv) |
| | | { |
| | | string lgnum = drow[0].ToString(); |
| | | string tanum = drow[1].ToString(); |
| | | string tapos = drow[2].ToString(); |
| | | sql = "insert into cust_wait_check_log "; |
| | | sql += " select * from cust_wait_check where lgnum='" + lgnum + "' and ivnum=" + tanum + " and ivpos=" + tapos + "; "; |
| | | sql += " delete from cust_wait_check where lgnum='" + lgnum + "' and ivnum=" + tanum + " and ivpos=" + tapos + "; "; |
| | | } |
| | | } |
| | | |
| | | if (sql == "") |
| | | { |
| | | return; |
| | | } |
| | | SqlConnection sqlconn1 = new SqlConnection(Common.sqlcon); |
| | | sqlconn1.Open(); |
| | | SqlTransaction sqltrans1 = sqlconn1.BeginTransaction(); |
| | | SqlCommand sqlcmd1 = new SqlCommand(); |
| | | sqlcmd1.Transaction = sqltrans1; |
| | | string[] arraySql1 = sql.Split(';'); |
| | | try |
| | | { |
| | | for (int i = 0; i < arraySql1.Length; i++) |
| | | { |
| | | if (arraySql1[i] != "") |
| | | { |
| | | sqlcmd1.CommandText = arraySql1[i]; |
| | | sqlcmd1.Connection = sqlconn1; |
| | | sqlcmd1.Transaction = sqltrans1; |
| | | int result = sqlcmd1.ExecuteNonQuery(); |
| | | } |
| | | } |
| | | sqltrans1.Commit(); |
| | | } |
| | | catch (SqlException t) |
| | | { |
| | | sqltrans1.Rollback(); |
| | | //sqlcommon.Close(); |
| | | ls_error_memo = " " + seq + ".1 已完成物料数据转历史档错误 ! 异常:" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | } |
| | | finally |
| | | { |
| | | sqlcmd1.Dispose(); |
| | | sqlconn1.Dispose(); |
| | | } |
| | | |
| | | return; |
| | | } |
| | | catch (Exception t) |
| | | { |
| | | ls_error_memo = " " + seq + ".2 已完成出库数据转历史档失败! 异常:" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除超过半年的历史档信息 |
| | | /// </summary> |
| | | public void ProcOverYearLog(string seq) |
| | | { |
| | | string ls_error_memo = ""; |
| | | DisplayInfo(seq, "N", "--处理超过半年历史档信息......"); |
| | | try |
| | | { |
| | | string sql = "delete from asr_stk_hplc where dateadd(day,180,appe_time) <= getdate(); "; |
| | | sql += " delete from sys_tts_mast where dateadd(day,180,modi_time) <= getdate();"; |
| | | sql += " delete from asr_wrk_detl_log where dateadd(day,360,appe_time) <= getdate();"; |
| | | sql += " delete from asr_wrk_mast_log where dateadd(day,360,appe_time) <= getdate();"; |
| | | sql += " delete from cust_wait_pakout_log where dateadd(day,360,appe_time) <= getdate();"; |
| | | sql += " delete from bas_mat_code_log where dateadd(day,360,appe_time) <= getdate();"; |
| | | SqlConnection sqlconn = new SqlConnection(Common.sqlcon); |
| | | sqlconn.Open(); |
| | | SqlTransaction sqltrans = sqlconn.BeginTransaction(); |
| | | SqlCommand sqlcmd = new SqlCommand(); |
| | | sqlcmd.Transaction = sqltrans; |
| | | string[] arraySql = sql.Split(';'); |
| | | try |
| | | { |
| | | for (int i = 0; i < arraySql.Length; i++) |
| | | { |
| | | if (arraySql[i] != "") |
| | | { |
| | | sqlcmd.CommandText = arraySql[i]; |
| | | sqlcmd.Connection = sqlconn; |
| | | sqlcmd.Transaction = sqltrans; |
| | | int result = sqlcmd.ExecuteNonQuery(); |
| | | } |
| | | } |
| | | sqltrans.Commit(); |
| | | } |
| | | catch (SqlException t) |
| | | { |
| | | sqltrans.Rollback(); |
| | | //sqlcommon.Close(); |
| | | ls_error_memo = " " + seq + ".1 堆垛机&PLC命令转历史档错误 ! 异常:" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | } |
| | | finally |
| | | { |
| | | sqlcmd.Dispose(); |
| | | sqltrans.Dispose(); |
| | | sqlconn.Dispose(); |
| | | } |
| | | return; |
| | | } |
| | | catch (Exception t) |
| | | { |
| | | ls_error_memo = " " + seq + ".2 堆垛机&PLC命令转历史档失败! 异常:" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 处理库存档中库位状态为D O但是有明细的数据,清空明细 |
| | | /// </summary> |
| | | private void ProcErrorStockData(string seq) |
| | | { |
| | | string ls_error_memo = ""; |
| | | string loc_no = "", mat_no = ""; |
| | | DisplayInfo(seq, "N", "--处理库存档中异常库存信息......"); |
| | | try |
| | | { |
| | | string sqlDetl = "delete from asr_loc_detl where anfme <= 0;"; |
| | | Common.ExecAsrsModify(sqlDetl); |
| | | |
| | | string sql = "SELECT a.loc_no,b.matnr FROM asr_loc_mast a,asr_loc_detl b where a.loc_no=b.loc_no "; |
| | | sql += " and (a.loc_sts='O' or a.loc_sts='D') "; |
| | | |
| | | DataView dv_stkDetl = Common.ExecAsrsSelect(sql); |
| | | if (dv_stkDetl == null || dv_stkDetl.Count < 1) |
| | | { |
| | | return; |
| | | } |
| | | foreach (DataRowView drow_stkDetl in dv_stkDetl) |
| | | { |
| | | loc_no = drow_stkDetl[0].ToString(); |
| | | mat_no = drow_stkDetl[1].ToString(); |
| | | string sql0 = " delete from asr_loc_detl where loc_no='" + loc_no + "'; "; |
| | | SqlConnection sqlconn = new SqlConnection(Common.sqlcon); |
| | | sqlconn.Open(); |
| | | SqlTransaction sqltrans = sqlconn.BeginTransaction(); |
| | | SqlCommand sqlcmd = new SqlCommand(); |
| | | sqlcmd.Transaction = sqltrans; |
| | | string[] arraySql = sql0.Split(';'); |
| | | try |
| | | { |
| | | for (int i = 0; i < arraySql.Length; i++) |
| | | { |
| | | if (arraySql[i] != "") |
| | | { |
| | | sqlcmd.CommandText = arraySql[i]; |
| | | sqlcmd.Connection = sqlconn; |
| | | sqlcmd.Transaction = sqltrans; |
| | | int result = sqlcmd.ExecuteNonQuery(); |
| | | } |
| | | } |
| | | sqltrans.Commit(); |
| | | } |
| | | catch (SqlException t) |
| | | { |
| | | sqltrans.Rollback(); |
| | | //sqlcommon.Close(); |
| | | ls_error_memo = " " + seq + ".1 处理库存档中异常库存信息错误 ! 异常:" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | } |
| | | finally |
| | | { |
| | | sqlcmd.Dispose(); |
| | | sqltrans.Dispose(); |
| | | sqlconn.Dispose(); |
| | | } |
| | | } |
| | | return; |
| | | } |
| | | catch (Exception t) |
| | | { |
| | | ls_error_memo = " " + seq + ".2 处理库存档中异常库存信息失败! 异常:" + t.Message; |
| | | DisplayInfo("", "E", ls_error_memo); |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// 回报主线程 |
| | | /// </summary> |
| | | private void ThreadTask() |
| | | { |
| | | DisplayInfo("", "N", "---------------系统运行中-------------"); |
| | | while (true) |
| | | { |
| | | try |
| | | { |
| | | //生成出库工作档 |
| | | ProcOutToWorkData("1"); |
| | | ProcLocToWorkData("11"); |
| | | |
| | | //处理工作档状态4、14、6的资料 |
| | | ProcWorkMast("2"); // done |
| | | |
| | | //工作档转历史档 // done |
| | | ProcWorkToLog("3"); |
| | | |
| | | //堆垛机&PLC命令转历史档 |
| | | ProcDevCommandToLog("4"); // done |
| | | |
| | | //转已完成物料信息到历史档 |
| | | //ProcMatCodeToLog("5"); |
| | | //转出库完成待出库档数据到历史档 |
| | | ProcCheckToWorkData("5"); |
| | | |
| | | //转出库完成待出库档数据到历史档 |
| | | ProcWaitOutToLog("6"); // done |
| | | |
| | | //删除超过半年历史档 |
| | | ProcOverYearLog("7"); // done |
| | | |
| | | ProcErrorStockData("8"); // done |
| | | |
| | | Thread.Sleep(3000); |
| | | } |
| | | catch (Exception em) |
| | | { |
| | | Common.WriteLogFile("WcsError", "UpdateThread/ThreadTask--回报主线程循环出错:" + em.Message); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | # password: xltys1995 |
| | | # sql-server |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=dlasrs |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=xtyasrs |
| | | username: sa |
| | | password: Qwe!@#123 |
| | | password: sa@123 |
| | | mvc: |
| | | static-path-pattern: /** |
| | | redis: |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.mapper.TrayCodeMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.TrayCode"> |
| | | <id column="id" property="id" /> |
| | | <result column="tray_no" property="trayNo" /> |
| | | <result column="start" property="start" /> |
| | | <result column="finish" property="finish" /> |
| | | <result column="memo" property="memo" /> |
| | | <result column="modi_time" property="modiTime" /> |
| | | <result column="modi_user" property="modiUser" /> |
| | | <result column="appe_time" property="appeTime" /> |
| | | <result column="appe_user" property="appeUser" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.mapper.WaitPakinLogMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.WaitPakinLog"> |
| | | <id column="id" property="id" /> |
| | | <result column="pakin_id" property="pakinId" /> |
| | | <result column="barcode" property="barcode" /> |
| | | <result column="matnr" property="matnr" /> |
| | | <result column="maktx" property="maktx" /> |
| | | <result column="anfme" property="anfme" /> |
| | | <result column="unit" property="unit" /> |
| | | <result column="status" property="status" /> |
| | | <result column="memo" property="memo" /> |
| | | <result column="modi_time" property="modiTime" /> |
| | | <result column="modi_user" property="modiUser" /> |
| | | <result column="appe_time" property="appeTime" /> |
| | | <result column="appe_user" property="appeUser" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.mapper.WaitPakinMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.WaitPakin"> |
| | | <id column="id" property="id" /> |
| | | <result column="barcode" property="barcode" /> |
| | | <result column="matnr" property="matnr" /> |
| | | <result column="maktx" property="maktx" /> |
| | | <result column="anfme" property="anfme" /> |
| | | <result column="unit" property="unit" /> |
| | | <result column="status" property="status" /> |
| | | <result column="memo" property="memo" /> |
| | | <result column="modi_time" property="modiTime" /> |
| | | <result column="modi_user" property="modiUser" /> |
| | | <result column="appe_time" property="appeTime" /> |
| | | <result column="appe_user" property="appeUser" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.mapper.WrkDetlLogMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.WrkDetlLog"> |
| | | <result column="wrk_no" property="wrkNo" /> |
| | | <result column="io_time" property="ioTime" /> |
| | | <result column="matnr" property="matnr" /> |
| | | <result column="lgnum" property="lgnum" /> |
| | | <result column="tbnum" property="tbnum" /> |
| | | <result column="tbpos" property="tbpos" /> |
| | | <result column="zmatid" property="zmatid" /> |
| | | <result column="maktx" property="maktx" /> |
| | | <result column="werks" property="werks" /> |
| | | <result column="anfme" property="anfme" /> |
| | | <result column="altme" property="altme" /> |
| | | <result column="zpallet" property="zpallet" /> |
| | | <result column="bname" property="bname" /> |
| | | <result column="memo" property="memo" /> |
| | | <result column="modi_user" property="modiUser" /> |
| | | <result column="modi_time" property="modiTime" /> |
| | | <result column="appe_user" property="appeUser" /> |
| | | <result column="appe_time" property="appeTime" /> |
| | | <result column="nista" property="nista" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | </resultMap> |
| | | |
| | | <select id="selectToBeCompleteData" resultMap="BaseResultMap"> |
| | | select * from asr_wrk_mast where ((wrk_sts = 4 Or wrk_sts = 14 ) and io_type != 103 and io_type != 104 and io_type != 107 ) or (wrk_sts = 2 and io_type=6) order by upd_mk,io_time,wrk_no |
| | | </select> |
| | | |
| | | <select id="selectToBeHistoryData" resultMap="BaseResultMap"> |
| | | select * from asr_wrk_mast |
| | | where wrk_sts=5 |
| | | or (wrk_sts=15 and ove_mk='Y' and wrk_no not in (select wrk_no from asr_bas_devp)) |
| | | or (wrk_sts=15 and dateadd(mi,15,crn_end_time) <= getdate() and wrk_no not in (select wrk_no from asr_bas_devp)) |
| | | or (wrk_sts=15 and crn_end_time is null and wrk_no not in (select wrk_no from asr_bas_devp)) |
| | | order by io_time,wrk_no asc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | body { |
| | | background-color: #fff; |
| | | } |
| | | |
| | | input::placeholder { |
| | | color: #b4b4b4; |
| | | } |
| | | input::-webkit-input-placeholder { /* WebKit browsers 适配谷歌 */ |
| | | color: #b4b4b4; |
| | | } |
| | | .layui-input input:-moz-placeholder { /* Mozilla Firefox 4 to 18 适配火狐 */ |
| | | color: #b4b4b4; |
| | | } |
| | | .layui-input input::-moz-placeholder { /* Mozilla Firefox 19+ 适配火狐 */ |
| | | color: #b4b4b4; |
| | | } |
| | | .layui-input input:-ms-input-placeholder { /* Internet Explorer 10+ 适配ie*/ |
| | | color: #b4b4b4; |
| | | } |
| | | |
| | | /* layui优化 */ |
| | | .layui-form-label { |
| | | /*color: #595959;*/ |
| | | } |
| | | .layui-input:focus { |
| | | border-color: #007bff !important; |
| | | } |
| | | /*搜索栏*/ |
| | | .layui-form.layui-card-header { |
| | | padding: 20px 0 5px 0; |
| | |
| | | #data-search-btn.layui-btn-container .layui-btn{ |
| | | margin-right: 20px; |
| | | } |
| | | |
| | | |
| | | /*头工具栏*/ |
| | | .layui-table-tool-temp { |
| | |
| | | height: 200px; |
| | | } |
| | | |
| | | |
| | | |
| | | /* |
| | | 布局 |
| | | */ |
| | |
| | | .col{ |
| | | height: inherit; |
| | | } |
| | | |
| | | |
| | | /*权限*/ |
| | | #btn-add { |
| | |
| | | } |
| | | |
| | | .cool-auto-complete-window-input { |
| | | |
| | | height: 28px; |
| | | box-sizing: border-box; |
| | | border: 1px solid #dedede; |
| | | |
| | | width: 100%; |
| | | } |
| | | |
| | | .cool-auto-complete-window-input:focus { |
| | | border-color: #007bff !important; |
| | | } |
| | | .cool-auto-complete-window-select { |
| | | width: 100%; |
| | | border: 1px solid #dedede; |
| New file |
| | |
| | | * { |
| | | font-family: microsoft yahei,serif; |
| | | margin: 0; |
| | | padding: 0; |
| | | box-sizing: border-box; |
| | | -webkit-box-sizing: border-box; |
| | | -moz-box-sizing: border-box; |
| | | font-size: 11px; |
| | | } |
| | | html { |
| | | height: 100%; |
| | | background-color: #f1f1f1; |
| | | padding: 5px; |
| | | } |
| | | body { |
| | | height: 100%; |
| | | background-color: #fff; |
| | | border-radius: 5px; |
| | | box-shadow: 0 0 3px rgba(0,0,0,.3); |
| | | padding: 5px; |
| | | position: relative; |
| | | } |
| | | |
| | | /* 头部 */ |
| | | header { |
| | | padding: 5px 0; |
| | | } |
| | | .layui-form-label { |
| | | width: initial; |
| | | padding: 6px 10px; |
| | | } |
| | | #code { |
| | | width: 75%; |
| | | height: 30px; |
| | | margin-right: 0; |
| | | } |
| | | header button { |
| | | height: 20px; |
| | | width: 70px; |
| | | } |
| | | |
| | | /* layer */ |
| | | .layui-layer-title { |
| | | font-size: 11px; |
| | | height: 20px; |
| | | line-height: 20px; |
| | | } |
| | | |
| | | /* 主体 */ |
| | | main { |
| | | height: 170px; |
| | | overflow: auto; |
| | | } |
| | | .layui-table, .layui-table-view { |
| | | margin: 0; |
| | | } |
| | | .layui-table-view .layui-table td, .layui-table-view .layui-table th { |
| | | padding: 0; |
| | | } |
| | | .layui-table-cell { |
| | | height: 22px; |
| | | line-height: 22px; |
| | | padding: 0; |
| | | } |
| | | .layui-table-grid-down { |
| | | display: none; |
| | | } |
| | | .layui-table-body .layui-none { |
| | | /*height: 144px;*/ |
| | | } |
| | | /* 尾部 */ |
| | | footer { |
| | | position: absolute; |
| | | bottom: 5px; |
| | | width: 100%; |
| | | } |
| | | .layui-btn-container .layui-btn { |
| | | margin-left: 10px; |
| | | margin-bottom: 2px; |
| | | } |
| | | #tips { |
| | | display: inline-block; |
| | | width: 90px; |
| | | color: #666; |
| | | margin-left: 5px; |
| | | margin-bottom: 5px; |
| | | vertical-align: middle; |
| | | overflow:hidden; |
| | | white-space:nowrap; |
| | | text-overflow:ellipsis; |
| | | } |
| | | |
| | | .layui-btn-primary:hover { |
| | | border-color: #C9C9C9 |
| | | } |
| New file |
| | |
| | | @media print { |
| | | @page { |
| | | /*A4: 210mm × 297mm,size: 794px × 1123px,0边距*/ |
| | | /*171.9mm × 258.9mm,size:649px × 978px,19.05mm边距(ie浏览器默认打印边距) */ |
| | | margin: 0.3cm |
| | | } |
| | | } |
| | |
| | | // ,{field: 'adjCtns', align: 'center',title: '变更箱数'} |
| | | ,{field: 'adjQty', align: 'center',title: '变更数量'} |
| | | // ,{field: 'adjWt', align: 'center',title: '变更重量'} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | ,{field: 'memo', align: 'center',title: '备注',hide:true} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员'} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间'} |
| | | // ,{field: 'appeUser', align: 'center',title: '创建者'} |
| | | // ,{field: 'appeTime$', align: 'center',title: '添加时间'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:100} |
| | | // ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:100} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| New file |
| | |
| | | var pageCurr; |
| | | var wrkNo; |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#wrkMast', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/wrkMast/list/auth', |
| | | page: true, |
| | | where: {upd_mk : 'X'}, |
| | | limit: 50, |
| | | limits: [50, 100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'wrkNo', align: 'center',title: '工作号',sort: true} |
| | | ,{field: 'ioTime$', align: 'center',title: '工作时间',sort: true, hide:true} |
| | | ,{field: 'wrkSts$', align: 'center',title: '工作状态'} |
| | | ,{field: 'ioType$', align: 'center',title: '入出库类型'} |
| | | ,{field: 'crnNo$', align: 'center',title: '堆垛机', hide:true} |
| | | ,{field: 'sourceStaNo$', align: 'center',title: '源站', hide:true} |
| | | ,{field: 'staNo$', align: 'center',title: '目标站', hide:true} |
| | | ,{field: 'sourceLocNo$', align: 'center',title: '源库位', hide:true} |
| | | ,{field: 'locNo$', align: 'center',title: '目标库位', hide:true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide:true} |
| | | ,{field: 'updMk', align: 'center',title: '异常标记'} |
| | | ,{field: 'errorTime$', align: 'center',title: '异常记录时间'} |
| | | ,{field: 'errorMemo', align: 'center',title: '异常内容'} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员', hide:true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:true} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | // 每秒刷新 |
| | | setInterval(function () { |
| | | $(".layui-laypage-btn")[0].click(); |
| | | }, 1000); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(wrkMast)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: 1 |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(wrkMast)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | case 'exportData': |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'wrkMast': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkMast/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(wrkMast)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | // 明细展示 todo |
| | | case 'detlShow': |
| | | wrkNo = data.wrkNo; |
| | | // 表格下方显示 |
| | | // locDetl(data.wrkNo); |
| | | // 弹层显示 |
| | | layer.open({ |
| | | type: 2, |
| | | title: '工作档明细', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: 'wrkDetl.html', |
| | | success: function(layero, index){ |
| | | } |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 数据保存动作 |
| | | form.on('submit(save)', function () { |
| | | if (banMsg != null){ |
| | | layer.msg(banMsg); |
| | | return; |
| | | } |
| | | method("add"); |
| | | }); |
| | | |
| | | // 数据修改动作 |
| | | form.on('submit(edit)', function () { |
| | | method("update") |
| | | }); |
| | | |
| | | function method(name){ |
| | | var index = layer.load(1, { |
| | | shade: [0.5,'#000'] //0.1透明度的背景 |
| | | }); |
| | | var data = { |
| | | wrkNo: $('#wrkNo').val(), |
| | | invWh: $('#invWh').val(), |
| | | ymd: top.strToDate($('#ymd\\$').val()), |
| | | mk: $('#mk').val(), |
| | | whsType: $('#whsType').val(), |
| | | wrkSts: $('#wrkSts').val(), |
| | | ioType: $('#ioType').val(), |
| | | crnNo: $('#crnNo').val(), |
| | | sheetNo: $('#sheetNo').val(), |
| | | ioPri: $('#ioPri').val(), |
| | | wrkDate: top.strToDate($('#wrkDate\\$').val()), |
| | | locNo: $('#locNo').val(), |
| | | staNo: $('#staNo').val(), |
| | | sourceStaNo: $('#sourceStaNo').val(), |
| | | sourceLocNo: $('#sourceLocNo').val(), |
| | | locSts: $('#locSts').val(), |
| | | picking: $('#picking').val(), |
| | | linkMis: $('#linkMis').val(), |
| | | onlineYn: $('#onlineYn').val(), |
| | | updMk: $('#updMk').val(), |
| | | exitMk: $('#exitMk').val(), |
| | | pltType: $('#pltType').val(), |
| | | emptyMk: $('#emptyMk').val(), |
| | | ioTime: top.strToDate($('#ioTime\\$').val()), |
| | | ctnType: $('#ctnType').val(), |
| | | packed: $('#packed').val(), |
| | | oveMk: $('#oveMk').val(), |
| | | mtnType: $('#mtnType').val(), |
| | | userNo: $('#userNo').val(), |
| | | crnStrTime: top.strToDate($('#crnStrTime\\$').val()), |
| | | crnEndTime: top.strToDate($('#crnEndTime\\$').val()), |
| | | plcStrTime: top.strToDate($('#plcStrTime\\$').val()), |
| | | crnPosTime: top.strToDate($('#crnPosTime\\$').val()), |
| | | loadTime: $('#loadTime').val(), |
| | | expTime: $('#expTime').val(), |
| | | refWrkno: $('#refWrkno').val(), |
| | | refIotime: top.strToDate($('#refIotime\\$').val()), |
| | | modiUser: $('#modiUser').val(), |
| | | modiTime: top.strToDate($('#modiTime\\$').val()), |
| | | appeUser: $('#appeUser').val(), |
| | | appeTime: top.strToDate($('#appeTime\\$').val()), |
| | | pauseMk: $('#pauseMk').val(), |
| | | errorTime: top.strToDate($('#errorTime\\$').val()), |
| | | errorMemo: $('#errorMemo').val(), |
| | | ctnKind: $('#ctnKind').val(), |
| | | manuType: $('#manuType').val(), |
| | | memo: $('#memo').val(), |
| | | scWeight: $('#scWeight').val(), |
| | | logMk: $('#logMk').val(), |
| | | logErrTime: top.strToDate($('#logErrTime\\$').val()), |
| | | logErrMemo: $('#logErrMemo').val(), |
| | | barcode: $('#barcode').val(), |
| | | PdcType: $('#PdcType').val(), |
| | | ctnNo: $('#ctnNo').val(), |
| | | fullPlt: $('#fullPlt').val(), |
| | | |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkMast/"+name+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: top.reObject(data), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | parent.layer.closeAll(); |
| | | parent.$(".layui-laypage-btn")[0].click(); |
| | | $("#data-detail :input").each(function () { |
| | | $(this).val(""); |
| | | }); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | layer.close(index); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 复选框事件 |
| | | form.on('checkbox(detailCheckbox)', function (data) { |
| | | var el = data.elem; |
| | | if (el.checked) { |
| | | $(el).val('Y'); |
| | | } else { |
| | | $(el).val('N'); |
| | | } |
| | | }); |
| | | |
| | | // 搜索栏搜索事件 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | $('#detlTable').css("display", 'none'); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 搜索栏重置事件 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | $('#detlTable').css("display", 'none'); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | layDate.render({ |
| | | elem: '#ymd\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#wrkDate\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#ioTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#crnStrTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#crnEndTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#plcStrTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#crnPosTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#refIotime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#modiTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#appeTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#errorTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#logErrTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | |
| | | var pageCur; |
| | | function locDetl(param){ |
| | | $('#detlTable').css("display", 'block'); |
| | | // 数据渲染 |
| | | $('#wrkNo').val(param); |
| | | // 数据渲染 |
| | | tableIns1 = table.render({ |
| | | elem: '#wrkDetlByMap', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/wrkDetl/list/auth', |
| | | where: {wrk_no: param}, |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'wrkNo', align: 'center',title: '工作号'} |
| | | ,{field: 'ioTime$', align: 'center',title: '工作时间'} |
| | | ,{field: 'matnr', align: 'center',title: '物料'} |
| | | ,{field: 'lgnum', align: 'center',title: '仓库号'} |
| | | ,{field: 'tbnum', align: 'center',title: '转储请求编号'} |
| | | ,{field: 'tbpos', align: 'center',title: '行项目'} |
| | | ,{field: 'zmatid', align: 'center',title: '物料标签ID'} |
| | | ,{field: 'maktx', align: 'center',title: '物料描述'} |
| | | ,{field: 'werks', align: 'center',title: '工厂'} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'altme', align: 'center',title: '单位'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码'} |
| | | ,{field: 'bname', align: 'center',title: '用户ID'} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:50} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCur=curr; |
| | | 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'; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | (child ? parent.tableIns : tableIns).reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | if (res.data.length === 0 && count !== 0) { |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr-1 |
| | | } |
| | | }); |
| | | pageCurr -= 1; |
| | | } |
| | | limit(child); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function setFormVal(el, data, showImg) { |
| | | for (var val in data) { |
| | | var find = el.find(":input[id='" + val + "']"); |
| | | if (find[0]!=null){ |
| | | if (find[0].type === 'checkbox'){ |
| | | if (data[val]==='Y'){ |
| | | find.attr("checked","checked"); |
| | | find.val('Y'); |
| | | } else { |
| | | find.remove("checked"); |
| | | find.val('N'); |
| | | } |
| | | continue; |
| | | } |
| | | } |
| | | find.val(data[val]); |
| | | if (showImg){ |
| | | var next = find.next(); |
| | | if (next.get(0)){ |
| | | if (next.get(0).localName === "img") { |
| | | find.hide(); |
| | | next.attr("src", data[val]); |
| | | next.show(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | function clearFormVal(el) { |
| | | $(':input', el) |
| | | .val('') |
| | | .removeAttr('checked') |
| | | .removeAttr('selected'); |
| | | } |
| | | |
| | | function detailScreen(index) { |
| | | var detail = layer.getChildFrame('#data-detail', index); |
| | | var height = detail.height()+60; |
| | | if (height > ($(window).height()*0.9)) { |
| | | height = ($(window).height()*0.8); |
| | | } |
| | | layer.style(index, { |
| | | // top: (($(window).height()-height)/3)+"px", |
| | | height: height+'px' |
| | | }); |
| | | } |
| | | |
| | | $('body').keydown(function () { |
| | | if (event.keyCode === 13) { |
| | | $("#search").click(); |
| | | } |
| | | }); |
| | |
| | | } |
| | | }); |
| | | break; |
| | | // 编辑 |
| | | case 'edit': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '修改', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: 'matCode_detail.html', |
| | | success: function(layero, index){ |
| | | layer.getChildFrame('#data-detail-submit-save', index).hide(); |
| | | setFormVal(layer.getChildFrame('#detail', index), data, false); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false); |
| | | top.convertDisabled(layer.getChildFrame('#matNo', index), true); |
| | | 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'); |
| | | } |
| | | }); |
| | | break; |
| | | // 打印 |
| | | case "btnPrint": |
| | | printMatCodeNos = []; |
| | |
| | | form.on('submit(doPrint)', function (data) { |
| | | var templateNo = data.field.selectTemplate; |
| | | $.ajax({ |
| | | url: baseUrl+"/macCode/print/auth", |
| | | url: baseUrl+"/matCode/print/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {param: printMatCodeNos}, |
| | | method: 'POST', |
| | |
| | | var templateDom = $("#templatePreview"+templateNo); |
| | | var className = templateDom.attr("class"); |
| | | if (className === 'template-barcode') { |
| | | res.data[i]["barcodeUrl"]=baseUrl+"/macCode/code/auth?type=1¶m="+res.data[i].barcode; |
| | | res.data[i]["barcodeUrl"]=baseUrl+"/macCode/code/auth?type=1¶m="+res.data[i].matNo; |
| | | } else { |
| | | res.data[i]["barcodeUrl"]=baseUrl+"/macCode/code/auth?type=2¶m="+res.data[i].barcode; |
| | | res.data[i]["barcodeUrl"]=baseUrl+"/macCode/code/auth?type=2¶m="+res.data[i].matNo; |
| | | } |
| | | } |
| | | var tpl = templateDom.html(); |
| | | var template = Handlebars.compile(tpl); |
| | | var html = template(res); |
| | | let box = $("#box"); |
| | | box.html(html);box.show();box.print();box.hide(); |
| | | box.html(html);box.show(); |
| | | box.print({mediaPrint:true}); |
| | | box.hide(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'id', title: 'ID', sort: true,align: 'center', width: 80} |
| | | ,{field: 'action', align: 'center',title: '访问地址'} |
| | | // {type: 'checkbox'} |
| | | {field: 'id', title: 'ID', sort: true,align: 'center', width: 80} |
| | | ,{field: 'userId$', align: 'center',title: '用户'} |
| | | ,{field: 'action', align: 'center',title: '操作内容'} |
| | | ,{field: 'ip', align: 'center',title: '客户端IP'} |
| | | ,{field: 'request', align: 'center',title: '请求数据'} |
| | | ,{field: 'response', align: 'center',title: '响应数据'} |
| | | ,{field: 'createTime$', align: 'center',title: '添加时间'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150} |
| | | // ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:100} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | elem: '#createTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | }); |
| | | |
| | | // 关闭动作 |
| | |
| | | url: baseUrl+"/full/store/put/start", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify({ |
| | | devpNo: $('#putSiteSelect').val(), |
| | | devpNo: Number($('#putSiteSelect').val()), |
| | | list: matCodeData |
| | | }), |
| | | contentType:'application/json;charset=UTF-8', |
| | |
| | | ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80} |
| | | ,{field: 'code', align: 'center',title: '编码'} |
| | | ,{field: 'name', align: 'center',title: '名称'} |
| | | ,{field: 'leader$', align: 'center',title: '上级',event: 'leader', style: 'text-decoration: underline;cursor:pointer'} |
| | | ,{field: 'leader$', align: 'center',title: '上级'} |
| | | // ,{field: 'level$', align: 'center',title: '角色等级'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150} |
| | |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | parent.layer.closeAll(); |
| | | parent.layer.msg(res.msg); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| New file |
| | |
| | | var pageCurr; |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#trayCode', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/trayCode/list/auth', |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | // {type: 'checkbox'} |
| | | // ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80} |
| | | // ,{field: 'id', align: 'center',title: '编号'} |
| | | {field: 'trayNo', align: 'center',title: '序列号', sort: true} |
| | | ,{field: 'start', align: 'center',title: '起始', templet:function(row){ |
| | | var html = "<input value='start' type='checkbox' disabled='disabled' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | if(row.start === 'Y'){html += " checked ";} |
| | | html += ">"; |
| | | return html; |
| | | }} |
| | | ,{field: 'finish', align: 'center',title: '终止', templet:function(row){ |
| | | var html = "<input value='finish' type='checkbox' disabled='disabled' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | if(row.finish === 'Y'){html += " checked ";} |
| | | html += ">"; |
| | | return html; |
| | | }} |
| | | ,{field: 'memo', align: 'center',title: '备注', hide:true} |
| | | // ,{field: 'modiTime$', align: 'center',title: '修改时间'} |
| | | // ,{field: 'modiUser$', align: 'center',title: '修改人员',event: 'modiUser', style: 'cursor:pointer'} |
| | | ,{field: 'appeTime$', align: 'center',title: '添加时间', sort: true} |
| | | ,{field: 'appeUser$', align: 'center',title: '添加人员'} |
| | | |
| | | // ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | 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'; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(locMast)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: 1 |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(trayCode)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | // 生成托盘码 |
| | | case "btnTray": |
| | | layer.open({ |
| | | type: 1, |
| | | title: '生成托盘码', |
| | | offset: '100px', |
| | | area: ['360px'], |
| | | shade: 0.1, |
| | | content: $('#print-windows'), |
| | | success: function(layero, index){ |
| | | layer.iframeAuto(index) |
| | | http.post(baseUrl+"/trayCode/latest", null, function (res) { |
| | | $('#startNo').val(res.data); |
| | | }) |
| | | }, |
| | | }); |
| | | break; |
| | | case 'exportData': |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'trayCode': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/trayCode/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(trayCode)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | // 详情 |
| | | case 'detail': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: 'trayCode_detail.html', |
| | | success: function(layero, index){ |
| | | setFormVal(layer.getChildFrame('#detail', index), 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'); |
| | | } |
| | | }); |
| | | break; |
| | | // 编辑 |
| | | case 'edit': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '修改', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | content: 'trayCode_detail.html', |
| | | success: function(layero, index){ |
| | | layer.getChildFrame('#data-detail-submit-save', index).hide(); |
| | | setFormVal(layer.getChildFrame('#detail', index), data, false); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false); |
| | | top.convertDisabled(layer.getChildFrame('#id', index), true); |
| | | 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'); |
| | | } |
| | | }); |
| | | break; |
| | | |
| | | } |
| | | }); |
| | | |
| | | // 数据保存动作 |
| | | form.on('submit(save)', function () { |
| | | if (banMsg != null){ |
| | | layer.msg(banMsg); |
| | | return; |
| | | } |
| | | method("add"); |
| | | }); |
| | | |
| | | // 数据修改动作 |
| | | form.on('submit(edit)', function () { |
| | | method("update") |
| | | }); |
| | | |
| | | function method(name){ |
| | | var index = layer.load(1, { |
| | | shade: [0.5,'#000'] //0.1透明度的背景 |
| | | }); |
| | | var data = { |
| | | // id: $('#id').val(), |
| | | id: $('#id').val(), |
| | | trayNo: $('#trayNo').val(), |
| | | start: $('#start').val(), |
| | | finish: $('#finish').val(), |
| | | memo: $('#memo').val(), |
| | | modiTime: top.strToDate($('#modiTime\\$').val()), |
| | | modiUser: $('#modiUser').val(), |
| | | appeTime: top.strToDate($('#appeTime\\$').val()), |
| | | appeUser: $('#appeUser').val(), |
| | | |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/trayCode/"+name+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: top.reObject(data), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | parent.layer.closeAll(); |
| | | parent.$(".layui-laypage-btn")[0].click(); |
| | | $("#data-detail :input").each(function () { |
| | | $(this).val(""); |
| | | }); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | layer.close(index); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 复选框事件 |
| | | form.on('checkbox(detailCheckbox)', function (data) { |
| | | var el = data.elem; |
| | | if (el.checked) { |
| | | $(el).val('Y'); |
| | | } else { |
| | | $(el).val('N'); |
| | | } |
| | | }); |
| | | |
| | | // 搜索栏搜索事件 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 搜索栏重置事件 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | layDate.render({ |
| | | elem: '#modiTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#appeTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | |
| | | // 开始打印 |
| | | form.on('submit(print)', function (data) { |
| | | $.ajax({ |
| | | url: baseUrl+"/trayCode/print/preview", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | for (let i=0;i<res.data.length;i++){ |
| | | if (data.field.type === '1') { |
| | | res.data[i]["barcodeUrl"]=baseUrl+"/file/barcode/qrcode/auth?" + |
| | | "type="+data.field.type+"¶m="+res.data[i].item+"&width="+200+"&height="+90; |
| | | } else { |
| | | res.data[i]["barcodeUrl"]=baseUrl+"/file/barcode/qrcode/auth?" + |
| | | "type="+data.field.type+"¶m="+res.data[i].item+"&width="+400+"&height="+180; |
| | | } |
| | | } |
| | | var tpl = $('#trayCodeTemplate').html(); |
| | | var template = Handlebars.compile(tpl); |
| | | var html = template(res); |
| | | let box = $("#printBox"); |
| | | box.html(html); |
| | | box.show(); |
| | | box.print({ |
| | | mediaPrint:true, |
| | | deferred: $.Deferred().done(function () { |
| | | layer.confirm('[重要] 打印是否成功?', {btn: ['Yes', 'No']}, function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/trayCode/print/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | $(".layui-laypage-btn")[0].click(); |
| | | layer.msg("操作成功") |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | }) |
| | | }); |
| | | box.hide(); |
| | | layer.closeAll(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | $('#cancel').click(function () { |
| | | layer.closeAll(); |
| | | }) |
| | | }); |
| | | |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | (child ? parent.tableIns : tableIns).reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | if (res.data.length === 0 && count !== 0) { |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr-1 |
| | | } |
| | | }); |
| | | pageCurr -= 1; |
| | | } |
| | | limit(child); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function setFormVal(el, data, showImg) { |
| | | for (var val in data) { |
| | | var find = el.find(":input[id='" + val + "']"); |
| | | if (find[0]!=null){ |
| | | if (find[0].type === 'checkbox'){ |
| | | if (data[val]==='Y'){ |
| | | find.attr("checked","checked"); |
| | | find.val('Y'); |
| | | } else { |
| | | find.remove("checked"); |
| | | find.val('N'); |
| | | } |
| | | continue; |
| | | } |
| | | } |
| | | find.val(data[val]); |
| | | if (showImg){ |
| | | var next = find.next(); |
| | | if (next.get(0)){ |
| | | if (next.get(0).localName === "img") { |
| | | find.hide(); |
| | | next.attr("src", data[val]); |
| | | next.show(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | function clearFormVal(el) { |
| | | $(':input', el) |
| | | .val('') |
| | | .removeAttr('checked') |
| | | .removeAttr('selected'); |
| | | } |
| | | |
| | | function detailScreen(index) { |
| | | var detail = layer.getChildFrame('#data-detail', index); |
| | | var height = detail.height()+60; |
| | | if (height > ($(window).height()*0.9)) { |
| | | height = ($(window).height()*0.8); |
| | | } |
| | | layer.style(index, { |
| | | // top: (($(window).height()-height)/3)+"px", |
| | | height: height+'px' |
| | | }); |
| | | } |
| | | |
| | | $('body').keydown(function () { |
| | | if (event.keyCode === 13) { |
| | | $("#search").click(); |
| | | } |
| | | }); |
| | |
| | | var pageCurr; |
| | | var tableData; |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | |
| | | // ,{field: 'hostName', align: 'center',title: '授权商户'} |
| | | ,{field: 'mobile', align: 'center',title: '账号'} |
| | | ,{field: 'username', align: 'center',title: '名称'} |
| | | ,{field: 'password', align: 'center',title: '密码'} |
| | | // ,{field: 'password', align: 'center',title: '密码'} |
| | | ,{field: 'roleName', align: 'center',title: '角色'} |
| | | // ,{field: 'createTime$', align: 'center',title: '注册时间'} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | | ,{field: 'status$', align: 'center',title: '状态', templet: '#statusTpl', width: 120, unresize: true} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:100} |
| | | ]], |
| | |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | tableData = table.cache.user; |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | // 修改状态 |
| | | form.on('switch(statusSwitch)', function (obj) { |
| | | var index = obj.othis.parents('tr').attr("data-index"); |
| | | var data = tableData[index]; |
| | | data[this.name] = obj.elem.checked?1:0; |
| | | http.post(baseUrl+"/user/edit/auth", {id: data.id, status: data[this.name]}, function (res) { |
| | | layer.msg(res.msg); |
| | | }) |
| | | }) |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(user)', function (obj) { |
| | |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | tableData = table.cache.user; |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | |
| | | type: 2, |
| | | title: '新增', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | area: ['30%', top.detailHeight], |
| | | shadeClose: true, |
| | | content: 'user_detail.html', |
| | | success: function(layero, index){ |
| | |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | } |
| | | }); |
| | | break; |
| | | case 'refreshData': |
| | | tableIns.reload({ |
| | | page: { |
| | | curr: pageCurr |
| | | } |
| | | }); |
| | | limit(); |
| | | break; |
| | | case 'deleteData': |
| | | var data = checkStatus.data; |
| | |
| | | table.on('tool(user)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | // 详情 |
| | | case 'detail': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: 'user_detail.html', |
| | | success: function(layero, index){ |
| | | setFormVal(layer.getChildFrame('#detail', index), data); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); |
| | | layer.getChildFrame('#data-detail-submit,#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'); |
| | | } |
| | | }); |
| | | break; |
| | | // 编辑 |
| | | case 'edit': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '修改', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | area: ['30%', top.detailHeight], |
| | | shadeClose: true, |
| | | content: 'user_detail.html', |
| | | success: function(layero, index){ |
| | |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | } |
| | | }); |
| | | break; |
| | | case 'Role': |
| | | var param = top.reObject(data).roleId; |
| | | if (param === undefined) { |
| | | layer.msg("无数据"); |
| | | } else { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | maxmin: true, |
| | | area: [top.detailHeight, top.detailWidth], |
| | | shadeClose: false, |
| | | content: '../role/role_detail.html', |
| | | success: function(layero, index){ |
| | | $.ajax({ |
| | | url: baseUrl+"/role/"+ param +"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | setFormVal(layer.getChildFrame('#detail', index), res.data); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); |
| | | layer.getChildFrame('#data-detail-submit,#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'); |
| | | } else if (res.code === 403){ |
| | | parent.location.href = "/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | break; |
| | | case 'Host': |
| | | var param = top.reObject(data).hostId; |
| | |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | tableData = table.cache.user; |
| | | pageCurr=curr; |
| | | if (res.data.length === 0 && count !== 0) { |
| | | tableIns.reload({ |
| | |
| | | for (var val in data) { |
| | | el.find(":input[id='" + val + "']").val(data[val]); |
| | | } |
| | | } |
| | | |
| | | function clearFormVal(el) { |
| | | $(':input', el) |
| | | .val('') |
| | | .removeAttr('checked') |
| | | .removeAttr('selected'); |
| | | } |
| | | |
| | | function detailScreen(index) { |
| | | var detail = layer.getChildFrame('#data-detail', index); |
| | | var height = detail.height()+60; |
| | | if (height > ($(window).height()*0.9)) { |
| | | height = ($(window).height()*0.9); |
| | | } |
| | | layer.style(index, { |
| | | height: height +'px' |
| | | }); |
| | | } |
| | | |
| | | $('body').keydown(function () { |
| New file |
| | |
| | | var pageCurr; |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#waitPakin', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/waitPakin/list/auth', |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | // {type: 'checkbox'} |
| | | // ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80} |
| | | // ,{field: 'id', align: 'center',title: '编号', sort: true} |
| | | {field: 'barcode', align: 'center',title: '托盘码'} |
| | | ,{field: 'matnr', align: 'center',title: '物料编码'} |
| | | ,{field: 'maktx', align: 'center',title: '物料描述'} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'unit', align: 'center',title: '单位'} |
| | | ,{field: 'status', align: 'center',title: '状态', templet:function(row){ |
| | | var html = "<input value='status' type='checkbox' lay-skin='switch' lay-text='待入库|已启动' lay-filter='tableCheckbox' disabled='disabled' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | if(row.status !== 'Y'){html += " checked ";} |
| | | html += ">"; |
| | | return html; |
| | | }} |
| | | ,{field: 'memo', align: 'center',title: '备注',hide: true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide: true} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员', hide: true} |
| | | |
| | | // ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | 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'; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(locMast)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: 1 |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(waitPakin)', function (obj) { |
| | | 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: 'waitPakin_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; |
| | | if (data.length === 0){ |
| | | layer.msg('请选择数据'); |
| | | } else { |
| | | layer.confirm('确定删除'+(data.length===1?'此':data.length)+'条数据吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/waitPakin/delete/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) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | break; |
| | | case 'exportData': |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'waitPakin': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/waitPakin/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(waitPakin)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | // 详情 |
| | | case 'detail': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: 'waitPakin_detail.html', |
| | | success: function(layero, index){ |
| | | setFormVal(layer.getChildFrame('#detail', index), 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'); |
| | | } |
| | | }); |
| | | break; |
| | | // 编辑 |
| | | case 'edit': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '修改', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | content: 'waitPakin_detail.html', |
| | | success: function(layero, index){ |
| | | layer.getChildFrame('#data-detail-submit-save', index).hide(); |
| | | setFormVal(layer.getChildFrame('#detail', index), data, false); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false); |
| | | top.convertDisabled(layer.getChildFrame('#id', index), true); |
| | | 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'); |
| | | } |
| | | }); |
| | | 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; |
| | | |
| | | } |
| | | }); |
| | | |
| | | // 数据保存动作 |
| | | form.on('submit(save)', function () { |
| | | if (banMsg != null){ |
| | | layer.msg(banMsg); |
| | | return; |
| | | } |
| | | method("add"); |
| | | }); |
| | | |
| | | // 数据修改动作 |
| | | form.on('submit(edit)', function () { |
| | | method("update") |
| | | }); |
| | | |
| | | function method(name){ |
| | | var index = layer.load(1, { |
| | | shade: [0.5,'#000'] //0.1透明度的背景 |
| | | }); |
| | | var data = { |
| | | // id: $('#id').val(), |
| | | id: $('#id').val(), |
| | | barcode: $('#barcode').val(), |
| | | matnr: $('#matnr').val(), |
| | | maktx: $('#maktx').val(), |
| | | anfme: $('#anfme').val(), |
| | | unit: $('#unit').val(), |
| | | status: $('#status').val(), |
| | | memo: $('#memo').val(), |
| | | modiTime: top.strToDate($('#modiTime\\$').val()), |
| | | modiUser: $('#modiUser').val(), |
| | | appeTime: top.strToDate($('#appeTime\\$').val()), |
| | | appeUser: $('#appeUser').val(), |
| | | |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/waitPakin/"+name+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: top.reObject(data), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | parent.layer.closeAll(); |
| | | parent.$(".layui-laypage-btn")[0].click(); |
| | | $("#data-detail :input").each(function () { |
| | | $(this).val(""); |
| | | }); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | layer.close(index); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 复选框事件 |
| | | form.on('checkbox(detailCheckbox)', function (data) { |
| | | var el = data.elem; |
| | | if (el.checked) { |
| | | $(el).val('Y'); |
| | | } else { |
| | | $(el).val('N'); |
| | | } |
| | | }); |
| | | |
| | | // 搜索栏搜索事件 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 搜索栏重置事件 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | layDate.render({ |
| | | elem: '#modiTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#appeTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | (child ? parent.tableIns : tableIns).reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | if (res.data.length === 0 && count !== 0) { |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr-1 |
| | | } |
| | | }); |
| | | pageCurr -= 1; |
| | | } |
| | | limit(child); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function setFormVal(el, data, showImg) { |
| | | for (var val in data) { |
| | | var find = el.find(":input[id='" + val + "']"); |
| | | if (find[0]!=null){ |
| | | if (find[0].type === 'checkbox'){ |
| | | if (data[val]==='Y'){ |
| | | find.attr("checked","checked"); |
| | | find.val('Y'); |
| | | } else { |
| | | find.remove("checked"); |
| | | find.val('N'); |
| | | } |
| | | continue; |
| | | } |
| | | } |
| | | find.val(data[val]); |
| | | if (showImg){ |
| | | var next = find.next(); |
| | | if (next.get(0)){ |
| | | if (next.get(0).localName === "img") { |
| | | find.hide(); |
| | | next.attr("src", data[val]); |
| | | next.show(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | function clearFormVal(el) { |
| | | $(':input', el) |
| | | .val('') |
| | | .removeAttr('checked') |
| | | .removeAttr('selected'); |
| | | } |
| | | |
| | | function detailScreen(index) { |
| | | var detail = layer.getChildFrame('#data-detail', index); |
| | | var height = detail.height()+60; |
| | | if (height > ($(window).height()*0.9)) { |
| | | height = ($(window).height()*0.8); |
| | | } |
| | | layer.style(index, { |
| | | // top: (($(window).height()-height)/3)+"px", |
| | | height: height+'px' |
| | | }); |
| | | } |
| | | |
| | | $('body').keydown(function () { |
| | | if (event.keyCode === 13) { |
| | | $("#search").click(); |
| | | } |
| | | }); |
| New file |
| | |
| | | var pageCurr; |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#waitPakinLog', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/waitPakinLog/list/auth', |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | // ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80} |
| | | // ,{field: 'id', align: 'center',title: '编号'} |
| | | ,{field: 'pakinId', align: 'center',title: '入库通知号'} |
| | | ,{field: 'barcode', align: 'center',title: '托盘码'} |
| | | ,{field: 'matnr', align: 'center',title: '物料编码'} |
| | | ,{field: 'maktx', align: 'center',title: '物料描述'} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'unit', align: 'center',title: '单位'} |
| | | ,{field: 'status', align: 'center',title: '状态'} |
| | | ,{field: 'memo', align: 'center',title: '备注',hide:true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间',hide:true} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员',hide:true} |
| | | // ,{field: 'appeTime$', align: 'center',title: '添加时间'} |
| | | // ,{field: 'appeUser$', align: 'center',title: '创建者',event: 'appeUser', style: 'cursor:pointer'} |
| | | |
| | | // ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | 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'; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(locMast)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: 1 |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(waitPakinLog)', function (obj) { |
| | | 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: 'waitPakinLog_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; |
| | | if (data.length === 0){ |
| | | layer.msg('请选择数据'); |
| | | } else { |
| | | layer.confirm('确定删除'+(data.length===1?'此':data.length)+'条数据吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/waitPakinLog/delete/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) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | break; |
| | | case 'exportData': |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'waitPakinLog': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/waitPakinLog/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(waitPakinLog)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | // 详情 |
| | | case 'detail': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: 'waitPakinLog_detail.html', |
| | | success: function(layero, index){ |
| | | setFormVal(layer.getChildFrame('#detail', index), 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'); |
| | | } |
| | | }); |
| | | break; |
| | | // 编辑 |
| | | case 'edit': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '修改', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | content: 'waitPakinLog_detail.html', |
| | | success: function(layero, index){ |
| | | layer.getChildFrame('#data-detail-submit-save', index).hide(); |
| | | setFormVal(layer.getChildFrame('#detail', index), data, false); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false); |
| | | top.convertDisabled(layer.getChildFrame('#id', index), true); |
| | | 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'); |
| | | } |
| | | }); |
| | | 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; |
| | | |
| | | } |
| | | }); |
| | | |
| | | // 数据保存动作 |
| | | form.on('submit(save)', function () { |
| | | if (banMsg != null){ |
| | | layer.msg(banMsg); |
| | | return; |
| | | } |
| | | method("add"); |
| | | }); |
| | | |
| | | // 数据修改动作 |
| | | form.on('submit(edit)', function () { |
| | | method("update") |
| | | }); |
| | | |
| | | function method(name){ |
| | | var index = layer.load(1, { |
| | | shade: [0.5,'#000'] //0.1透明度的背景 |
| | | }); |
| | | var data = { |
| | | // id: $('#id').val(), |
| | | id: $('#id').val(), |
| | | pakinId: $('#pakinId').val(), |
| | | barcode: $('#barcode').val(), |
| | | matnr: $('#matnr').val(), |
| | | maktx: $('#maktx').val(), |
| | | anfme: $('#anfme').val(), |
| | | unit: $('#unit').val(), |
| | | status: $('#status').val(), |
| | | memo: $('#memo').val(), |
| | | modiTime: top.strToDate($('#modiTime\\$').val()), |
| | | modiUser: $('#modiUser').val(), |
| | | appeTime: top.strToDate($('#appeTime\\$').val()), |
| | | appeUser: $('#appeUser').val(), |
| | | |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/waitPakinLog/"+name+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: top.reObject(data), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | parent.layer.closeAll(); |
| | | parent.$(".layui-laypage-btn")[0].click(); |
| | | $("#data-detail :input").each(function () { |
| | | $(this).val(""); |
| | | }); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | layer.close(index); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 复选框事件 |
| | | form.on('checkbox(detailCheckbox)', function (data) { |
| | | var el = data.elem; |
| | | if (el.checked) { |
| | | $(el).val('Y'); |
| | | } else { |
| | | $(el).val('N'); |
| | | } |
| | | }); |
| | | |
| | | // 搜索栏搜索事件 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 搜索栏重置事件 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | layDate.render({ |
| | | elem: '#modiTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#appeTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | (child ? parent.tableIns : tableIns).reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | if (res.data.length === 0 && count !== 0) { |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr-1 |
| | | } |
| | | }); |
| | | pageCurr -= 1; |
| | | } |
| | | limit(child); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function setFormVal(el, data, showImg) { |
| | | for (var val in data) { |
| | | var find = el.find(":input[id='" + val + "']"); |
| | | if (find[0]!=null){ |
| | | if (find[0].type === 'checkbox'){ |
| | | if (data[val]==='Y'){ |
| | | find.attr("checked","checked"); |
| | | find.val('Y'); |
| | | } else { |
| | | find.remove("checked"); |
| | | find.val('N'); |
| | | } |
| | | continue; |
| | | } |
| | | } |
| | | find.val(data[val]); |
| | | if (showImg){ |
| | | var next = find.next(); |
| | | if (next.get(0)){ |
| | | if (next.get(0).localName === "img") { |
| | | find.hide(); |
| | | next.attr("src", data[val]); |
| | | next.show(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | function clearFormVal(el) { |
| | | $(':input', el) |
| | | .val('') |
| | | .removeAttr('checked') |
| | | .removeAttr('selected'); |
| | | } |
| | | |
| | | function detailScreen(index) { |
| | | var detail = layer.getChildFrame('#data-detail', index); |
| | | var height = detail.height()+60; |
| | | if (height > ($(window).height()*0.9)) { |
| | | height = ($(window).height()*0.8); |
| | | } |
| | | layer.style(index, { |
| | | // top: (($(window).height()-height)/3)+"px", |
| | | height: height+'px' |
| | | }); |
| | | } |
| | | |
| | | $('body').keydown(function () { |
| | | if (event.keyCode === 13) { |
| | | $("#search").click(); |
| | | } |
| | | }); |
| | |
| | | // ,{field: 'tbnum', align: 'center',title: '转储请求编号'} |
| | | // ,{field: 'tbpos', align: 'center',title: '行项目'} |
| | | // ,{field: 'zmatid', align: 'center',title: '物料标签ID'} |
| | | ,{field: 'maktx', align: 'center',title: '物料描述'} |
| | | // ,{field: 'maktx', align: 'center',title: '物料描述'} |
| | | // ,{field: 'werks', align: 'center',title: '工厂'} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'altme', align: 'center',title: '单位'} |
| New file |
| | |
| | | var pageCurr; |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#wrkDetlLog', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/wrkDetlLog/list/auth', |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | // ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80} |
| | | ,{field: 'wrkNo', align: 'center',title: '工作号'} |
| | | ,{field: 'ioTime$', align: 'center',title: '工作时间'} |
| | | ,{field: 'matnr', align: 'center',title: '物料编号'} |
| | | // ,{field: 'lgnum', align: 'center',title: '仓库号'} |
| | | // ,{field: 'tbnum', align: 'center',title: '转储请求编号'} |
| | | // ,{field: 'tbpos', align: 'center',title: '行项目'} |
| | | // ,{field: 'zmatid', align: 'center',title: '物料标签ID'} |
| | | ,{field: 'maktx', align: 'center',title: '物料描述'} |
| | | // ,{field: 'werks', align: 'center',title: '工厂'} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'altme', align: 'center',title: '单位'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码'} |
| | | // ,{field: 'bname', align: 'center',title: '用户ID'} |
| | | ,{field: 'memo', align: 'center',title: '备注',hide: true} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员',hide: true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间',hide: true} |
| | | // ,{field: 'appeUser$', align: 'center',title: '创建者',event: 'appeUser', style: 'cursor:pointer'} |
| | | // ,{field: 'appeTime$', align: 'center',title: '添加时间'} |
| | | // ,{field: 'nista', align: 'center',title: ''} |
| | | |
| | | // ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | 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'; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(locMast)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: 1 |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(wrkDetlLog)', function (obj) { |
| | | 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: 'wrkDetlLog_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; |
| | | if (data.length === 0){ |
| | | layer.msg('请选择数据'); |
| | | } else { |
| | | layer.confirm('确定删除'+(data.length===1?'此':data.length)+'条数据吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkDetlLog/delete/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) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | break; |
| | | case 'exportData': |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'wrkDetlLog': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkDetlLog/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(wrkDetlLog)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | // 详情 |
| | | case 'detail': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: 'wrkDetlLog_detail.html', |
| | | success: function(layero, index){ |
| | | setFormVal(layer.getChildFrame('#detail', index), 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'); |
| | | } |
| | | }); |
| | | break; |
| | | // 编辑 |
| | | case 'edit': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '修改', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | content: 'wrkDetlLog_detail.html', |
| | | success: function(layero, index){ |
| | | layer.getChildFrame('#data-detail-submit-save', index).hide(); |
| | | setFormVal(layer.getChildFrame('#detail', index), data, false); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false); |
| | | top.convertDisabled(layer.getChildFrame('', index), true); |
| | | 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'); |
| | | } |
| | | }); |
| | | 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; |
| | | |
| | | } |
| | | }); |
| | | |
| | | // 数据保存动作 |
| | | form.on('submit(save)', function () { |
| | | if (banMsg != null){ |
| | | layer.msg(banMsg); |
| | | return; |
| | | } |
| | | method("add"); |
| | | }); |
| | | |
| | | // 数据修改动作 |
| | | form.on('submit(edit)', function () { |
| | | method("update") |
| | | }); |
| | | |
| | | function method(name){ |
| | | var index = layer.load(1, { |
| | | shade: [0.5,'#000'] //0.1透明度的背景 |
| | | }); |
| | | var data = { |
| | | // id: $('#id').val(), |
| | | wrkNo: $('#wrkNo').val(), |
| | | ioTime: top.strToDate($('#ioTime\\$').val()), |
| | | matnr: $('#matnr').val(), |
| | | lgnum: $('#lgnum').val(), |
| | | tbnum: $('#tbnum').val(), |
| | | tbpos: $('#tbpos').val(), |
| | | zmatid: $('#zmatid').val(), |
| | | maktx: $('#maktx').val(), |
| | | werks: $('#werks').val(), |
| | | anfme: $('#anfme').val(), |
| | | altme: $('#altme').val(), |
| | | zpallet: $('#zpallet').val(), |
| | | bname: $('#bname').val(), |
| | | memo: $('#memo').val(), |
| | | modiUser: $('#modiUser').val(), |
| | | modiTime: top.strToDate($('#modiTime\\$').val()), |
| | | appeUser: $('#appeUser').val(), |
| | | appeTime: top.strToDate($('#appeTime\\$').val()), |
| | | nista: $('#nista').val(), |
| | | |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkDetlLog/"+name+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: top.reObject(data), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | parent.layer.closeAll(); |
| | | parent.$(".layui-laypage-btn")[0].click(); |
| | | $("#data-detail :input").each(function () { |
| | | $(this).val(""); |
| | | }); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | layer.close(index); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 复选框事件 |
| | | form.on('checkbox(detailCheckbox)', function (data) { |
| | | var el = data.elem; |
| | | if (el.checked) { |
| | | $(el).val('Y'); |
| | | } else { |
| | | $(el).val('N'); |
| | | } |
| | | }); |
| | | |
| | | // 搜索栏搜索事件 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 搜索栏重置事件 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | layDate.render({ |
| | | elem: '#ioTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#modiTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#appeTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | (child ? parent.tableIns : tableIns).reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | if (res.data.length === 0 && count !== 0) { |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr-1 |
| | | } |
| | | }); |
| | | pageCurr -= 1; |
| | | } |
| | | limit(child); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function setFormVal(el, data, showImg) { |
| | | for (var val in data) { |
| | | var find = el.find(":input[id='" + val + "']"); |
| | | if (find[0]!=null){ |
| | | if (find[0].type === 'checkbox'){ |
| | | if (data[val]==='Y'){ |
| | | find.attr("checked","checked"); |
| | | find.val('Y'); |
| | | } else { |
| | | find.remove("checked"); |
| | | find.val('N'); |
| | | } |
| | | continue; |
| | | } |
| | | } |
| | | find.val(data[val]); |
| | | if (showImg){ |
| | | var next = find.next(); |
| | | if (next.get(0)){ |
| | | if (next.get(0).localName === "img") { |
| | | find.hide(); |
| | | next.attr("src", data[val]); |
| | | next.show(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | function clearFormVal(el) { |
| | | $(':input', el) |
| | | .val('') |
| | | .removeAttr('checked') |
| | | .removeAttr('selected'); |
| | | } |
| | | |
| | | function detailScreen(index) { |
| | | var detail = layer.getChildFrame('#data-detail', index); |
| | | var height = detail.height()+60; |
| | | if (height > ($(window).height()*0.9)) { |
| | | height = ($(window).height()*0.8); |
| | | } |
| | | layer.style(index, { |
| | | // top: (($(window).height()-height)/3)+"px", |
| | | height: height+'px' |
| | | }); |
| | | } |
| | | |
| | | $('body').keydown(function () { |
| | | if (event.keyCode === 13) { |
| | | $("#search").click(); |
| | | } |
| | | }); |
| | |
| | | layer.closeAll(); |
| | | }); |
| | | break; |
| | | // 拣料入库 |
| | | case 'pick': |
| | | layer.confirm('拣料入库该笔工作档?', {title: '工作号:'+data.wrkNo, shadeClose: true}, function(){ |
| | | http.post(baseUrl+"/hand/control/wrkMast", {workNo: data.wrkNo, type:3}, function (res) { |
| | | $(".layui-laypage-btn")[0].click(); |
| | | layer.msg(data.wrkNo + res.msg); |
| | | }) |
| | | layer.closeAll(); |
| | | }); |
| | | break; |
| | | // 详情 |
| | | case 'detail': |
| | | layer.open({ |
| | |
| | | ,{field: 'ioType$', align: 'center',title: '入出库类型', width:160} |
| | | ,{field: 'ioPri', align: 'center',title: '优先级'} |
| | | ,{field: 'crnNo$', align: 'center',title: '堆垛机号'} |
| | | ,{field: 'sourceStaNo$', align: 'center',title: '源站',event: 'sourceStaNo', style: 'cursor:pointer'} |
| | | ,{field: 'staNo$', align: 'center',title: '目标站',event: 'staNo', style: 'cursor:pointer'} |
| | | ,{field: 'sourceLocNo$', align: 'center',title: '源库位',event: 'sourceLocNo', style: 'cursor:pointer'} |
| | | ,{field: 'locNo$', align: 'center',title: '目标库位',event: 'locNo', style: 'cursor:pointer'} |
| | | ,{field: 'sourceStaNo$', align: 'center',title: '源站'} |
| | | ,{field: 'staNo$', align: 'center',title: '目标站'} |
| | | ,{field: 'sourceLocNo$', align: 'center',title: '源库位'} |
| | | ,{field: 'locNo$', align: 'center',title: '目标库位'} |
| | | // ,{field: 'picking', align: 'center',title: '拣料', templet:function(row){ |
| | | // var html = "<input value='picking' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | // if(row.picking === 'Y'){html += " checked ";} |
| New file |
| | |
| | | /*! layer mobile-v2.0 弹层组件移动版 License LGPL http://layer.layui.com/mobile By 贤心 */ |
| | | ;!function(a){"use strict";var b=document,c="querySelectorAll",d="getElementsByClassName",e=function(a){return b[c](a)},f={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},g={extend:function(a){var b=JSON.parse(JSON.stringify(f));for(var c in a)b[c]=a[c];return b},timer:{},end:{}};g.touch=function(a,b){a.addEventListener("click",function(a){b.call(this,a)},!1)};var h=0,i=["layui-m-layer"],j=function(a){var b=this;b.config=g.extend(a),b.view()};j.prototype.view=function(){var a=this,c=a.config,f=b.createElement("div");a.id=f.id=i[0]+h,f.setAttribute("class",i[0]+" "+i[0]+(c.type||0)),f.setAttribute("index",h);var g=function(){var a="object"==typeof c.title;return c.title?'<h3 style="'+(a?c.title[1]:"")+'">'+(a?c.title[0]:c.title)+"</h3>":""}(),j=function(){"string"==typeof c.btn&&(c.btn=[c.btn]);var a,b=(c.btn||[]).length;return 0!==b&&c.btn?(a='<span yes type="1">'+c.btn[0]+"</span>",2===b&&(a='<span no type="0">'+c.btn[1]+"</span>"+a),'<div class="layui-m-layerbtn">'+a+"</div>"):""}();if(c.fixed||(c.top=c.hasOwnProperty("top")?c.top:100,c.style=c.style||"",c.style+=" top:"+(b.body.scrollTop+c.top)+"px"),2===c.type&&(c.content='<i></i><i class="layui-m-layerload"></i><i></i><p>'+(c.content||"")+"</p>"),c.skin&&(c.anim="up"),"msg"===c.skin&&(c.shade=!1),f.innerHTML=(c.shade?"<div "+("string"==typeof c.shade?'style="'+c.shade+'"':"")+' class="layui-m-layershade"></div>':"")+'<div class="layui-m-layermain" '+(c.fixed?"":'style="position:static;"')+'><div class="layui-m-layersection"><div class="layui-m-layerchild '+(c.skin?"layui-m-layer-"+c.skin+" ":"")+(c.className?c.className:"")+" "+(c.anim?"layui-m-anim-"+c.anim:"")+'" '+(c.style?'style="'+c.style+'"':"")+">"+g+'<div class="layui-m-layercont">'+c.content+"</div>"+j+"</div></div></div>",!c.type||2===c.type){var k=b[d](i[0]+c.type),l=k.length;l>=1&&layer.close(k[0].getAttribute("index"))}document.body.appendChild(f);var m=a.elem=e("#"+a.id)[0];c.success&&c.success(m),a.index=h++,a.action(c,m)},j.prototype.action=function(a,b){var c=this;a.time&&(g.timer[c.index]=setTimeout(function(){layer.close(c.index)},1e3*a.time));var e=function(){var b=this.getAttribute("type");0==b?(a.no&&a.no(),layer.close(c.index)):a.yes?a.yes(c.index):layer.close(c.index)};if(a.btn)for(var f=b[d]("layui-m-layerbtn")[0].children,h=f.length,i=0;h>i;i++)g.touch(f[i],e);if(a.shade&&a.shadeClose){var j=b[d]("layui-m-layershade")[0];g.touch(j,function(){layer.close(c.index,a.end)})}a.end&&(g.end[c.index]=a.end)},a.layer={v:"2.0",index:h,open:function(a){var b=new j(a||{});return b.index},close:function(a){var c=e("#"+i[0]+a)[0];c&&(c.innerHTML="",b.body.removeChild(c),clearTimeout(g.timer[a]),delete g.timer[a],"function"==typeof g.end[a]&&g.end[a](),delete g.end[a])},closeAll:function(){for(var a=b[d](i[0]),c=0,e=a.length;e>c;c++)layer.close(0|a[0].getAttribute("index"))}},"function"==typeof define?define(function(){return layer}):function(){var a=document.scripts,c=a[a.length-1],d=c.src,e=d.substring(0,d.lastIndexOf("/")+1);c.getAttribute("merge")||document.head.appendChild(function(){var a=b.createElement("link");return a.href=e+"need/layer.css?2.0",a.type="text/css",a.rel="styleSheet",a.id="layermcss",a}())}()}(window); |
| New file |
| | |
| | | .layui-m-layer{position:relative;z-index:19891014}.layui-m-layer *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.layui-m-layermain,.layui-m-layershade{position:fixed;left:0;top:0;width:100%;height:100%}.layui-m-layershade{background-color:rgba(0,0,0,.7);pointer-events:auto}.layui-m-layermain{display:table;font-family:Helvetica,arial,sans-serif;pointer-events:none}.layui-m-layermain .layui-m-layersection{display:table-cell;vertical-align:middle;text-align:center}.layui-m-layerchild{position:relative;display:inline-block;text-align:left;background-color:#fff;font-size:14px;border-radius:5px;box-shadow:0 0 8px rgba(0,0,0,.1);pointer-events:auto;-webkit-overflow-scrolling:touch;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}@-webkit-keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.layui-m-anim-scale{animation-name:layui-m-anim-scale;-webkit-animation-name:layui-m-anim-scale}@-webkit-keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.layui-m-anim-up{-webkit-animation-name:layui-m-anim-up;animation-name:layui-m-anim-up}.layui-m-layer0 .layui-m-layerchild{width:90%;max-width:640px}.layui-m-layer1 .layui-m-layerchild{border:none;border-radius:0}.layui-m-layer2 .layui-m-layerchild{width:auto;max-width:260px;min-width:40px;border:none;background:0 0;box-shadow:none;color:#fff}.layui-m-layerchild h3{padding:0 10px;height:60px;line-height:60px;font-size:16px;font-weight:400;border-radius:5px 5px 0 0;text-align:center}.layui-m-layerbtn span,.layui-m-layerchild h3{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-m-layercont{padding:50px 30px;line-height:22px;text-align:center}.layui-m-layer1 .layui-m-layercont{padding:0;text-align:left}.layui-m-layer2 .layui-m-layercont{text-align:center;padding:0;line-height:0}.layui-m-layer2 .layui-m-layercont i{width:25px;height:25px;margin-left:8px;display:inline-block;background-color:#fff;border-radius:100%;-webkit-animation:layui-m-anim-loading 1.4s infinite ease-in-out;animation:layui-m-anim-loading 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.layui-m-layerbtn,.layui-m-layerbtn span{position:relative;text-align:center;border-radius:0 0 5px 5px}.layui-m-layer2 .layui-m-layercont p{margin-top:20px}@-webkit-keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}@keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.layui-m-layer2 .layui-m-layercont i:first-child{margin-left:0;-webkit-animation-delay:-.32s;animation-delay:-.32s}.layui-m-layer2 .layui-m-layercont i.layui-m-layerload{-webkit-animation-delay:-.16s;animation-delay:-.16s}.layui-m-layer2 .layui-m-layercont>div{line-height:22px;padding-top:7px;margin-bottom:20px;font-size:14px}.layui-m-layerbtn{display:box;display:-moz-box;display:-webkit-box;width:100%;height:50px;line-height:50px;font-size:0;border-top:1px solid #D0D0D0;background-color:#F2F2F2}.layui-m-layerbtn span{display:block;-moz-box-flex:1;box-flex:1;-webkit-box-flex:1;font-size:14px;cursor:pointer}.layui-m-layerbtn span[yes]{color:#40AFFE}.layui-m-layerbtn span[no]{border-right:1px solid #D0D0D0;border-radius:0 0 0 5px}.layui-m-layerbtn span:active{background-color:#F6F6F6}.layui-m-layerend{position:absolute;right:7px;top:10px;width:30px;height:30px;border:0;font-weight:400;background:0 0;cursor:pointer;-webkit-appearance:none;font-size:30px}.layui-m-layerend::after,.layui-m-layerend::before{position:absolute;left:5px;top:15px;content:'';width:18px;height:1px;background-color:#999;transform:rotate(45deg);-webkit-transform:rotate(45deg);border-radius:3px}.layui-m-layerend::after{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}body .layui-m-layer .layui-m-layer-footer{position:fixed;width:95%;max-width:100%;margin:0 auto;left:0;right:0;bottom:10px;background:0 0}.layui-m-layer-footer .layui-m-layercont{padding:20px;border-radius:5px 5px 0 0;background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn{display:block;height:auto;background:0 0;border-top:none}.layui-m-layer-footer .layui-m-layerbtn span{background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn span[no]{color:#FD482C;border-top:1px solid #c2c2c2;border-radius:0 0 5px 5px}.layui-m-layer-footer .layui-m-layerbtn span[yes]{margin-top:10px;border-radius:5px}body .layui-m-layer .layui-m-layer-msg{width:auto;max-width:90%;margin:0 auto;bottom:-150px;background-color:rgba(0,0,0,.7);color:#fff}.layui-m-layer-msg .layui-m-layercont{padding:10px 20px} |
| | |
| | | </div> |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <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> |
| | | <!-- <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> |
| | | </div> |
| | | </script> |
| | | |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | <style> |
| | | .layui-btn .layui-icon { |
| | | margin: 0; |
| | | } |
| | | #btn-pri-add { |
| | | display: none; |
| | | } |
| | | #btn-pri-red { |
| | | display: none; |
| | | } |
| | | .btn-complete { |
| | | display: none; |
| | | } |
| | | .btn-cancel { |
| | | display: none; |
| | | } |
| | | |
| | | /*明细表*/ |
| | | #detlTable { |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | #search-box { |
| | | padding: 30px 30px 10px 30px; |
| | | } |
| | | #search-box .layui-inline { |
| | | margin-right: 5px; |
| | | } |
| | | #data-search-btn { |
| | | margin-top: 10px; |
| | | } |
| | | #data-search-btn.layui-btn-container .layui-btn { |
| | | margin-right: 20px; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 搜索栏 --> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="wrk_no" placeholder="工作号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="wrkSts" class="layui-input" name="wrk_sts" type="text" placeholder="请输入" autocomplete="off" style="display: none"> |
| | | <input id="wrkSts$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="工作状态" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basWrkStatusQueryBywrkSts" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basWrkStatusQueryBywrkStsSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 日期范围 --> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="error_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 待添加 --> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> |
| | | <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">重置</button> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 表格 --> |
| | | <div class="layui-form"> |
| | | <table class="layui-hide" id="wrkMast" lay-filter="wrkMast"></table> |
| | | </div> |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-normal" id="btn-pri-add" lay-event="priAdd"><i class="layui-icon"></i>增加优先级</button> |
| | | <button class="layui-btn layui-btn-normal" id="btn-pri-red" lay-event="priRed"><i class="layui-icon"></i>降低优先级</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <!--明细表--> |
| | | <div id="detlTable" style="display: none"> |
| | | <div class="layui-inline" style="width:90%;margin-top: 10px;margin-left: 20px"> |
| | | <span style=" color: indianred">以下为当前工作流的物料明细</span> |
| | | </div> |
| | | |
| | | <table class="layui-hide" id="wrkDetlByMap" lay-filter="wrkDetlByMap"></table> |
| | | </div> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-sm btn-detlShow" lay-event="detlShow">明细</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-sm btn-complete" lay-event="complete">完成</a> |
| | | <a class="layui-btn layui-btn-primary layui-btn-sm btn-cancel" lay-event="cancel">取消</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/errorWrkMast/errorWrkMast.js" charset="utf-8"></script> |
| | | |
| | | <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> |
| | | |
| | | </body> |
| | | </html> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | <div id="prompt" style="text-indent: 10px;"> |
| | | <span class="not-null">初始化会清除库位所有数据,请谨慎操作!</span> |
| | | <span class="not-null">初始化库位后将删除库存明细,请谨慎操作!</span> |
| | | </div> |
| | | <!-- 按钮 --> |
| | | <div style="text-align: center; margin-top: 20px"> |
| | |
| | | <input id="locNo" class="layui-input" type="text" onkeyup="check(this.id, 'locMast')"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:80%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>库位状态:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="locType" class="layui-input" type="text" style="display: none" lay-verify="required" > |
| | | <input id="locType$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basLocTypeQueryBylocType" onkeyup="autoLoad(this.getAttribute('data-key'))" > |
| | | <select class="cool-auto-complete-window-select" data-key="basLocTypeQueryBylocTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:80%;display: none"> |
| | | <label class="layui-form-label">库位类型:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | |
| | | <label class="layui-form-label">满 板:</label> |
| | | <div class="layui-input-inline" style="text-align: left"> |
| | | <input id="fullPlt" class="layui-input" type="checkBox" lay-skin="primary" lay-filter='detailCheckbox'> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:80%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>库位状态:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="locType" class="layui-input" type="text" style="display: none" lay-verify="required" > |
| | | <input id="locType$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basLocTypeQueryBylocType" onkeyup="autoLoad(this.getAttribute('data-key'))" > |
| | | <select class="cool-auto-complete-window-select" data-key="basLocTypeQueryBylocTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;display: none"> |
| | |
| | | } |
| | | |
| | | #login-wrapper h2 { |
| | | letter-spacing: 3px; |
| | | font-size: 26px; |
| | | margin-bottom: 30px; |
| | | } |
| | |
| | | font-size: 18px; |
| | | } |
| | | .layui-btn-normal { |
| | | background-color: #0767aa; |
| | | background-color: #5FB878; |
| | | font-size: 20px; |
| | | border-radius: 4px; |
| | | height: 52px; |
| | |
| | | </header> |
| | | <div class="layui-form layadmin-user-login-body"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-icon layui-icon-cellphone layadmin-user-login-icon"></label> |
| | | <input id="mobile" class="layui-input" type="text" name="mobile" lay-verify="mobile" placeholder="用户名"> |
| | | <label class="layui-icon layui-icon-username layadmin-user-login-icon"></label> |
| | | <input id="mobile" class="layui-input" type="text" name="mobile" lay-verify="mobile" placeholder="账号"> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-icon layui-icon-password layadmin-user-login-icon"></label> |
| | |
| | | <input id="code" class="layui-input" type="text" name="password" lay-verify="code" placeholder="验证码"> |
| | | <img id="codeImg" title="看不清?点击换一张。"> |
| | | </div> |
| | | <!--<div class="layui-form-item">--> |
| | | <!--<input id="rememberPwd" style="vertical-align: middle" type="checkbox" lay-filter="remPwd" lay-skin="switch" lay-text="开启|关闭" title="记住密码" checked="checked">--> |
| | | <!--<span style="vertical-align: middle;font-size: 15px">记住密码</span>--> |
| | | <!--</div>--> |
| | | <div class="layui-form-item" style="text-align: left;padding-left: 3px;"> |
| | | <input id="rememberPwd" style="vertical-align: middle" type="checkbox" lay-skin='primary' lay-filter="remPwd" title="记住密码" checked="checked"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item login-submit"> |
| | | <button id="login-button" class="layui-btn layui-btn-fluid layui-btn-normal" lay-submit="" lay-filter="login">登 录</button> |
| | |
| | | <script type="text/javascript" src="../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../static/js/tools/md5.js"></script> |
| | | <script type="text/javascript"> |
| | | |
| | | $(function () { |
| | | var oldUserName = localStorage.getItem('oldUserName'); |
| | | var oldPass = localStorage.getItem('oldPass'); |
| | | if(oldUserName){ |
| | | $('#mobile').val(oldUserName); |
| | | } |
| | | if(oldPass){ |
| | | $('#password').val(oldPass); |
| | | } |
| | | }) |
| | | |
| | | // 验证码开关 |
| | | var codeSwitch = 'Y'; |
| | |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | // 记住密码 |
| | | if($('#rememberPwd').is(':checked')){ |
| | | localStorage.setItem('oldUserName',user.mobile); |
| | | localStorage.setItem('oldPass',user.password); |
| | | } else { |
| | | localStorage.removeItem('oldUserName'); |
| | | localStorage.removeItem('oldPass'); |
| | | } |
| | | localStorage.setItem("token", res.data.token); |
| | | localStorage.setItem("username", res.data.username); |
| | | window.location.href = "index.html"; |
| | |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/print.css" media="all"> |
| | | <style> |
| | | #search-box { |
| | | padding: 30px 30px 10px 30px; |
| | |
| | | |
| | | /* ------------------------- 打印表格 ----------------------- */ |
| | | .template-preview { |
| | | height: 200px; |
| | | display: inline-block; |
| | | } |
| | | .contain { |
| | |
| | | |
| | | <!-- 预览图 1 --> |
| | | <div id="template-preview-1" class="template-preview" style="display: inline-block"> |
| | | <table class="contain" height="217" width="317" style="overflow: hidden;font-size: xx-small"> |
| | | <tr> |
| | | <td colspan="1" align="center" scope="col">条码</td> |
| | | <td class="barcode" colspan="3" align="center" scope="col"> |
| | | <img class="template-code template-barcode" src="" width="80%"> |
| | | <div style="letter-spacing: 2px;margin-top: 3px; text-align: center"> |
| | | <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;"> |
| | | <tr style="height: 74px"> |
| | | <td colspan="3" align="center" scope="col">物料编码</td> |
| | | <td class="barcode" colspan="9" align="center" scope="col"> |
| | | <img class="template-code template-barcode" src="" width="90%;"> |
| | | <div style="letter-spacing: 2px;margin-top: 1px; text-align: center;"> |
| | | <span>xxxxxx</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td align="center" width="25%">物料编码</td> |
| | | <td align="center" width="25%">xxxxxx-xx/xx</td> |
| | | <td align="center" width="25%">物料名称</td> |
| | | <td align="center" width="25%">xxxxxxx</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="center" width="25%">物料单位</td> |
| | | <td align="center" width="25%">xxxxxxxx</td> |
| | | <td align="center" width="25%">物料规格</td> |
| | | <td align="center" width="25%">xxxxxxx</td> |
| | | <tr style="height: 74px"> |
| | | <td align="center" colspan="3">物料名称</td> |
| | | <td align="center" colspan="5">xxxxxx-xx/xx</td> |
| | | <td align="center" colspan="2">单位</td> |
| | | <td align="center" colspan="2">xx</td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | |
| | | <!-- 预览图 2 --> |
| | | <div id="template-preview-2" class="template-preview" style="display: none"> |
| | | <table class="contain" height="217" width="317" style="overflow: hidden;font-size: xx-small"> |
| | | <tr> |
| | | <td align="center" scope="col" width="20%" colspan="1">物料编码</td> |
| | | <td align="center" scope="col" width="80%" colspan="5">xxxxxx-xx/xx</td> |
| | | <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;"> |
| | | <tr style="height: 30px"> |
| | | <td align="center" width="20%">物料名称</td> |
| | | <td align="center" width="80%" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">xxxxxxx</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="center" colspan="1">物料名称</td> |
| | | <td align="center" colspan="5">xxxxxxx</td> |
| | | <tr style="height: 30px"> |
| | | <td align="center" width="20%">物料单位</td> |
| | | <td align="center" width="80%">xxxxxxxx</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="center" colspan="1">物料单位</td> |
| | | <td align="center" colspan="5">xxxxxxxx</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="center" colspan="1">物料规格</td> |
| | | <td align="center" colspan="5">xxxxxxx</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="center" colspan="6" style="border: none"> |
| | | <tr style="height: 75px;"> |
| | | <td align="center" colspan="2" width="100%" style="border: none"> |
| | | <img class="template-code template-barcode" src="" width="80%"> |
| | | <div style="letter-spacing: 2px;margin-top: 3px; text-align: center"> |
| | | <div style="letter-spacing: 2px;margin-top: 1px; text-align: center"> |
| | | <span>xxxxxx</span> |
| | | </div> |
| | | </td> |
| | |
| | | |
| | | <!-- 预览图 3 --> |
| | | <div id="template-preview-3" class="template-preview" style="display: none"> |
| | | <table class="contain" height="217" width="317" style="overflow: hidden;font-size: xx-small"> |
| | | <tr> |
| | | <td align="center" scope="col" width="50%" colspan="3">物料编码</td> |
| | | <td align="center" scope="col" width="50%" colspan="3">xxxxxx-xx/xx</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="center" colspan="3">物料名称</td> |
| | | <td align="center" colspan="3">xxxxxxx</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="center" width="50%" rowspan="1" colspan="3">物料规格</td> |
| | | <td align="center" width="50%" colspan="3" rowspan="4"> |
| | | <img class="template-code template-qrcode" src=""> |
| | | <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;"> |
| | | <tr style="height: 74px"> |
| | | <td align="center" scope="col" colspan="1">物料名称</td> |
| | | <td align="center" scope="col" colspan="1" style="">xxxxxx-xx/xx</td> |
| | | <td align="center" scope="col" colspan="2" rowspan="2"> |
| | | <img class="template-code template-qrcode" src="" width="80%"> |
| | | <div style="letter-spacing: 1px;margin-top: 1px; text-align: center"> |
| | | <span>xxxxxx</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td align="center" colspan="3" rowspan="1">xxxxxx</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="center" colspan="3" rowspan="1">物料单位</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="center" colspan="3" rowspan="1">xxxxxxxx</td> |
| | | <tr style="height: 74px"> |
| | | <td align="center" colspan="1">物料单位</td> |
| | | <td align="center" colspan="1" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">xxxxxxx</td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | |
| | | </div> |
| | | </fieldset> |
| | | |
| | |
| | | <!-- 模板1 --> |
| | | <script type="text/template" id="templatePreview1" class="template-barcode"> |
| | | {{#each data}} |
| | | <table class="contain" height="217" width="317" style="overflow: hidden;font-size: xx-small"> |
| | | <tr> |
| | | <td align="center" colspan="1" scope="col">条码</td> |
| | | <td align="center" class="barcode" colspan="3" scope="col"> |
| | | <img class="template-code" src="{{this.barcodeUrl}}" width="80%"> |
| | | <div style="letter-spacing: 2px;margin-top: 3px; text-align: center"> |
| | | <span>{{this.barcode}}</span> |
| | | <table class="contain" width="280" style="overflow: hidden;font-size: small;table-layout: fixed;"> |
| | | <tr style="height: 74px"> |
| | | <td align="center" colspan="3" scope="col">物料编码</td> |
| | | <td align="center" class="barcode" colspan="9" scope="col"> |
| | | <img class="template-code" src="{{this.barcodeUrl}}" width="90%"> |
| | | <div style="letter-spacing: 2px;margin-top: 1px; text-align: center"> |
| | | <span>{{this.matNo}}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td align="center" width="25%">物料编码</td> |
| | | <td align="center" width="25%">{{this.matNo}}</td> |
| | | <td align="center" width="25%">物料名称</td> |
| | | <td align="center" width="25%">{{this.matName}}</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="center" width="25%">物料单位</td> |
| | | <td align="center" width="25%">{{this.str1}}</td> |
| | | <td align="center" width="25%">物料规格</td> |
| | | <td align="center" width="25%">{{this.str2}}</td> |
| | | <tr style="height: 74px"> |
| | | <td align="center" colspan="3">物料名称</td> |
| | | <td align="center" colspan="5" style="overflow: hidden; white-space: nowrap;text-overflow: ellipsis;">{{this.matName}}</td> |
| | | <td align="center" colspan="2">单位</td> |
| | | <td align="center" colspan="2">{{this.str1}}</td> |
| | | </tr> |
| | | </table> |
| | | {{/each}} |
| | |
| | | <!-- 模板2 --> |
| | | <script type="text/template" id="templatePreview2" class="template-barcode"> |
| | | {{#each data}} |
| | | <table class="contain" height="217" width="317" style="overflow: hidden;font-size: xx-small"> |
| | | <tr> |
| | | <td align="center" scope="col" width="20%" colspan="1">物料编码</td> |
| | | <td align="center" scope="col" width="80%" colspan="5">{{this.matNo}}</td> |
| | | <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;"> |
| | | <tr style="height: 35px"> |
| | | <td align="center" width="20%">物料名称</td> |
| | | <td align="center" width="80%" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">{{this.matName}}</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="center" colspan="1">物料名称</td> |
| | | <td align="center" colspan="5">{{this.matName}}</td> |
| | | <tr style="height: 35px"> |
| | | <td align="center" width="20%">物料单位</td> |
| | | <td align="center" width="80%">{{this.str1}}</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="center" colspan="1">物料单位</td> |
| | | <td align="center" colspan="5">{{this.str1}}</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="center" colspan="1">物料规格</td> |
| | | <td align="center" colspan="5">{{this.str2}}</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="center" colspan="6" style="border: none"> |
| | | <tr style="height: 79px;"> |
| | | <td align="center" colspan="2" width="100%" style="border: none"> |
| | | <img class="template-code" src="{{this.barcodeUrl}}" width="80%"> |
| | | <div style="letter-spacing: 2px;margin-top: 3px; text-align: center"> |
| | | <div style="letter-spacing: 2px;margin-top: 1px; text-align: center"> |
| | | <span>{{this.matNo}}</span> |
| | | </div> |
| | | </td> |
| | |
| | | <!-- 模板3 --> |
| | | <script type="text/template" id="templatePreview3" class="template-qrcode"> |
| | | {{#each data}} |
| | | <table class="contain" height="217" width="317" style="overflow: hidden;font-size: xx-small"> |
| | | <tr> |
| | | <td align="center" scope="col" width="50%" colspan="3">物料编码</td> |
| | | <td align="center" scope="col" width="50%" colspan="3">{{this.matNo}}</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="center" colspan="3">物料名称</td> |
| | | <td align="center" colspan="3">{{this.matName}}</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="center" width="50%" rowspan="1" colspan="3">物料单位</td> |
| | | <td align="center" width="50%" colspan="3" rowspan="4"> |
| | | <img class="template-code template-qrcode" src="{{this.barcodeUrl}}"> |
| | | <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;"> |
| | | <tr style="height: 74px"> |
| | | <td align="center" scope="col" colspan="1">物料名称</td> |
| | | <td align="center" scope="col" colspan="1" style="">{{this.matName}}</td> |
| | | <td align="center" scope="col" colspan="2" rowspan="2"> |
| | | <img class="template-code template-qrcode" src="{{this.barcodeUrl}}" width="80%"> |
| | | <div style="letter-spacing: 1px;margin-top: 1px; text-align: center"> |
| | | <span>{{this.matNo}}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td align="center" colspan="3" rowspan="1">{{this.str1}}</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="center" colspan="3" rowspan="1">物料规格</td> |
| | | </tr> |
| | | <tr> |
| | | <td align="center" colspan="3" rowspan="1">{{this.str2}}</td> |
| | | <tr style="height: 74px"> |
| | | <td align="center" colspan="1">物料单位</td> |
| | | <td align="center" colspan="1" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">{{this.str1}}</td> |
| | | </tr> |
| | | </table> |
| | | {{/each}} |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 日期范围 --> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="create_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <!-- 待添加 --> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> |
| | |
| | | <table class="layui-hide" id="operateLog" lay-filter="operateLog"></table> |
| | | <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-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> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">详情</a> |
| | | <a class="layui-btn layui-btn-xs btn-edit" lay-event="edit">编辑</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <meta name="viewport" content="width=device-width, target-densitydpi=high-dpi, initial-scale=1.0, user-scalable=no"/> |
| | | <title>组托</title> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/pda.css" media="all"> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <style> |
| | | |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <!-- 头部 --> |
| | | <header> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">条码</label> |
| | | <input class="layui-input" type="text" id="code" placeholder="扫码 / 输入" autocomplete="off"> |
| | | </div> |
| | | <div style="margin: 5px 5px"> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-xs" onclick="getMat()"><i class="layui-icon">+</i>提取</button> |
| | | </div> |
| | | </header> |
| | | |
| | | <!-- 主体 --> |
| | | <main> |
| | | <table class="layui-table" id="chooseData" lay-filter="chooseData"></table> |
| | | </main> |
| | | <!-- 尾部 --> |
| | | <footer> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-xs layui-btn-primary" onclick="reset()">重置</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-xs" onclick="comb()" style="margin-left: 20px">组托</button> |
| | | <span id="tips"></span> |
| | | </div> |
| | | </footer> |
| | | </body> |
| | | <script> |
| | | var tableIns; |
| | | layui.use(['table','laydate', 'form'], function() { |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var form = layui.form; |
| | | |
| | | tableIns = table.render({ |
| | | elem: '#chooseData', |
| | | data: [], |
| | | limit: 500, |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {fixed: 'left', align: 'center', field: 'count', title: '量', style:'color: blue', width:20}, |
| | | {field: 'matNo', align: 'center', title: '物料编码'}, |
| | | {field: 'matName', align: 'center', title: '物料名称'} |
| | | ]], |
| | | done: function (res, curr, count) { |
| | | } |
| | | }); |
| | | |
| | | }); |
| | | |
| | | window.onload = function(){document.getElementById("code").focus();} |
| | | |
| | | var matCodeLayerIdx; |
| | | function getMat() { |
| | | matCodeLayerIdx = layer.open({ |
| | | type: 2, |
| | | title: '物料', |
| | | shade: [0.3,'#000'], |
| | | area: ['90%', '90%'], |
| | | content: 'matQuery.html', |
| | | success: function(layero, index){ |
| | | $('.layui-layer-title').css('height', '20px').css('line-height', '20px').css('font-size', '12px').css('padding-left', '10px') |
| | | $('.layui-layer-setwin').css("top", '2px').css('right', '3px') |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // 添加表格数据 |
| | | var matData = []; |
| | | function addTableData(data) { |
| | | if (isEmpty(data.matName)){ |
| | | tips("提取失败"); |
| | | return; |
| | | } |
| | | let toPush = true; |
| | | for (var j=0;j<matData.length;j++){ |
| | | if (data.matNo === matData[j].matNo) { |
| | | matData[j].count = Number(matData[j].count) + Number(data.count); |
| | | toPush = false; |
| | | } |
| | | } |
| | | if (toPush) { |
| | | matData.push(data); |
| | | } |
| | | tips("提取成功"); |
| | | tableIns.reload({data: matData}); |
| | | } |
| | | |
| | | // 重置 |
| | | function reset() { |
| | | $('#code').val(""); |
| | | matData = []; |
| | | tableIns.reload({data: matData}); |
| | | tips(""); |
| | | } |
| | | |
| | | // 组托 |
| | | function comb() { |
| | | let barcode = $('#code').val(); |
| | | if (isEmpty(barcode)) { |
| | | tips("托盘条码为空", true); |
| | | document.getElementById("code").focus(); |
| | | return; |
| | | } |
| | | if (matData.length === 0) { |
| | | tips("请提取物料", true); |
| | | return; |
| | | } |
| | | $.ajax({ |
| | | url: baseUrl+"/mobile/comb/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify({ |
| | | barcode: barcode, |
| | | combMats: matData |
| | | }), |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | reset(); |
| | | tips("组托成功") |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/pda"; |
| | | } else { |
| | | tips(res.msg, true) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 提示信息 |
| | | * @param msg 提示内容 |
| | | * @param warn true:红色字体 |
| | | */ |
| | | function tips(msg, warn) { |
| | | let tips = $('#tips'); |
| | | tips.html(msg); |
| | | tips.css("color", warn?"red":'#666'); |
| | | } |
| | | </script> |
| | | </html> |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <meta name="viewport" content="width=device-width, target-densitydpi=high-dpi, initial-scale=1.0, user-scalable=no"/> |
| | | <title>PDA首页</title> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <style> |
| | | * { |
| | | margin: 0; |
| | | padding: 0; |
| | | box-sizing: border-box; |
| | | -webkit-box-sizing: border-box; |
| | | -moz-box-sizing: border-box; |
| | | } |
| | | html { |
| | | height: 100%; |
| | | /*line-height: 1.5;*/ |
| | | } |
| | | body { |
| | | height: 100%; |
| | | } |
| | | |
| | | /* 导航 */ |
| | | .nav { |
| | | background-color: #fff; /*todo*/ |
| | | color: #000; |
| | | list-style-type: none; |
| | | position: fixed; |
| | | width: 100%; |
| | | overflow: hidden; |
| | | box-shadow: 0 1px 2px 0 rgba(0,0,0,.1) |
| | | } |
| | | .nav li { |
| | | float: left; |
| | | border-right: 1px solid #f1f1f1; /*todo*/ |
| | | } |
| | | .nav li a { |
| | | font-size: 14px; |
| | | letter-spacing: 1px; |
| | | display: block; |
| | | text-decoration: none; |
| | | padding: 3px 10px; |
| | | text-align: center; |
| | | /*transform:scale(1.5);*/ |
| | | /*-webkit-transform:scale(1.5);*/ |
| | | /*-moz-transform:scale(1.5);*/ |
| | | } |
| | | .nav li a:hover { |
| | | color: #000; |
| | | } |
| | | .nav-unselect { |
| | | color: #666; |
| | | } |
| | | .nav-select { |
| | | background-color: #f1f1f1; /*todo*/ |
| | | color: #000; |
| | | } |
| | | |
| | | /* 主体 */ |
| | | #content { |
| | | padding-top: 25px; |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | iframe { |
| | | border-width: 0; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 导航栏 --> |
| | | <ul class="nav"> |
| | | <li><a id="comb" onclick="nav(this.id)" class="nav-select" href="#">组托</a></li> |
| | | <li><a id="stockIn" onclick="nav(this.id)" class="nav-unselect" href="#">入库</a></li> |
| | | <li><a id="stockOut" onclick="nav(this.id)" class="nav-unselect" href="#">出库</a></li> |
| | | </ul> |
| | | |
| | | <!-- 主体内容 --> |
| | | <iframe id="content" src="comb.html"></iframe> |
| | | |
| | | </body> |
| | | <script> |
| | | // 导航栏 |
| | | function nav(id) { |
| | | $('.nav-select').attr("class", "nav-unselect"); |
| | | $('#'+id).attr("class", "nav-select"); |
| | | $('#content').attr("src", id+".html"); |
| | | } |
| | | </script> |
| | | </html> |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <meta name="viewport" content="width=device-width, target-densitydpi=high-dpi, initial-scale=1.0, user-scalable=no"/> |
| | | <title>库存明细详情</title> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <style> |
| | | .form-box { |
| | | padding: 15px 5px 5px 5px; |
| | | font-size: 12px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .form-box span { |
| | | font-size: 12px; |
| | | display: inline-block; |
| | | text-align: right; |
| | | width: 50px; |
| | | } |
| | | .form-box input { |
| | | width: 120px; |
| | | margin-left: 10px; |
| | | padding-left: 5px; |
| | | height: 20px; |
| | | border: 1px solid #777777; |
| | | overflow:hidden; |
| | | white-space:nowrap; |
| | | text-overflow:ellipsis; |
| | | } |
| | | |
| | | .number-tool { |
| | | margin-left: 10px; |
| | | padding: 1px 0 1px 5px; |
| | | display: inline-block; |
| | | width: 120px; |
| | | } |
| | | .number-tool:after { |
| | | clear: both; |
| | | content: ""; |
| | | display: table; |
| | | } |
| | | .number-tool button { |
| | | background-color: #fff; |
| | | margin-top: 2px; |
| | | font-size: 13px; |
| | | height: 18px; |
| | | float: left; |
| | | width: 20px; |
| | | border: 1px solid #777777; |
| | | } |
| | | .number-tool input { |
| | | text-align: center; |
| | | height: 20px; |
| | | float: left; |
| | | margin: 0 5px; |
| | | width: 30px; |
| | | padding: 0; |
| | | } |
| | | |
| | | .form-button { |
| | | margin: 5px 10px 0 10px; |
| | | padding: 5px 15px; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="form-box"> |
| | | <div class="form-item"> |
| | | <span>库位号</span> |
| | | <input id="locNo" type="text" disabled="disabled"> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span>物料编码</span> |
| | | <input id="matnr" type="text" disabled="disabled"> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span>物料名称</span> |
| | | <input id="maktx" type="text" disabled="disabled"> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span style="vertical-align: middle">数量</span> |
| | | <div class="number-tool" style="vertical-align: middle"> |
| | | <button onclick="reduce()">-</button><input id="count" type="number"><button onclick="add()">+</button> |
| | | </div> |
| | | </div> |
| | | <button class="form-button" id="save" onclick="save()">保存</button> |
| | | <button class="form-button" id="remove" onclick="remove()">移除</button> |
| | | </div> |
| | | </body> |
| | | <script> |
| | | var countDom = $('#count'); |
| | | |
| | | function save() { |
| | | if (countDom.val() <= 1) { |
| | | alert("数量必须大于0") |
| | | return; |
| | | } |
| | | parent.updateTableData({ |
| | | locNo: $('#locNo').val(), |
| | | matnr: $('#matnr').val(), |
| | | maktx: $('#maktx').val(), |
| | | count: countDom.val() |
| | | }) |
| | | parent.layer.closeAll(); |
| | | } |
| | | |
| | | function remove() { |
| | | parent.removeTableData({ |
| | | locNo: $('#locNo').val(), |
| | | matnr: $('#matnr').val(), |
| | | }) |
| | | parent.layer.closeAll(); |
| | | } |
| | | |
| | | function add() { |
| | | countDom.val(Number(countDom.val()) + 1); |
| | | } |
| | | function reduce() { |
| | | if (countDom.val() <= 1) { |
| | | return; |
| | | } |
| | | countDom.val(countDom.val() - 1); |
| | | } |
| | | </script> |
| | | </html> |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <meta name="viewport" content="width=device-width, target-densitydpi=high-dpi, initial-scale=1.0, user-scalable=no"/> |
| | | <title>系统登录</title> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <script type="text/javascript" src="../../static/layui/layui.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js"></script> |
| | | <style> |
| | | html{ |
| | | height: 100%; |
| | | overflow: hidden; |
| | | } |
| | | body.login-bg { |
| | | color: #777; |
| | | height: 100%; |
| | | background-image: linear-gradient(to right, #ff9569 0%, #e92758 100%); |
| | | /*background-image: linear-gradient(-90deg, #29bdd9 0%, #276ace 100%);*/ |
| | | /*background: -webkit-linear-gradient(red, blue); !* Safari 5.1 - 6.0 *!;*/ |
| | | /*background-image: url("../static/image/login_bg.jpg");*/ |
| | | /*background-repeat: no-repeat;*/ |
| | | /*background-size: cover;*/ |
| | | /*background-position: top center;*/ |
| | | } |
| | | |
| | | #login-wrapper { |
| | | box-sizing:border-box; |
| | | background: #fff; |
| | | height: 100%; |
| | | padding: 60px 40px; |
| | | text-align: center; |
| | | overflow: hidden; |
| | | } |
| | | #login-wrapper h1 { |
| | | font-weight: bolder; |
| | | margin-bottom: 20px; |
| | | letter-spacing: 5px; |
| | | /*transform:scale(3);*/ |
| | | /*-webkit-transform:scale(3);*/ |
| | | /*-moz-transform:scale(3);*/ |
| | | } |
| | | .layui-form-item { |
| | | margin-bottom: 15px; |
| | | position: relative; |
| | | } |
| | | .layui-form-item .layui-input { |
| | | height: 30px; |
| | | padding-left: 20px; |
| | | font-size: 14px; |
| | | border: 1px solid #767676; |
| | | color: inherit; |
| | | border-radius: 3px; |
| | | transition: 0.3s; |
| | | } |
| | | .layui-input:hover, .layui-textarea:hover { |
| | | border-color: #0767aa !important; |
| | | border-width: 1.5px; |
| | | } |
| | | .login-submit { |
| | | margin-top: 20px; |
| | | } |
| | | #login-button { |
| | | background-color: #0767aa; |
| | | width: 50%; |
| | | font-size: 14px; |
| | | font-weight: bolder; |
| | | border-radius: 5px; |
| | | height: 40px; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body class="login-bg"> |
| | | |
| | | <div id="login-wrapper"> |
| | | <header> |
| | | <h1>系统登录</h1> |
| | | </header> |
| | | <div class="layui-form layadmin-user-login-body"> |
| | | <div class="layui-form-item"> |
| | | <input id="mobile" class="layui-input" type="text" name="mobile" lay-verify="mobile" placeholder="账号" autocomplete="off"> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <input id="password" class="layui-input" type="password" name="password" lay-verify="password" placeholder="密码" autocomplete="off"> |
| | | </div> |
| | | <!-- <div class="layui-form-item" style="text-align: right;padding-left: 3px;">--> |
| | | <!-- <input id="rememberPwd" style="vertical-align: middle" type="checkbox" lay-skin='primary' lay-filter="remPwd" title="记住密码" checked="checked">--> |
| | | <!-- </div>--> |
| | | </div> |
| | | <div class="layui-form-item login-submit"> |
| | | <button id="login-button" class="layui-btn layui-btn-fluid layui-btn-normal" lay-submit="" lay-filter="login">登 录</button> |
| | | </div> |
| | | </div> |
| | | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/js/tools/md5.js"></script> |
| | | <script type="text/javascript"> |
| | | |
| | | layui.use(['form','layer'],function () { |
| | | var form = layui.form, |
| | | layer = layui.layer, |
| | | $ = layui.jquery; |
| | | |
| | | form.on('submit(login)', function (data) { |
| | | var mobile = $("#mobile").val(); |
| | | if (mobile === "") { |
| | | alert("请输入手机号"); |
| | | return; |
| | | } |
| | | var password = $("#password").val(); |
| | | if (password === "") { |
| | | alert("请输入密码"); |
| | | return; |
| | | } |
| | | |
| | | var user = { |
| | | mobile: mobile, |
| | | password: hex_md5(password) |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/login.action", |
| | | data: user, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | localStorage.setItem("token", res.data.token); |
| | | localStorage.setItem("username", res.data.username); |
| | | window.location.href = "index.html"; |
| | | } else { |
| | | alert(res.msg); |
| | | } |
| | | } |
| | | }); |
| | | return false; |
| | | }); |
| | | |
| | | $('body').keydown(function () { |
| | | if (event.keyCode === 13) { |
| | | $("#login-button").click(); |
| | | } |
| | | }); |
| | | |
| | | }); |
| | | </script> |
| | | </html> |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <meta name="viewport" content="width=device-width, target-densitydpi=high-dpi, initial-scale=1.0, user-scalable=no"/> |
| | | <title>物料提取</title> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <style> |
| | | |
| | | .form-box { |
| | | padding: 15px 5px 5px 5px; |
| | | font-size: 12px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .form-box span { |
| | | font-size: 12px; |
| | | display: inline-block; |
| | | text-align: right; |
| | | width: 50px; |
| | | } |
| | | .form-box input { |
| | | width: 120px; |
| | | margin-left: 10px; |
| | | padding-left: 5px; |
| | | height: 20px; |
| | | border: 1px solid #777777; |
| | | overflow:hidden; |
| | | white-space:nowrap; |
| | | text-overflow:ellipsis; |
| | | } |
| | | #confirm { |
| | | margin-top: 10px; |
| | | padding: 5px 20px; |
| | | } |
| | | |
| | | .number-tool { |
| | | margin-left: 10px; |
| | | padding: 1px 0 1px 5px; |
| | | display: inline-block; |
| | | width: 120px; |
| | | } |
| | | .number-tool:after { |
| | | clear: both; |
| | | content: ""; |
| | | display: table; |
| | | } |
| | | .number-tool button { |
| | | background-color: #fff; |
| | | margin-top: 2px; |
| | | font-size: 13px; |
| | | height: 18px; |
| | | float: left; |
| | | width: 20px; |
| | | border: 1px solid #777777; |
| | | } |
| | | .number-tool input { |
| | | text-align: center; |
| | | height: 20px; |
| | | float: left; |
| | | margin: 0 5px; |
| | | width: 30px; |
| | | padding: 0; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | |
| | | <div class="form-box"> |
| | | <div class="form-item"> |
| | | <span>物料编码</span> |
| | | <input id="matNo" type="text" placeholder="扫码 / 输入" onkeyup="find(this)" autocomplete="off"> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span>物料名称</span> |
| | | <input id="matName" type="text" disabled="disabled"> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span>物料规格</span> |
| | | <input id="str2" type="text" disabled="disabled"> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span>单位</span> |
| | | <input id="str1" type="text" disabled="disabled"> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span style="vertical-align: middle">数量</span> |
| | | <div class="number-tool" style="vertical-align: middle"> |
| | | <button onclick="reduce()">-</button><input id="count" type="number"><button onclick="add()">+</button> |
| | | </div> |
| | | </div> |
| | | <button id="confirm" onclick="confirm()">提取</button> |
| | | </div> |
| | | |
| | | </body> |
| | | <script> |
| | | var countDom = $('#count'); |
| | | var initMatCount = 1; |
| | | var pageCurr; |
| | | |
| | | /** |
| | | * 根据物料编码查询物料详情 |
| | | */ |
| | | function find(el){ |
| | | if (isEmpty(el.value)) { |
| | | return; |
| | | } |
| | | $.ajax({ |
| | | url: baseUrl + "/matCode/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | id: el.value |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | if (res.data != null) { |
| | | $('#matName').val(res.data.matName); |
| | | $('#str1').val(res.data.str1); |
| | | $('#str2').val(res.data.str2); |
| | | countDom.focus().val(initMatCount) |
| | | } |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/pda"; |
| | | } else { |
| | | alert(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 提取 |
| | | */ |
| | | function confirm(){ |
| | | var data = { |
| | | matNo: $('#matNo').val(), |
| | | matName: $('#matName').val(), |
| | | count: countDom.val() |
| | | }; |
| | | parent.addTableData(data); |
| | | parent.layer.close(parent.matCodeLayerIdx); |
| | | } |
| | | |
| | | window.onload = function(){document.getElementById("matNo").focus();} |
| | | $(document).on('click','#confirm', function () { |
| | | }) |
| | | |
| | | $('body').keydown(function () { |
| | | if (event.keyCode === 13) { |
| | | $("#confirm").click(); |
| | | } |
| | | }); |
| | | |
| | | function add() { |
| | | countDom.val(Number(countDom.val()) + 1); |
| | | } |
| | | function reduce() { |
| | | if (countDom.val() <= initMatCount) { |
| | | return; |
| | | } |
| | | countDom.val(countDom.val() - 1); |
| | | } |
| | | |
| | | </script> |
| | | </html> |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <meta name="viewport" content="width=device-width, target-densitydpi=high-dpi, initial-scale=1.0, user-scalable=no"/> |
| | | <title>入库</title> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/pda.css" media="all"> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <style> |
| | | main { |
| | | height: 145px; |
| | | } |
| | | .site-list { |
| | | padding: 2px 0; |
| | | height: 22px; |
| | | margin-bottom: 5px; |
| | | } |
| | | .site-list label { |
| | | padding-right: 15px; |
| | | } |
| | | .site-list label span { |
| | | vertical-align: middle; |
| | | font-size: 13px; |
| | | } |
| | | |
| | | .cool-checkbox:checked { |
| | | background:#1673ff |
| | | } |
| | | .cool-checkbox { |
| | | width:15px; |
| | | height:15px; |
| | | background-color:#ffffff; |
| | | border:solid 1px #dddddd; |
| | | -webkit-border-radius:50%; |
| | | border-radius:50%; |
| | | font-size:15px; |
| | | margin:0 5px 0 0; |
| | | padding:0; |
| | | position:relative; |
| | | display:inline-block; |
| | | vertical-align:middle; |
| | | cursor:default; |
| | | -webkit-appearance:none; |
| | | -webkit-user-select:none; |
| | | user-select:none; |
| | | -webkit-transition:background-color ease 0.1s; |
| | | transition:background-color ease 0.1s; |
| | | } |
| | | .cool-checkbox:checked::after { |
| | | content:''; |
| | | top:3px; |
| | | left:3px; |
| | | position:absolute; |
| | | background:transparent; |
| | | border:#fff solid 2px; |
| | | border-top:none; |
| | | border-right:none; |
| | | height:3px; |
| | | width:6px; |
| | | -moz-transform:rotate(-45deg); |
| | | -ms-transform:rotate(-45deg); |
| | | -webkit-transform:rotate(-45deg); |
| | | transform:rotate(-45deg); |
| | | } |
| | | |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <!-- 头部 --> |
| | | <header> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">条码</label> |
| | | <input class="layui-input" type="text" id="code" placeholder="扫码 / 输入" autocomplete="off"> |
| | | </div> |
| | | <div style="margin: 5px 5px"> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-xs" onclick="getMat()"><i class="layui-icon">+</i>提取</button> |
| | | </div> |
| | | </header> |
| | | |
| | | <!-- 主体 --> |
| | | <main> |
| | | <table class="layui-table" id="chooseData" lay-filter="chooseData"></table> |
| | | </main> |
| | | <!-- 尾部 --> |
| | | <footer> |
| | | <!-- 入库口 --> |
| | | <div class="site-list"> |
| | | <span style="display: inline-block; margin:0 0 0 10px; font-size: 12px">入库口:</span> |
| | | </div> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-xs layui-btn-primary" onclick="reset()">重置</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-xs" onclick="pakIn()" style="margin-left: 20px">入库</button> |
| | | <span id="tips"></span> |
| | | </div> |
| | | </footer> |
| | | </body> |
| | | <script> |
| | | var tableIns; |
| | | window.onload = function(){ |
| | | document.getElementById("code").focus(); |
| | | getInBound(); |
| | | } |
| | | |
| | | layui.use(['table','laydate', 'form'], function() { |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var form = layui.form; |
| | | |
| | | tableIns = table.render({ |
| | | elem: '#chooseData', |
| | | data: [], |
| | | limit: 500, |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {fixed: 'left', align: 'center', field: 'count', title: '量', style:'color: blue', width:20}, |
| | | {field: 'matNo', align: 'center', title: '物料编码'}, |
| | | {field: 'matName', align: 'center', title: '物料名称'} |
| | | ]], |
| | | done: function (res, curr, count) { |
| | | } |
| | | }); |
| | | |
| | | }); |
| | | |
| | | // 获取入库口 |
| | | function getInBound(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/available/put/site", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'POST', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | var tpl = $("#inSitesTemplate").html(); |
| | | var template = Handlebars.compile(tpl); |
| | | var html = template(res); |
| | | $('.site-list').append(html); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/pda"; |
| | | }else { |
| | | tips("获取入库口失败", true) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 提取物料 |
| | | var matCodeLayerIdx; |
| | | function getMat() { |
| | | matCodeLayerIdx = layer.open({ |
| | | type: 2, |
| | | title: '物料', |
| | | shade: [0.3,'#000'], |
| | | area: ['90%', '90%'], |
| | | content: 'matQuery.html', |
| | | success: function(layero, index){ |
| | | $('.layui-layer-title').css('height', '20px').css('line-height', '20px').css('font-size', '12px').css('padding-left', '10px') |
| | | $('.layui-layer-setwin').css("top", '2px').css('right', '3px') |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // 添加表格数据 |
| | | var matData = []; |
| | | function addTableData(data) { |
| | | if (isEmpty(data.matName)){ |
| | | tips("提取失败"); |
| | | return; |
| | | } |
| | | let toPush = true; |
| | | for (var j=0;j<matData.length;j++){ |
| | | if (data.matNo === matData[j].matNo) { |
| | | matData[j].count = Number(matData[j].count) + Number(data.count); |
| | | toPush = false; |
| | | } |
| | | } |
| | | if (toPush) { |
| | | matData.push(data); |
| | | } |
| | | tips("提取成功"); |
| | | tableIns.reload({data: matData}); |
| | | } |
| | | |
| | | // 重置 |
| | | function reset() { |
| | | $('#code').val(""); |
| | | matData = []; |
| | | tableIns.reload({data: matData}); |
| | | $('input:radio[name="site"]').prop('checked',false); |
| | | tips(""); |
| | | } |
| | | |
| | | // 入库 |
| | | function pakIn() { |
| | | let barcode = $('#code').val(); |
| | | if (isEmpty(barcode)) { |
| | | tips("托盘条码为空", true); |
| | | document.getElementById("code").focus(); |
| | | return; |
| | | } |
| | | if (matData.length === 0) { |
| | | tips("请提取物料", true); |
| | | return; |
| | | } |
| | | let site = $('input:radio[name="site"]:checked').next("span").html(); |
| | | if (null === site || undefined === site) { |
| | | tips("请选择入库口", true); |
| | | return; |
| | | } |
| | | $.ajax({ |
| | | url: baseUrl+"/full/store/put/start", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify({ |
| | | barcode: barcode, |
| | | devpNo: site, |
| | | list: matData |
| | | }), |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | reset(); |
| | | tips("启动入库成功") |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/pda"; |
| | | } else { |
| | | tips(res.msg, true) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 提示信息 |
| | | * @param msg 提示内容 |
| | | * @param warn true:红色字体 |
| | | */ |
| | | function tips(msg, warn) { |
| | | let tips = $('#tips'); |
| | | tips.html(msg); |
| | | tips.css("color", warn?"red":'#666'); |
| | | } |
| | | </script> |
| | | <script type="text/template" id="inSitesTemplate"> |
| | | {{#each data}} |
| | | <label><input class="cool-checkbox" type="radio" name="site"><span>{{this}}</span></label> |
| | | {{/each}} |
| | | </script> |
| | | </html> |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <meta name="viewport" content="width=device-width, target-densitydpi=high-dpi, initial-scale=1.0, user-scalable=no"/> |
| | | <title>出库</title> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <style> |
| | | * { |
| | | font-family: microsoft yahei,serif; |
| | | margin: 0; |
| | | padding: 0; |
| | | box-sizing: border-box; |
| | | -webkit-box-sizing: border-box; |
| | | -moz-box-sizing: border-box; |
| | | font-size: 11px; |
| | | } |
| | | html { |
| | | height: 100%; |
| | | background-color: #f1f1f1; |
| | | padding: 5px; |
| | | } |
| | | body { |
| | | height: 100%; |
| | | background-color: #fff; |
| | | border-radius: 5px; |
| | | box-shadow: 0 0 3px rgba(0,0,0,.3); |
| | | padding: 2px 5px; |
| | | position: relative; |
| | | } |
| | | /* 头部 */ |
| | | header { |
| | | padding: 5px 0; |
| | | } |
| | | .layui-input-inline { |
| | | margin-bottom: 5px; |
| | | } |
| | | .layui-form-label { |
| | | width: initial; |
| | | padding: 2px 10px; |
| | | } |
| | | .layui-input { |
| | | width: 75%; |
| | | height: 25px; |
| | | margin-right: 0; |
| | | } |
| | | /* layer */ |
| | | .layui-layer-title { |
| | | font-size: 11px; |
| | | height: 20px; |
| | | line-height: 20px; |
| | | } |
| | | /* 主体 */ |
| | | main { |
| | | height: 150px; |
| | | overflow: auto; |
| | | } |
| | | .layui-table, .layui-table-view { |
| | | margin: 0; |
| | | } |
| | | .layui-table-view .layui-table td, .layui-table-view .layui-table th { |
| | | padding: 0; |
| | | } |
| | | .layui-table-cell { |
| | | height: 22px; |
| | | line-height: 22px; |
| | | padding: 0; |
| | | } |
| | | .layui-table-grid-down { |
| | | display: none; |
| | | } |
| | | .layui-form-checkbox[lay-skin=primary] { |
| | | height: 15px; |
| | | width: 15px; |
| | | } |
| | | .layui-table-view .layui-form-checkbox[lay-skin=primary] i { |
| | | height: 15px; |
| | | width: 15px; |
| | | } |
| | | /* 尾部 */ |
| | | footer { |
| | | position: absolute; |
| | | bottom: 5px; |
| | | width: 100%; |
| | | } |
| | | |
| | | .site-list { |
| | | padding: 2px 0; |
| | | height: 22px; |
| | | margin-bottom: 5px; |
| | | } |
| | | .site-list label { |
| | | padding-right: 15px; |
| | | } |
| | | .site-list label span { |
| | | vertical-align: middle; |
| | | font-size: 13px; |
| | | } |
| | | |
| | | .cool-checkbox:checked { |
| | | background:#1673ff |
| | | } |
| | | .cool-checkbox { |
| | | width:15px; |
| | | height:15px; |
| | | background-color:#ffffff; |
| | | border:solid 1px #dddddd; |
| | | -webkit-border-radius:50%; |
| | | border-radius:50%; |
| | | font-size:15px; |
| | | margin:0 5px 0 0; |
| | | padding:0; |
| | | position:relative; |
| | | display:inline-block; |
| | | vertical-align:middle; |
| | | cursor:default; |
| | | -webkit-appearance:none; |
| | | -webkit-user-select:none; |
| | | user-select:none; |
| | | -webkit-transition:background-color ease 0.1s; |
| | | transition:background-color ease 0.1s; |
| | | } |
| | | .cool-checkbox:checked::after { |
| | | content:''; |
| | | top:3px; |
| | | left:3px; |
| | | position:absolute; |
| | | background:transparent; |
| | | border:#fff solid 2px; |
| | | border-top:none; |
| | | border-right:none; |
| | | height:3px; |
| | | width:6px; |
| | | -moz-transform:rotate(-45deg); |
| | | -ms-transform:rotate(-45deg); |
| | | -webkit-transform:rotate(-45deg); |
| | | transform:rotate(-45deg); |
| | | } |
| | | |
| | | .layui-btn-container .layui-btn { |
| | | margin-left: 10px; |
| | | margin-bottom: 2px; |
| | | } |
| | | #tips { |
| | | display: inline-block; |
| | | width: 90px; |
| | | color: #666; |
| | | margin-left: 5px; |
| | | margin-bottom: 5px; |
| | | vertical-align: middle; |
| | | overflow:hidden; |
| | | white-space:nowrap; |
| | | text-overflow:ellipsis; |
| | | } |
| | | |
| | | .layui-btn-primary:hover { |
| | | border-color: #C9C9C9 |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <!-- 头部 --> |
| | | <header> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">库位</label> |
| | | <input class="layui-input" type="text" id="locNo" onkeyup="findByLocNo(this)" autocomplete="off"> |
| | | </div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">物料</label> |
| | | <input class="layui-input" type="text" id="matNo" onkeyup="findByMatNo(this)" autocomplete="off"> |
| | | </div> |
| | | </header> |
| | | <!-- 主体 --> |
| | | <main> |
| | | <table class="layui-table" id="dataByLoc" lay-filter="dataByLoc"></table> |
| | | </main> |
| | | <!-- 尾部 --> |
| | | <footer> |
| | | <!-- 出库口 --> |
| | | <div class="site-list"> |
| | | <span style="display: inline-block; padding:0 0 0 10px; font-size: 12px;">出库口:</span> |
| | | </div> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-xs layui-btn-primary" onclick="reset()">重置</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-xs" onclick="pakOut()" style="margin-left: 20px">出库</button> |
| | | <span id="tips"></span> |
| | | </div> |
| | | </footer> |
| | | </body> |
| | | <script> |
| | | |
| | | window.onload = function(){ |
| | | document.getElementById("locNo").focus(); |
| | | getOutBound(); |
| | | } |
| | | |
| | | /** |
| | | * 根据库位号查找库存明细 |
| | | */ |
| | | function findByLocNo(el){ |
| | | if (isEmpty(el.value)) { |
| | | return; |
| | | } |
| | | $("#matNo").val(""); |
| | | find(el.value, null); |
| | | } |
| | | |
| | | /** |
| | | * 根据物料号查找库存明细 |
| | | */ |
| | | function findByMatNo(el){ |
| | | if (isEmpty(el.value)) { |
| | | return; |
| | | } |
| | | $("#locNo").val(""); |
| | | find(null, el.value); |
| | | } |
| | | function find(locNo, matNo) { |
| | | $.ajax({ |
| | | url: baseUrl + "/mobile/locDetl", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | locNo: locNo, |
| | | matNo: matNo |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | if (res.data != null) { |
| | | locDetlData = res.data; |
| | | tableIns.reload({data: locDetlData}); |
| | | } |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/pda"; |
| | | } else { |
| | | locDetlData = []; |
| | | tableIns.reload({data: locDetlData}); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 表格 |
| | | var locDetlData = []; |
| | | var tableIns; |
| | | layui.use(['table','laydate', 'form'], function() { |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var form = layui.form; |
| | | |
| | | tableIns = table.render({ |
| | | id: 'tableIdx', |
| | | elem: '#dataByLoc', |
| | | data: [], |
| | | limit: 500, |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {type: 'checkbox', fixed: 'left', width:30}, |
| | | {field: 'count', align: 'center', title: '量', event: 'detail', style:'color: blue', width:30}, |
| | | {field: 'matnr', align: 'center', title: '编码', event: 'detail'}, |
| | | {field: 'maktx', align: 'center', title: '名称', event: 'detail'}, |
| | | {field: 'locNo', align: 'center', title: '库位', event: 'detail'} |
| | | ]], |
| | | done: function (res, curr, count) { |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(dataByLoc)', function(obj) { |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | // 详情 |
| | | case 'detail': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '库存明细', |
| | | shade: [0.3,'#000'], |
| | | area: ['90%', '77%'], |
| | | content: 'locDetlIframe.html', |
| | | success: function(layero, index){ |
| | | // 设置弹窗样式 |
| | | $('.layui-layer-title').css('height', '20px').css('line-height', '20px').css('font-size', '12px').css('padding-left', '10px') |
| | | $('.layui-layer-setwin').css("top", '2px').css('right', '3px'); |
| | | // 注入值 |
| | | let el = layer.getChildFrame('.form-box', index); |
| | | for (var val in data) { |
| | | var find = el.find(":input[id='" + val + "']"); |
| | | find.val(data[val]); |
| | | } |
| | | } |
| | | }); |
| | | break; |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | // 获取出库口 |
| | | function getOutBound(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/available/take/site", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'POST', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | var tpl = $("#outSitesTemplate").html(); |
| | | var template = Handlebars.compile(tpl); |
| | | var html = template(res); |
| | | $('.site-list').append(html); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/pda"; |
| | | }else { |
| | | tips("获取出库口失败", true) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 出库 |
| | | function pakOut() { |
| | | var tableData = layui.table.checkStatus('tableIdx').data; |
| | | if (tableData.length === 0) { |
| | | tips("请选择物料", true); |
| | | document.getElementById("locNo").focus(); |
| | | return; |
| | | } |
| | | let site = $('input:radio[name="site"]:checked').next("span").html(); |
| | | if (null === site || undefined === site) { |
| | | tips("请选择出库口", true); |
| | | return; |
| | | } |
| | | $.ajax({ |
| | | url: baseUrl+"/plate/out/start", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify({ |
| | | outSite: site, |
| | | locDetls: tableData |
| | | }), |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | reset(); |
| | | tips("启动出库成功") |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/pda"; |
| | | } else { |
| | | tips(res.msg, true) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 修改表格数据 |
| | | function updateTableData(data) { |
| | | for (var i=0;i<locDetlData.length;i++) { |
| | | if (data.matnr === locDetlData[i].matnr && data.locNo === locDetlData[i].locNo) { |
| | | locDetlData[i].count = data.count; |
| | | break |
| | | } |
| | | } |
| | | tableIns.reload({data: locDetlData}); |
| | | } |
| | | |
| | | // 删除表格行 |
| | | function removeTableData(data) { |
| | | for (var i = locDetlData.length - 1; i >= 0; i--) { |
| | | if (locDetlData[i].locNo === data.locNo && locDetlData[i].matnr === data.matnr) { |
| | | locDetlData.splice(i, 1); |
| | | } |
| | | } |
| | | tableIns.reload({data: locDetlData}); |
| | | } |
| | | |
| | | // 重置 |
| | | function reset() { |
| | | $("#matNo").val(""); |
| | | $("#locNo").val(""); |
| | | locDetlData = []; |
| | | tableIns.reload({data: locDetlData}); |
| | | $('input:radio[name="site"]').prop('checked',false); |
| | | tips(""); |
| | | } |
| | | |
| | | /** |
| | | * 提示信息 |
| | | * @param msg 提示内容 |
| | | * @param warn true:红色字体 |
| | | */ |
| | | function tips(msg, warn) { |
| | | let tips = $('#tips'); |
| | | tips.html(msg); |
| | | tips.css("color", warn?"red":'#666'); |
| | | } |
| | | </script> |
| | | <script type="text/template" id="outSitesTemplate"> |
| | | {{#each data}} |
| | | <label><input class="cool-checkbox" type="radio" name="site"><span>{{this}}</span></label> |
| | | {{/each}} |
| | | </script> |
| | | </html> |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <meta name="viewport" content="width=device-width, target-densitydpi=high-dpi, initial-scale=1.0, user-scalable=no"/> |
| | | <title>浙江中扬储存设备有限公司</title> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <style> |
| | | * { |
| | | font-size: 12px; |
| | | } |
| | | html { |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .mat-msg { |
| | | overflow-y: scroll; |
| | | margin-top: 10px; |
| | | height: 115px; |
| | | background-color: #fff; |
| | | border-radius: 5px; |
| | | border: 1px solid #c2c2c2; |
| | | } |
| | | #mat-msg-table { |
| | | font-size: 12px; |
| | | border-collapse: collapse; |
| | | margin: 0 auto; |
| | | text-align: center; |
| | | } |
| | | #tthead { |
| | | padding-top: 4px; |
| | | background-color: #ececec; |
| | | height: 18px; |
| | | } |
| | | #tthead span { |
| | | border-right: 1px solid #b3b3b3; |
| | | float: left; |
| | | width: 24%; |
| | | } |
| | | #ttbody { |
| | | padding-top: 4px; |
| | | } |
| | | #ttbody div { |
| | | content: ""; |
| | | clear: both; |
| | | display: table; |
| | | } |
| | | #ttbody span { |
| | | border-right: 1px solid #b3b3b3; |
| | | float: left; |
| | | width: 22%; |
| | | overflow:hidden; |
| | | white-space:nowrap; |
| | | text-overflow:ellipsis; |
| | | } |
| | | |
| | | #btn-con { |
| | | padding-left: 10px; |
| | | position: absolute; |
| | | bottom: 10px; |
| | | width: 100%; |
| | | } |
| | | #btn-con button { |
| | | display: inline-block; |
| | | vertical-align: middle; |
| | | } |
| | | #tips { |
| | | font-size: 12px; |
| | | margin-top: 2px; |
| | | margin-left: 10px; |
| | | display: inline-block; |
| | | vertical-align: middle; |
| | | width: 90px; |
| | | overflow:hidden; |
| | | white-space:nowrap; |
| | | text-overflow:ellipsis; |
| | | } |
| | | |
| | | /* 详情 */ |
| | | .form-box { |
| | | margin-top: 10px; |
| | | padding: 15px 0 10px 0; |
| | | text-align: center; |
| | | border: 1px solid #BBBBBB; |
| | | } |
| | | |
| | | .form-item { |
| | | margin-bottom: 5px; |
| | | } |
| | | .form-box span { |
| | | } |
| | | .form-box input { |
| | | overflow:hidden; |
| | | white-space:nowrap; |
| | | text-overflow:ellipsis; |
| | | } |
| | | .form-count button { |
| | | width: 25px; |
| | | height: 20px; |
| | | } |
| | | .form-count input { |
| | | margin: 0 7px; |
| | | width: 40px; |
| | | } |
| | | .form-btn-con { |
| | | margin-top: 10px; |
| | | } |
| | | .form-btn-con button { |
| | | padding: 4px 0; |
| | | height: 25px; |
| | | margin: 0 15px; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <button onclick="help()" style="padding: 0 3px; position: absolute; top: 0%; right: 0%">?</button> |
| | | <div> |
| | | <span>条码</span> |
| | | <input type="text" id="code"> |
| | | </div> |
| | | <div> |
| | | <span>物料</span> |
| | | <input type="text" id="matNo" onkeyup="find(this)" autocomplete="off"> |
| | | <button onclick="find()">查询</button> |
| | | </div> |
| | | |
| | | <div class="mat-msg" id="mat-msg-id"> |
| | | <div id="mat-msg-table"> |
| | | <div id="tthead"> |
| | | <span>编码</span> |
| | | <span>名称</span> |
| | | <span>单位</span> |
| | | <span>数量</span> |
| | | </div> |
| | | <div id="ttbody"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="btn-con"> |
| | | <button style="margin-right: 20px" onclick="reset()">重置</button> |
| | | <button id="comb" onclick="comb()">组托</button> |
| | | <span id="tips"></span> |
| | | </div> |
| | | |
| | | <!-- 详情 --> |
| | | <div class="form-box" id="mat-detail"> |
| | | <div class="form-item form-count"> |
| | | <span style="margin-right: 10px">数量</span> |
| | | <button onclick="reduce()">-</button><input id="count" type="number" style="text-align: center"><button onclick="add()">+</button> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span>名称</span> |
| | | <input id="matName" type="text" disabled="disabled" style="background-color: #ececec;color: #000"> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span>单位</span> |
| | | <input id="str1" type="text" disabled="disabled" style="background-color: #ececec;color: #000; text-align: center;"> |
| | | </div> |
| | | <div class="form-item form-btn-con"> |
| | | <button id="confirm" onclick="confirm()">提取</button> |
| | | <button id="cancel" onclick="cancel()" style="background-color: #fff">取消</button> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </body> |
| | | <script> |
| | | |
| | | var matMsgTableBlankRows = 0; // 空白行数 |
| | | var matData = []; // 表格数据 |
| | | var code = document.getElementById("code") |
| | | var matNo = document.getElementById("matNo") |
| | | var matMsg = document.getElementById("mat-msg-id"); |
| | | var matMsgTable = document.getElementById("mat-msg-table"); |
| | | var tthead = document.getElementById("tthead"); |
| | | var ttbody = document.getElementById("ttbody"); |
| | | var btnCon = document.getElementById("btn-con"); |
| | | var tipDom = document.getElementById("tips"); |
| | | var combBtn = document.getElementById("comb"); |
| | | |
| | | var matDetail = document.getElementById("mat-detail"); |
| | | var matName = document.getElementById("matName"); |
| | | var str1 = document.getElementById("str1"); |
| | | var count = document.getElementById("count"); |
| | | var confirmBtn = document.getElementById("confirm"); |
| | | |
| | | matDetail.style.display = 'none'; |
| | | var initMatCount = 1; |
| | | window.onload = function(){matMsg.focus();} |
| | | |
| | | // 查询物流 |
| | | function find(el) { |
| | | httpRequest({ |
| | | httpUrl: baseUrl + "/matCode/auth", |
| | | type: 'post', |
| | | headers: [{token: getCookie('token')}], |
| | | data: { |
| | | id: matNo.value |
| | | }, |
| | | }, function (res) { |
| | | if (res.code === 200) { |
| | | if (res.data != null) { |
| | | // 样式 |
| | | matMsg.style.display = 'none'; |
| | | btnCon.style.display = 'none'; |
| | | matDetail.style.display = 'block'; |
| | | // 填充数据 |
| | | matName.value = res.data.matName; |
| | | str1.value = res.data.str1; |
| | | |
| | | // count.focus(); |
| | | count.value = initMatCount; |
| | | confirmBtn.focus(); |
| | | } else { |
| | | matMsg.style.display = 'block'; |
| | | btnCon.style.display = 'block'; |
| | | matDetail.style.display = 'none'; |
| | | } |
| | | } else if (res.code === 403) { |
| | | window.location.href = baseUrl + "/pda/ce"; |
| | | } else { |
| | | tips(res.msg, true) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 组托 |
| | | function comb() { |
| | | var barcode = code.value; |
| | | if (isEmpty(barcode)) { |
| | | tips("请输入托盘条码", true); |
| | | // document.getElementById("code").focus(); |
| | | return; |
| | | } |
| | | if (barcode.length !== 8) { |
| | | tips("条码必须为8位", true); |
| | | // document.getElementById("code").focus(); |
| | | return; |
| | | } |
| | | if (matData.length === 0) { |
| | | tips("请提取物料", true); |
| | | return; |
| | | } |
| | | httpRequest({ |
| | | httpUrl: baseUrl+"/mobile/comb/auth", |
| | | type: 'post', |
| | | headers: [ |
| | | {token: getCookie('token')} |
| | | ,{'Content-type':'application/json;charset=UTF-8',} |
| | | ], |
| | | data: JSON.stringify({ |
| | | barcode: barcode, |
| | | combMats: matData |
| | | }) , |
| | | }, function (res) { |
| | | if (res.code === 200) { |
| | | reset(); |
| | | tips("组托成功") |
| | | } else if (res.code === 403) { |
| | | window.location.href = baseUrl + "/pda/ce"; |
| | | } else { |
| | | tips(res.msg, true) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // initCrnMsgTable(); |
| | | function initCrnMsgTable(row) { |
| | | var line; |
| | | if (row === undefined){ |
| | | var one = 15; |
| | | var total = matMsg.offsetHeight; |
| | | var count = total / one; |
| | | count = parseInt(count) - 1; |
| | | matMsgTableBlankRows = count; |
| | | line = count; |
| | | } else { |
| | | line = row; |
| | | } |
| | | var html = ""; |
| | | for (var i = 0; i < line; i ++){ |
| | | html += " <div>\n" + |
| | | " <span></span>\n" + |
| | | " <span></span>\n" + |
| | | " <span></span>\n" + |
| | | " <span></span>\n" + |
| | | " </div>\n"; |
| | | } |
| | | ttbody.innerHTML = html; |
| | | } |
| | | |
| | | // 添加表格数据 |
| | | function addTableData(data) { |
| | | if (isEmpty(data.matName)){ |
| | | tips("提取失败"); |
| | | return; |
| | | } |
| | | var toPush = true; |
| | | for (var j=0;j<matData.length;j++){ |
| | | if (data.matNo === matData[j].matNo) { |
| | | matData[j].count = Number(matData[j].count) + Number(data.count); |
| | | toPush = false; |
| | | } |
| | | } |
| | | if (toPush) { |
| | | matData.push(data); |
| | | } |
| | | var html = ""; |
| | | for (var i=0;i<matData.length;i++) { |
| | | html += " <div class='table-data'>\n" + |
| | | " <span>" + matData[i].matNo + "</span>\n" + |
| | | " <span>" + matData[i].matName + "</span>\n" + |
| | | " <span>" + matData[i].str1 + "</span>\n" + |
| | | " <span>" + matData[i].count + "</span>\n" + |
| | | " </div>\n"; |
| | | } |
| | | |
| | | ttbody.innerHTML = html; |
| | | } |
| | | |
| | | // 重置 |
| | | function reset() { |
| | | code.value = ""; |
| | | matNo.value = ""; |
| | | cancel(); |
| | | while(ttbody.hasChildNodes()) { |
| | | ttbody.removeChild(ttbody.firstChild); |
| | | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 提示信息 |
| | | * @param msg 提示内容 |
| | | * @param warn true:红色字体 |
| | | */ |
| | | function tips(msg, warn) { |
| | | tipDom.innerText = msg; |
| | | if (warn) { |
| | | tipDom.style.color = "red"; |
| | | } else { |
| | | tipDom.style.color = "#000"; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | // 提取 |
| | | function confirm() { |
| | | addTableData({ |
| | | matNo: matNo.value, |
| | | matName: matName.value, |
| | | str1: str1.value, |
| | | count: count.value |
| | | }) |
| | | cancel(); |
| | | tips("提取成功"); |
| | | } |
| | | // 取消 |
| | | function cancel() { |
| | | matNo.value = ""; |
| | | matName.value = ""; |
| | | str1.value = ""; |
| | | count.value = initMatCount; |
| | | matMsg.style.display = 'block'; |
| | | btnCon.style.display = 'block'; |
| | | matDetail.style.display = 'none'; |
| | | tips(""); |
| | | } |
| | | |
| | | function add() { |
| | | count.value = Number(count.value) + 1; |
| | | } |
| | | function reduce() { |
| | | if (count.value <= initMatCount) { |
| | | return; |
| | | } |
| | | count.value = count.value - 1; |
| | | } |
| | | |
| | | //获取 cookie |
| | | function getCookie(objName){//获取指定名称的cookie的值 |
| | | //多个cookie 保存的时候是以 ;空格 分开的 |
| | | var arrStr = document.cookie.split("; "); |
| | | for (var i = 0; i < arrStr.length; i++) { |
| | | var temp = arrStr[i].split("="); |
| | | if (temp[0] === objName){ |
| | | return decodeURIComponent(temp[1]); |
| | | }else{ |
| | | return ""; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | function httpRequest(paramObj,fun,errFun) { |
| | | var xmlhttp = null; |
| | | /*创建XMLHttpRequest对象, |
| | | *老版本的 Internet Explorer(IE5 和 IE6)使用 ActiveX 对象:new ActiveXObject("Microsoft.XMLHTTP") |
| | | * */ |
| | | if(window.XMLHttpRequest) { |
| | | xmlhttp = new XMLHttpRequest(); |
| | | }else if(window.ActiveXObject) { |
| | | xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); |
| | | } |
| | | /*判断是否支持请求*/ |
| | | if(xmlhttp == null) { |
| | | alert('你的浏览器不支持XMLHttp'); |
| | | return; |
| | | } |
| | | /*请求方式,并且转换为大写*/ |
| | | var httpType = (paramObj.type || 'GET').toUpperCase(); |
| | | /*数据类型*/ |
| | | var dataType = paramObj.dataType || 'json'; |
| | | /*请求接口*/ |
| | | var httpUrl = paramObj.httpUrl || ''; |
| | | /*是否异步请求*/ |
| | | var async = paramObj.async || true; |
| | | /*请求头参数*/ |
| | | var headerData = paramObj.headers || []; |
| | | /*请求参数--post请求参数格式为:foo=bar&lorem=ipsum*/ |
| | | var paramData = paramObj.data || []; |
| | | var requestData = ''; |
| | | for(var name in paramData) { |
| | | requestData += name + '='+ paramData[name] + '&'; |
| | | } |
| | | requestData = requestData === '' ? '' : requestData.substring(0,requestData.length - 1); |
| | | /*请求接收*/ |
| | | xmlhttp.onreadystatechange = function() { |
| | | if(xmlhttp.readyState === 4 && xmlhttp.status === 200) { |
| | | /*成功回调函数*/ |
| | | fun(JSON.parse(xmlhttp.responseText)); |
| | | }else{ |
| | | /*失败回调函数*/ |
| | | errFun; |
| | | } |
| | | } |
| | | |
| | | /*接口连接,先判断连接类型是post还是get*/ |
| | | if(httpType === 'GET') { |
| | | xmlhttp.open("GET",httpUrl,async); |
| | | xmlhttp.send(null); |
| | | }else if(httpType === 'POST'){ |
| | | xmlhttp.open("POST",httpUrl,async); |
| | | //发送合适的请求头信息 |
| | | var defaultContentType = true; |
| | | for (var i=0;i<headerData.length;i++) { |
| | | for(var key in headerData[i]) { |
| | | if (key === "Content-type") { |
| | | defaultContentType = false; |
| | | } |
| | | xmlhttp.setRequestHeader(key, headerData[i][key]); |
| | | } |
| | | } |
| | | if (defaultContentType) { |
| | | xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); |
| | | } |
| | | xmlhttp.send(defaultContentType?requestData:paramData); |
| | | } |
| | | } |
| | | |
| | | document.onkeyup = function (e) { |
| | | if (window.event)//如果window.event对象存在,就以此事件对象为准 |
| | | e = window.event; |
| | | var key = e.charCode || e.keyCode; |
| | | if (key === 112) { |
| | | code.focus(); |
| | | } else if (key === 113) { |
| | | matNo.focus(); |
| | | } else if (key === 114) { |
| | | combBtn.focus(); |
| | | } else if (key === 13) { |
| | | confirmBtn.focus(); |
| | | } |
| | | } |
| | | |
| | | document.onkeydown = function (e) { |
| | | if (window.event)//如果window.event对象存在,就以此事件对象为准 |
| | | e = window.event; |
| | | var key = e.charCode || e.keyCode; |
| | | if (key === 114) { |
| | | comb() |
| | | } |
| | | } |
| | | |
| | | function help() { |
| | | window.alert("① 按F1输入条码\n" + |
| | | "② 按F2输入物料号,按ENTER查询,选择数量后提取\n" + |
| | | "③ 按F3开始组托\n" + |
| | | "其它:按F5刷新页面"); |
| | | } |
| | | </script> |
| | | </html> |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <meta name="viewport" content="width=device-width, target-densitydpi=high-dpi, initial-scale=1.0, user-scalable=no"/> |
| | | <title>浙江中扬储存设备有限公司</title> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <style> |
| | | html { |
| | | background-color: #fff; |
| | | } |
| | | body { |
| | | text-align: center; |
| | | padding: 10px 30px; |
| | | } |
| | | .login-form { |
| | | text-align: left; |
| | | } |
| | | |
| | | .login-form input { |
| | | display: block; |
| | | } |
| | | .login-form button { |
| | | display: block; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <h2>系统登录</h2> |
| | | <div class="login-form"> |
| | | <div> |
| | | <span>账号</span> |
| | | <input type="text" id="mobile" value="super"> |
| | | </div> |
| | | <div style="margin-top: 5px"> |
| | | <span>密码</span> |
| | | <input type="password" id="password" value="xltys1995"> |
| | | </div> |
| | | <div style="margin-top: 8px;height: 20px;"> |
| | | <button id="login" onclick="login()" style="padding: 5px 3px 0 3px">登录</button> |
| | | </div> |
| | | |
| | | </div> |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/js/tools/md5.js"></script> |
| | | <script type="text/javascript"> |
| | | document.onkeyup = function (e) { |
| | | if (window.event)//如果window.event对象存在,就以此事件对象为准 |
| | | e = window.event; |
| | | var code = e.charCode || e.keyCode; |
| | | if (code === 13) { |
| | | login() |
| | | } |
| | | } |
| | | document.onkeydown = function (e) { |
| | | if (window.event)//如果window.event对象存在,就以此事件对象为准 |
| | | e = window.event; |
| | | var code = e.charCode || e.keyCode; |
| | | if (code === 13) { |
| | | document.getElementById("login"); |
| | | } |
| | | } |
| | | function login(){ |
| | | httpRequest({ |
| | | httpUrl: baseUrl+"/login.action", |
| | | type: 'post', |
| | | data: { |
| | | mobile: document.getElementById('mobile').value, |
| | | password: hex_md5(document.getElementById('password').value) |
| | | } |
| | | }, function (res) { |
| | | if (res.code === 200) { |
| | | // localStorage.setItem("token", res.data.token); |
| | | // localStorage.setItem("username", res.data.username); |
| | | setCookie("token", res.data.token); |
| | | window.location.href = "index.html"; |
| | | } else { |
| | | alert(res.msg); |
| | | } |
| | | |
| | | }) |
| | | } |
| | | |
| | | // 设置cookie |
| | | function setCookie(objName, objValue){//添加cookie |
| | | var str = objName + "=" + encodeURIComponent(objValue); |
| | | // if (objHours > 0) {//为0时不设定过期时间,浏览器关闭时cookie自动消失 |
| | | // var date = new Date(); |
| | | // var ms = objHours * 3600 * 1000; |
| | | // date.setTime(date.getTime() + ms); |
| | | // str += "; expires=" + date.toUTCString(); |
| | | // } |
| | | str += "; path=/"; |
| | | document.cookie = str; |
| | | } |
| | | |
| | | function httpRequest(paramObj,fun,errFun) { |
| | | var xmlhttp = null; |
| | | /*创建XMLHttpRequest对象, |
| | | *老版本的 Internet Explorer(IE5 和 IE6)使用 ActiveX 对象:new ActiveXObject("Microsoft.XMLHTTP") |
| | | * */ |
| | | if(window.XMLHttpRequest) { |
| | | xmlhttp = new XMLHttpRequest(); |
| | | }else if(window.ActiveXObject) { |
| | | xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); |
| | | } |
| | | /*判断是否支持请求*/ |
| | | if(xmlhttp == null) { |
| | | alert('你的浏览器不支持XMLHttp'); |
| | | return; |
| | | } |
| | | /*请求方式,并且转换为大写*/ |
| | | var httpType = (paramObj.type || 'GET').toUpperCase(); |
| | | /*数据类型*/ |
| | | var dataType = paramObj.dataType || 'json'; |
| | | /*请求接口*/ |
| | | var httpUrl = paramObj.httpUrl || ''; |
| | | /*是否异步请求*/ |
| | | var async = paramObj.async || true; |
| | | /*请求参数--post请求参数格式为:foo=bar&lorem=ipsum*/ |
| | | var paramData = paramObj.data || []; |
| | | var requestData = ''; |
| | | for(var name in paramData) { |
| | | requestData += name + '='+ paramData[name] + '&'; |
| | | } |
| | | requestData = requestData === '' ? '' : requestData.substring(0,requestData.length - 1); |
| | | |
| | | /*请求接收*/ |
| | | xmlhttp.onreadystatechange = function() { |
| | | if(xmlhttp.readyState === 4 && xmlhttp.status === 200) { |
| | | /*成功回调函数*/ |
| | | fun(JSON.parse(xmlhttp.responseText)); |
| | | }else{ |
| | | /*失败回调函数*/ |
| | | errFun; |
| | | } |
| | | } |
| | | |
| | | /*接口连接,先判断连接类型是post还是get*/ |
| | | if(httpType === 'GET') { |
| | | xmlhttp.open("GET",httpUrl,async); |
| | | xmlhttp.send(null); |
| | | }else if(httpType === 'POST'){ |
| | | xmlhttp.open("POST",httpUrl,async); |
| | | //发送合适的请求头信息 |
| | | xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); |
| | | xmlhttp.send(requestData); |
| | | } |
| | | } |
| | | </script> |
| | | </html> |
| | |
| | | </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">导出</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> |
| | | </div> |
| | | </script> |
| | | |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/print.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/optimize.css" media="all"> |
| | | <style> |
| | | .btn-tray { |
| | | display: none; |
| | | } |
| | | |
| | | #print-windows .layui-form { |
| | | padding: 25px 30px 0 0; |
| | | } |
| | | #print-windows .layui-form-label { |
| | | padding: 8px 15px; |
| | | box-sizing: content-box; |
| | | -webkit-box-sizing: content-box; |
| | | } |
| | | #print-windows .layui-form-required:before { |
| | | content: "*"; |
| | | display: inline-block; |
| | | font-family: SimSun,serif; |
| | | margin-right: 4px; |
| | | font-size: 14px; |
| | | line-height: 1; |
| | | color: #ed4014; |
| | | } |
| | | #print-windows .layui-input { |
| | | height: 36px; |
| | | border-radius: 4px; |
| | | } |
| | | #print-windows .cool-button-contain { |
| | | text-align: right; |
| | | margin: 20px 0; |
| | | } |
| | | #print-windows .layui-form-radio>i:hover, .layui-form-radioed>i { |
| | | color: #007bff; |
| | | } |
| | | #print-windows .layui-btn { |
| | | height: 36px; |
| | | line-height: 36px; |
| | | border-radius: 4px; |
| | | box-shadow: 0 1px 0 rgba(0,0,0,.03); |
| | | } |
| | | #print-windows .layui-btn-primary:hover { |
| | | border-color: #777777; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 搜索栏 --> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="tray_no" placeholder="序列号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 日期范围 --> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="appe_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <!-- 待添加 --> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> |
| | | <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">重置</button> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 表格 --> |
| | | <div class="layui-form"> |
| | | <table class="layui-hide" id="trayCode" lay-filter="trayCode"></table> |
| | | </div> |
| | | |
| | | <div id="printBox" style="display: block; height: 150px; width: 300px;padding-left: 0px"></div> |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-normal" id="btn-tray" lay-event="btnTray"><i class="layui-icon layui-icon-print" style="font-size: 15px"></i>生成托盘码</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">详情</a> |
| | | <a class="layui-btn layui-btn-xs btn-edit" lay-event="edit">编辑</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/jquery/jQuery.print.js"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/trayCode/trayCode.js" charset="utf-8"></script> |
| | | |
| | | <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> |
| | | |
| | | <div id="print-windows" style="display: none"> |
| | | <div class="layui-form"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">起始序列:</label> |
| | | <div class="layui-input-block"> |
| | | <input id="startNo" name="startNo" placeholder="请输入起始序列号" class="layui-input" lay-verify="required|number" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">数量:</label> |
| | | <div class="layui-input-block"> |
| | | <input id="count" name="count" type="number" placeholder="请输入数量" class="layui-input" lay-verify="required|number" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">码类型:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="radio" name="type" value="1" title="条形码" checked=""> |
| | | <input type="radio" name="type" value="2" title="二维码"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item cool-button-contain"> |
| | | <button class="layui-btn layui-btn-normal" id="print" lay-filter="print" lay-submit="">打印</button> |
| | | <button class="layui-btn layui-btn-primary" id="cancel">取消</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </body> |
| | | <script type="text/template" id="trayCodeTemplate"> |
| | | {{#each data}} |
| | | <img class="template-code" src="{{this.barcodeUrl}}" width="100%"> |
| | | <div style="letter-spacing: 2px;margin-top: 1px; text-align: center"> |
| | | <span>{{this.item}}</span> |
| | | </div> |
| | | {{/each}} |
| | | </script> |
| | | </html> |
| | | |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 详情 --> |
| | | <div id="data-detail" class="layer_self_wrap"> |
| | | <form id="detail" class="layui-form"> |
| | | <!-- |
| | | <div class="layui-inline" style="display: none"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>编 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="id" class="layui-input" type="text" placeholder="编号"> |
| | | </div> |
| | | </div> |
| | | --> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>编 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="id" class="layui-input" type="text" onkeyup="check(this.id, 'trayCode')" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>序 列 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="trayNo" class="layui-input" type="text" lay-verify="required" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">起 始:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="start" class="layui-input" type="checkBox" lay-skin="primary" lay-filter='detailCheckbox'> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">终 止:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="finish" class="layui-input" type="checkBox" lay-skin="primary" lay-filter='detailCheckbox'> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">备 注:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="memo" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;display: none"> |
| | | <label class="layui-form-label">修改时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="modiTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;display: none"> |
| | | <label class="layui-form-label">修改人员:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="modiUser" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="modiUser$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryBymodiUser" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryBymodiUserSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">添加时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="appeTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">添加人员:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="appeUser" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="appeUser$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryByappeUser" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryByappeUserSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <hr class="layui-bg-gray"> |
| | | |
| | | <div id="data-detail-btn" class="layui-btn-container layui-form-item"> |
| | | <div id="data-detail-submit-save" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="save">保存</div> |
| | | <div id="data-detail-submit-edit" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="edit">修改</div> |
| | | <div id="data-detail-close" type="button" class="layui-btn" lay-submit lay-filter="close">关闭</div> |
| | | </div> |
| | | |
| | | <div id="prompt"> |
| | | 温馨提示:请仔细填写相关信息,<span class="extrude"><span class="not-null">*</span> 为必填选项。</span> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/trayCode/trayCode.js" charset="utf-8"></script> |
| | | </html> |
| | | |
| | |
| | | <a class="layui-btn layui-btn-xs btn-edit" lay-event="edit">编辑</a> |
| | | </script> |
| | | |
| | | <script type="text/html" id="statusTpl"> |
| | | <input type="checkbox" name="status" value="{{d.status}}" lay-skin="switch" lay-text="正常|禁用" lay-filter="statusSwitch" {{ d.status === 1 ? 'checked' : '' }}> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | |
| | | |
| | | <!-- 详情 --> |
| | | <div id="data-detail" class="layer_self_wrap"> |
| | | <form id="detail" class="layui-form"> |
| | | <form id="detail" class="layui-form" style="text-align: center"> |
| | | <div class="layui-inline" style="display: none"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>编 号:</label> |
| | | <div class="layui-input-inline"> |
| | |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <div class="layui-inline" style="width:80%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>帐 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="mobile" class="layui-input" type="text" placeholder="账号" lay-verify="required" > |
| | | <input id="mobile" class="layui-input" type="text" placeholder="账号" lay-verify="required" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <div class="layui-inline" style="width:80%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>名 称:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="username" class="layui-input" type="text" placeholder="名称" lay-verify="required" > |
| | | <input id="username" class="layui-input" type="text" placeholder="名称" lay-verify="required" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <div class="layui-inline" style="width:80%;"> |
| | | <label class="layui-form-label">密 码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="password" class="layui-input" type="text" placeholder="密码"> |
| | | <input id="password" class="layui-input" type="text" placeholder="密码" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <div class="layui-inline" style="width:80%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>角 色:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="roleId" class="layui-input" type="text" placeholder="角色" lay-verify="required" style="display: none"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>状 态:</label> |
| | | <div class="layui-input-inline"> |
| | | <select id="status" lay-verify="required"> |
| | | <option value="" style="display: none"></option> |
| | | <option value="1">启用</option> |
| | | <option value="3">删除</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <hr class="layui-bg-gray"> |
| | | |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 搜索栏 --> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="barcode" placeholder="托盘码" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="matnr" placeholder="物料编码" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 日期范围 --> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="modi_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <!-- 待添加 --> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> |
| | | <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">重置</button> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 表格 --> |
| | | <div class="layui-form"> |
| | | <table class="layui-hide" id="waitPakin" lay-filter="waitPakin"></table> |
| | | </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> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">详情</a> |
| | | <a class="layui-btn layui-btn-xs btn-edit" lay-event="edit">编辑</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/waitPakin/waitPakin.js" charset="utf-8"></script> |
| | | |
| | | <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> |
| | | |
| | | </body> |
| | | </html> |
| | | |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 详情 --> |
| | | <div id="data-detail" class="layer_self_wrap"> |
| | | <form id="detail" class="layui-form"> |
| | | <!-- |
| | | <div class="layui-inline" style="display: none"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>编 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="id" class="layui-input" type="text" placeholder="编号"> |
| | | </div> |
| | | </div> |
| | | --> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>编 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="id" class="layui-input" type="text" onkeyup="check(this.id, 'waitPakin')" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">托 盘 码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="barcode" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">物料编码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="matnr" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">物料描述:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="maktx" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">数 量:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="anfme" class="layui-input" type="text" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">单 位:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="unit" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">状 态:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="status" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">备 注:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="memo" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">修改时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="modiTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">修改人员:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="modiUser" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="modiUser$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryBymodiUser" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryBymodiUserSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">添加时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="appeTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">创 建 者:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="appeUser" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="appeUser$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryByappeUser" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryByappeUserSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <hr class="layui-bg-gray"> |
| | | |
| | | <div id="data-detail-btn" class="layui-btn-container layui-form-item"> |
| | | <div id="data-detail-submit-save" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="save">保存</div> |
| | | <div id="data-detail-submit-edit" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="edit">修改</div> |
| | | <div id="data-detail-close" type="button" class="layui-btn" lay-submit lay-filter="close">关闭</div> |
| | | </div> |
| | | |
| | | <div id="prompt"> |
| | | 温馨提示:请仔细填写相关信息,<span class="extrude"><span class="not-null">*</span> 为必填选项。</span> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/waitPakin/waitPakin.js" charset="utf-8"></script> |
| | | </html> |
| | | |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 搜索栏 --> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="pakin_id" placeholder="入库通知号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 日期范围 --> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="modi_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <!-- 待添加 --> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> |
| | | <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">重置</button> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 表格 --> |
| | | <div class="layui-form"> |
| | | <table class="layui-hide" id="waitPakinLog" lay-filter="waitPakinLog"></table> |
| | | </div> |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="margin-top: 10px">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/waitPakinLog/waitPakinLog.js" charset="utf-8"></script> |
| | | |
| | | <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> |
| | | |
| | | </body> |
| | | </html> |
| | | |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 详情 --> |
| | | <div id="data-detail" class="layer_self_wrap"> |
| | | <form id="detail" class="layui-form"> |
| | | <!-- |
| | | <div class="layui-inline" style="display: none"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>编 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="id" class="layui-input" type="text" placeholder="编号"> |
| | | </div> |
| | | </div> |
| | | --> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>编 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="id" class="layui-input" type="text" onkeyup="check(this.id, 'waitPakinLog')" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">入库通知号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="pakinId" class="layui-input" type="text" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">托 盘 码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="barcode" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">物料编码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="matnr" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">物料描述:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="maktx" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">数 量:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="anfme" class="layui-input" type="text" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">单 位:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="unit" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">状 态:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="status" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">备 注:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="memo" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">修改时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="modiTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">修改人员:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="modiUser" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="modiUser$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryBymodiUser" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryBymodiUserSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">添加时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="appeTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">创 建 者:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="appeUser" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="appeUser$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryByappeUser" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryByappeUserSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <hr class="layui-bg-gray"> |
| | | |
| | | <div id="data-detail-btn" class="layui-btn-container layui-form-item"> |
| | | <div id="data-detail-submit-save" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="save">保存</div> |
| | | <div id="data-detail-submit-edit" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="edit">修改</div> |
| | | <div id="data-detail-close" type="button" class="layui-btn" lay-submit lay-filter="close">关闭</div> |
| | | </div> |
| | | |
| | | <div id="prompt"> |
| | | 温馨提示:请仔细填写相关信息,<span class="extrude"><span class="not-null">*</span> 为必填选项。</span> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/waitPakinLog/waitPakinLog.js" charset="utf-8"></script> |
| | | </html> |
| | | |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 搜索栏 --> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="wrk_no" placeholder="工作号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="modi_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <!-- 待添加 --> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> |
| | | <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">重置</button> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 表格 --> |
| | | <div class="layui-form"> |
| | | <table class="layui-hide" id="wrkDetlLog" lay-filter="wrkDetlLog"></table> |
| | | </div> |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="margin-top: 10px">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">详情</a> |
| | | <a class="layui-btn layui-btn-xs btn-edit" lay-event="edit">编辑</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/wrkDetlLog/wrkDetlLog.js" charset="utf-8"></script> |
| | | |
| | | <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> |
| | | |
| | | </body> |
| | | </html> |
| | | |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 详情 --> |
| | | <div id="data-detail" class="layer_self_wrap"> |
| | | <form id="detail" class="layui-form"> |
| | | <!-- |
| | | <div class="layui-inline" style="display: none"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>编 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="id" class="layui-input" type="text" placeholder="编号"> |
| | | </div> |
| | | </div> |
| | | --> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>工 作 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="wrkNo" class="layui-input" type="text" lay-verify="required|number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">工作时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="ioTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>物料编号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="matnr" class="layui-input" type="text" lay-verify="required" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>仓 库 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="lgnum" class="layui-input" type="text" lay-verify="required" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label" style="font-size: x-small"><span class="not-null">*</span>转储请求编号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="tbnum" class="layui-input" type="text" lay-verify="required|number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>行 项 目:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="tbpos" class="layui-input" type="text" lay-verify="required|number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label" style="font-size: x-small">物料标签ID:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="zmatid" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">物料描述:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="maktx" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">工 厂:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="werks" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">数 量:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="anfme" class="layui-input" type="text" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">单 位:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="altme" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">托盘条码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="zpallet" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">用户ID:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="bname" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">备 注:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="memo" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">修改人员:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="modiUser" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="modiUser$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryBymodiUser" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryBymodiUserSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">修改时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="modiTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">创 建 者:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="appeUser" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="appeUser$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryByappeUser" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryByappeUserSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">添加时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="appeTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="nista" class="layui-input" type="text" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <hr class="layui-bg-gray"> |
| | | |
| | | <div id="data-detail-btn" class="layui-btn-container layui-form-item"> |
| | | <div id="data-detail-submit-save" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="save">保存</div> |
| | | <div id="data-detail-submit-edit" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="edit">修改</div> |
| | | <div id="data-detail-close" type="button" class="layui-btn" lay-submit lay-filter="close">关闭</div> |
| | | </div> |
| | | |
| | | <div id="prompt"> |
| | | 温馨提示:请仔细填写相关信息,<span class="extrude"><span class="not-null">*</span> 为必填选项。</span> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/wrkDetlLog/wrkDetlLog.js" charset="utf-8"></script> |
| | | </html> |
| | | |
| | |
| | | .btn-cancel { |
| | | display: none; |
| | | } |
| | | .btn-pick { |
| | | display: none; |
| | | } |
| | | |
| | | /*明细表*/ |
| | | #detlTable { |
| | |
| | | |
| | | <!-- 搜索栏 --> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <!--<div class="layui-inline">--> |
| | | <!--<label class="layui-form-label">工 作 号:</label>--> |
| | | <!--<div class="layui-input-inline">--> |
| | | <!--<input class="layui-input" type="text" name="wrk_no" placeholder="请输入" autocomplete="off">--> |
| | | <!--</div>--> |
| | | <!--</div>--> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="wrkNo" name="wrk_no" class="layui-input" type="text" placeholder="工作号" autocomplete="off" style="display: none"> |
| | | <input id="wrkNo$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="工作号" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="wrkMastQueryBywrkSts" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="wrkMastQueryBywrkStsSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="wrk_no" placeholder="工作号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | |
| | | </div> |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-normal layui-btn-sm" id="btn-pri-add" lay-event="priAdd"><i class="layui-icon"></i>增加优先级</button> |
| | | <button class="layui-btn layui-btn-normal layui-btn-sm" id="btn-pri-red" lay-event="priRed"><i class="layui-icon"></i>降低优先级</button> |
| | | <button class="layui-btn layui-btn-normal" id="btn-pri-add" lay-event="priAdd"><i class="layui-icon"></i>增加优先级</button> |
| | | <button class="layui-btn layui-btn-normal" id="btn-pri-red" lay-event="priRed"><i class="layui-icon"></i>降低优先级</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">导出</button> |
| | | </div> |
| | | </script> |
| | |
| | | <a class="layui-btn layui-btn-xs btn-detlShow" lay-event="detlShow">明细</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-complete" lay-event="complete">完成</a> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-cancel" lay-event="cancel">取消</a> |
| | | <a class="layui-btn layui-btn-warm layui-btn-xs btn-pick" lay-event="pick">拣</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | |
| | | <!-- 搜索栏 --> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="wrkNo" name="wrk_no" class="layui-input" type="text" placeholder="请输入" autocomplete="off" style="display: none"> |
| | | <input id="wrkNo$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="工作号" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="wrkMastQueryBywrkSts" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="wrkMastQueryBywrkStsSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="wrk_no" placeholder="工作号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |