From e004099a45b0981e1802b27b59053bf284fefdff Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期二, 24 八月 2021 13:45:10 +0800
Subject: [PATCH] Merge branch 'xgmasrs' of https://gitee.com/luxiaotao1123/zy-asrs into xgmasrs
---
src/main/java/com/zy/ints/mapper/WaitMatoutMapper.java | 12
src/main/java/com/zy/asrs/service/MatOutService.java | 24
src/main/resources/mapper/WaitMatoutMapper.xml | 30
src/main/java/com/zy/asrs/controller/WorkController.java | 36
src/main/webapp/views/matOut/waitMatoutQuery.html | 250 +++++++
src/main/java/com/zy/ints/service/impl/WaitMatoutServiceImpl.java | 12
src/main/java/com/zy/asrs/service/impl/MatOutServiceImpl.java | 160 ++++
src/main/java/com/zy/ints/entity/WaitMatout.java | 455 +++++++++++++
src/main/webapp/views/waitMatout/waitMatout.html | 218 ++++++
src/main/java/com/zy/asrs/entity/param/StockOutParam.java | 14
src/main/webapp/static/js/waitMatin/waitMatin.js | 12
src/main/java/com/zy/asrs/controller/MatOutController.java | 34 +
src/main/webapp/static/js/matOut/matOut.js | 183 +++++
src/main/java/com/zy/ints/controller/WaitMatoutController.java | 127 +++
src/main/webapp/views/matOut/matOut.html | 129 +++
src/main/java/com/zy/common/CodeBuilder.java | 4
src/main/webapp/static/js/pakStore/stockOut.js | 2
src/main/java/waitMatout.sql | 20
src/main/webapp/views/matCode/matCode.html | 2
src/main/java/com/zy/ints/controller/WaitMatinController.java | 2
src/main/webapp/static/js/waitMatout/waitMatout.js | 274 ++++++++
src/main/webapp/static/js/matCode/matCode.js | 2
src/main/java/com/zy/ints/service/WaitMatoutService.java | 8
src/main/java/com/zy/asrs/controller/MatStoreController.java | 2
src/main/resources/application.yml | 3
src/main/webapp/views/waitMatin/waitMatin.html | 13
26 files changed, 1,988 insertions(+), 40 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/MatOutController.java b/src/main/java/com/zy/asrs/controller/MatOutController.java
new file mode 100644
index 0000000..8b261e4
--- /dev/null
+++ b/src/main/java/com/zy/asrs/controller/MatOutController.java
@@ -0,0 +1,34 @@
+package com.zy.asrs.controller;
+
+import com.core.annotations.ManagerAuth;
+import com.core.common.R;
+import com.zy.asrs.entity.param.StockOutParam;
+import com.zy.asrs.service.MatOutService;
+import com.zy.asrs.service.WorkService;
+import com.zy.common.web.BaseController;
+import com.zy.ints.service.WaitMatinService;
+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.RestController;
+
+/**
+ * 鍑哄簱浣滀笟鎺у埗鍣�(鏍规嵁閫氱煡妗�)
+ * Created by TQS on 2021/8/24
+ */
+@RestController
+public class MatOutController extends BaseController {
+ @Autowired
+ private WaitMatinService waitMatinService;
+ @Autowired
+ private WorkService workService;
+ @Autowired
+ private MatOutService matOutService;
+
+ @RequestMapping("/mat/out/start")
+ @ManagerAuth(memo = "鍑哄簱鍚姩(閫氱煡妗�)")
+ public R matOutStart(@RequestBody StockOutParam stockOutParam) {
+ matOutService.startupMatOut(stockOutParam, getUserId());
+ return R.ok("鍑哄簱鍚姩鎴愬姛");
+ }
+}
diff --git a/src/main/java/com/zy/asrs/controller/MatStoreController.java b/src/main/java/com/zy/asrs/controller/MatStoreController.java
index 621c937..bbfe7ff 100644
--- a/src/main/java/com/zy/asrs/controller/MatStoreController.java
+++ b/src/main/java/com/zy/asrs/controller/MatStoreController.java
@@ -26,7 +26,7 @@
private MatStoreService matStoreService;
@RequestMapping("/mat/store/start")
- @ManagerAuth(memo = "鍏ㄦ澘鍏ュ簱(閫氱煡妗�)")
+ @ManagerAuth(memo = "鍏ュ簱鍚姩(閫氱煡妗�)")
public R matStoreStart(@RequestBody FullStoreParam fullStoreParam) {
// return R.ok("鍏ュ簱鍚姩鎴愬姛").add(workService.startupFullPutStore(fullStoreParam,getUserId()));
return R.ok("鍏ュ簱鍚姩鎴愬姛").add(matStoreService.startupFullStore(fullStoreParam,getUserId()));
diff --git a/src/main/java/com/zy/asrs/controller/WorkController.java b/src/main/java/com/zy/asrs/controller/WorkController.java
index 93244a1..ee38bfa 100644
--- a/src/main/java/com/zy/asrs/controller/WorkController.java
+++ b/src/main/java/com/zy/asrs/controller/WorkController.java
@@ -41,39 +41,23 @@
return R.ok().add(basDevpService.getAvailableEmptyInSite());
}
- @RequestMapping("/available/take/site/{type}")
+ @RequestMapping("/available/take/site")
@ManagerAuth(memo = "鑾峰彇鍑哄簱绔欑偣")
- public R availableTakeSite(@PathVariable("type") Integer type){
+ public R availableTakeSite(){
List<Map<String, Object>> result = new ArrayList<>();
List<Integer> outSite = basDevpService.getAvailableOutSite(101);
for (Integer siteId : outSite) {
- if (type == 2 && siteId > 10) {
- Map<String, Object> map = new HashMap<>();
- map.put("siteId", siteId);
- map.put("desc", siteId + "锛堝叏鏉垮嚭搴撳彛锛�");
- result.add(map);
- }
- if (type == 1 && siteId < 10) {
- Map<String, Object> map = new HashMap<>();
- map.put("siteId", siteId);
- map.put("desc", siteId + "锛堝叏鏉垮嚭搴撳彛锛�");
- result.add(map);
- }
+ Map<String, Object> map = new HashMap<>();
+ map.put("siteId", siteId);
+ map.put("desc", siteId + "锛堝叏鏉垮嚭搴撳彛锛�");
+ result.add(map);
}
List<Integer> pickOutSite = basDevpService.getAvailableOutSite(103);
for (Integer siteId : pickOutSite) {
- if (type == 2 && siteId > 10) {
- Map<String, Object> map = new HashMap<>();
- map.put("siteId", siteId);
- map.put("desc", siteId + "锛堟嫞鏂欏嚭搴撳彛锛�");
- result.add(map);
- }
- if (type == 1 && siteId < 10) {
- Map<String, Object> map = new HashMap<>();
- map.put("siteId", siteId);
- map.put("desc", siteId + "锛堟嫞鏂欏嚭搴撳彛锛�");
- result.add(map);
- }
+ Map<String, Object> map = new HashMap<>();
+ map.put("siteId", siteId);
+ map.put("desc", siteId + "锛堟嫞鏂欏嚭搴撳彛锛�");
+ result.add(map);
}
return R.ok().add(result);
}
diff --git a/src/main/java/com/zy/asrs/entity/param/StockOutParam.java b/src/main/java/com/zy/asrs/entity/param/StockOutParam.java
index 9ba5bb0..9b238d3 100644
--- a/src/main/java/com/zy/asrs/entity/param/StockOutParam.java
+++ b/src/main/java/com/zy/asrs/entity/param/StockOutParam.java
@@ -31,6 +31,12 @@
public static class LocDetl {
+ //鍗曟嵁缂栧彿
+ private String billNo;
+
+ //搴忓彿
+ private Integer seqNo;
+
// 搴撲綅鍙�
private String locNo;
@@ -40,6 +46,14 @@
// 鏁伴噺
private Double count;
+ public String getBillNo() { return billNo; }
+
+ public void setBillNo(String billNo) { this.billNo = billNo; }
+
+ public Integer getSeqNo() { return seqNo; }
+
+ public void setSeqNo(Integer seqNo) { this.seqNo = seqNo; }
+
public String getLocNo() {
return locNo;
}
diff --git a/src/main/java/com/zy/asrs/service/MatOutService.java b/src/main/java/com/zy/asrs/service/MatOutService.java
new file mode 100644
index 0000000..04031f0
--- /dev/null
+++ b/src/main/java/com/zy/asrs/service/MatOutService.java
@@ -0,0 +1,24 @@
+package com.zy.asrs.service;
+
+import com.zy.asrs.entity.BasDevp;
+import com.zy.asrs.entity.param.StockOutParam;
+import com.zy.common.model.LocDetlDto;
+
+import java.util.List;
+
+public interface MatOutService {
+
+ /**
+ * 鍑哄簱鍚姩
+ * @return 搴撲綅鍙�
+ */
+ public void startupMatOut(StockOutParam param, Long userId);
+
+ /**
+ * 鍑哄簱浣滀笟
+ * @param staNo 鐩爣绔欑偣
+ * @param locDetls 寰呭嚭搴撲骇鍝�
+ * @param ioType 鍏ュ嚭搴撶被鍨�
+ */
+ void stockOut(BasDevp staNo, List<LocDetlDto> locDetls, Integer ioType, Long userId);
+}
diff --git a/src/main/java/com/zy/asrs/service/impl/MatOutServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MatOutServiceImpl.java
new file mode 100644
index 0000000..8bc2e2c
--- /dev/null
+++ b/src/main/java/com/zy/asrs/service/impl/MatOutServiceImpl.java
@@ -0,0 +1,160 @@
+package com.zy.asrs.service.impl;
+
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.mapper.Wrapper;
+import com.core.common.Cools;
+import com.core.exception.CoolException;
+import com.zy.asrs.entity.*;
+import com.zy.asrs.entity.param.StockOutParam;
+import com.zy.asrs.service.*;
+import com.zy.asrs.utils.VersionUtils;
+import com.zy.common.model.LocDetlDto;
+import com.zy.common.model.OutLocDto;
+import com.zy.common.service.CommonService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.*;
+
+@Service
+public class MatOutServiceImpl implements MatOutService {
+ // 宸ヤ綔鍙风敓鎴愯鍒欓粯璁ょ被鍨�
+ private static final int DEFAULT_WORK_NO_TYPE = 0;
+ // 搴撲綅鎺掑彿鍒嗛厤榛樿绫诲埆
+ private static final int DEFAULT_ROW_NO_TYPE = 1;
+
+ @Autowired
+ BasDevpService basDevpService;
+ @Autowired
+ LocDetlService locDetlService;
+ @Autowired
+ LocMastService locMastService;
+ @Autowired
+ StaDescService staDescService;
+ @Autowired
+ private CommonService commonService;
+ @Autowired
+ private WrkDetlService wrkDetlService;
+ @Autowired
+ private WrkMastService wrkMastService;
+
+ @Override
+ @Transactional
+ public void startupMatOut(StockOutParam param, Long userId){
+ // 鐩爣绔欑偣鐘舵�佹娴�
+ BasDevp staNo = basDevpService.checkSiteStatus(param.getOutSite());
+ // 鑾峰彇搴撲綅鏄庣粏
+ List<LocDetlDto> locDetlDtos = new ArrayList<>();
+ for (StockOutParam.LocDetl paramLocDetl : param.getLocDetls()) {
+ if (!Cools.isEmpty(paramLocDetl.getLocNo(), paramLocDetl.getMatNo(), paramLocDetl.getCount())) {
+ LocDetl sqlParam = new LocDetl();
+ sqlParam.setLocNo(paramLocDetl.getLocNo());
+ sqlParam.setMatNo(paramLocDetl.getMatNo());
+ LocDetl one = locDetlService.selectOne(new EntityWrapper<>(sqlParam));
+ if (null != one) locDetlDtos.add(new LocDetlDto(one, paramLocDetl.getCount()));
+ }
+ }
+ if (!locDetlDtos.isEmpty()) {
+ // 鍚姩鍑哄簱寮�濮� 101.鍑哄簱
+ stockOut(staNo, locDetlDtos, null, userId);
+ } else {
+ throw new CoolException("搴撲綅浜у搧涓嶅瓨鍦�");
+ }
+ }
+
+ @Override
+ @Transactional
+ public void stockOut(BasDevp staNo, List<LocDetlDto> locDetlDtos, Integer ioType, Long userId) {
+ // 鍚堝苟鍚岀被椤�
+ Set<String> locNos = new HashSet<>();
+ locDetlDtos.forEach(dto -> locNos.add(dto.getLocDetl().getLocNo()));
+ List<OutLocDto> dtos = new ArrayList<>();
+ for (String locNo : locNos) {
+ List<LocDetlDto> list = new ArrayList<>();
+ Iterator<LocDetlDto> iterator = locDetlDtos.iterator();
+ while (iterator.hasNext()) {
+ LocDetlDto dto = iterator.next();
+ if (locNo.equals(dto.getLocDetl().getLocNo())) {
+ list.add(dto);
+ iterator.remove();
+ }
+ }
+ dtos.add(new OutLocDto(locNo, list));
+ }
+ // 鐢熸垚宸ヤ綔妗�
+ for (OutLocDto dto : dtos) {
+ // 鍒ゆ柇鍏ュ嚭搴撶被鍨嬶細101.鍏ㄦ澘鍑哄簱 or 103.鎷f枡鍑哄簱
+ if (ioType == null) {
+ ioType = dto.isAll() ? 101 : 103;
+ }
+ // 鑾峰彇搴撲綅
+ LocMast locMast = locMastService.selectById(dto.getLocNo());
+ // 鑾峰彇璺緞
+ Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>()
+ .eq("type_no", ioType)
+ .eq("stn_no", staNo.getDevNo())
+ .eq("crn_no", locMast.getCrnNo());
+ StaDesc staDesc = staDescService.selectOne(wrapper);
+ if (Cools.isEmpty(staDesc)) {
+ throw new CoolException("鍑哄簱璺緞涓嶅瓨鍦�");
+ }
+ // 鐢熸垚宸ヤ綔鍙�
+ int workNo = commonService.getWorkNo(DEFAULT_WORK_NO_TYPE);
+ // 鐢熸垚宸ヤ綔妗�
+ WrkMast wrkMast = new WrkMast();
+ wrkMast.setWrkNo(workNo);
+ wrkMast.setIoTime(new Date());
+ wrkMast.setWrkSts(11L); // 宸ヤ綔鐘舵�侊細11.鐢熸垚鍑哄簱ID
+ wrkMast.setIoType(ioType); // 鍏ュ嚭搴撶姸鎬�
+ wrkMast.setIoPri(13D); // 浼樺厛绾э細13
+ wrkMast.setCrnNo(locMast.getCrnNo());
+ wrkMast.setSourceStaNo(staDesc.getCrnStn()); // 婧愮珯
+ wrkMast.setStaNo(staDesc.getStnNo()); // 鐩爣绔�
+ wrkMast.setSourceLocNo(dto.getLocNo()); // 婧愬簱浣�
+ wrkMast.setFullPlt("Y"); // 婊℃澘锛歒
+ wrkMast.setPicking("N"); // 鎷f枡
+ wrkMast.setExitMk("N"); // 閫�鍑�
+ wrkMast.setEmptyMk("N"); // 绌烘澘
+ wrkMast.setLinkMis("N");
+ wrkMast.setAppeUser(userId); // 鎿嶄綔浜哄憳鏁版嵁
+ wrkMast.setAppeTime(new Date());
+ wrkMast.setModiUser(userId);
+ wrkMast.setModiTime(new Date());
+ if (!wrkMastService.insert(wrkMast)) {
+ throw new CoolException("淇濆瓨宸ヤ綔妗eけ璐ワ紝鍑哄簱搴撲綅鍙凤細"+dto.getLocNo());
+ }
+ // 鐢熸垚宸ヤ綔妗f槑缁�
+ for (LocDetlDto detlDto : dto.getLocDetlDtos()) {
+ // 鍑哄簱鏃讹紝鏁伴噺涓�0鐨勭洿鎺ュ拷鐣�
+ if (detlDto.getCount()==null || detlDto.getCount() <= 0.0D) {continue;}
+ WrkDetl wrkDetl = new WrkDetl();
+ wrkDetl.setWrkNo(workNo);
+ wrkDetl.setIoTime(new Date());
+ Double qty = ioType==101?detlDto.getLocDetl().getQty():detlDto.getCount();
+ wrkDetl.setQty(qty); // 鏁伴噺
+ VersionUtils.setWrkDetl(wrkDetl, detlDto.getLocDetl()); // 鐗堟湰鎺у埗
+ wrkDetl.setAppeTime(new Date());
+ wrkDetl.setAppeUser(userId);
+ wrkDetl.setModiTime(new Date());
+ wrkDetl.setModiUser(userId);
+ if (!wrkDetlService.insert(wrkDetl)) {
+ throw new CoolException("淇濆瓨宸ヤ綔妗f槑缁嗗け璐�");
+ }
+ }
+ // 淇敼搴撲綅鐘舵��: F.鍦ㄥ簱 ====>>> R.鍑哄簱棰勭害/P.鎷f枡/鐩樼偣/骞舵澘鍑哄簱涓�
+ locMast = locMastService.selectById(dto.getLocNo());
+ if (locMast.getLocSts().equals("F")) {
+ locMast.setLocSts(ioType==101?"R":"P");
+ locMast.setModiUser(userId);
+ locMast.setModiTime(new Date());
+ if (!locMastService.updateById(locMast)) {
+ throw new CoolException("棰勭害搴撲綅鐘舵�佸け璐ワ紝搴撲綅鍙凤細"+dto.getLocNo());
+ }
+ } else {
+ throw new CoolException(dto.getLocNo() + "搴撲綅涓嶆槸鍦ㄥ簱鐘舵��");
+ }
+ }
+ }
+
+}
diff --git a/src/main/java/com/zy/common/CodeBuilder.java b/src/main/java/com/zy/common/CodeBuilder.java
index 894e2d5..fd230f0 100644
--- a/src/main/java/com/zy/common/CodeBuilder.java
+++ b/src/main/java/com/zy/common/CodeBuilder.java
@@ -15,10 +15,10 @@
// generator.password="xltys1995";
// generator.table="sys_host";
// sqlserver
- generator.url="127.0.0.1:1433;databasename=xgmasrs";
+ generator.url="192.168.4.208:1433;databasename=xgmasrs";
generator.username="sa";
generator.password="sa@123";
- generator.table="ints_wait_matin";
+ generator.table="ints_wait_matout";
generator.packagePath="com.zy.ints";
generator.build();
}
diff --git a/src/main/java/com/zy/ints/controller/WaitMatinController.java b/src/main/java/com/zy/ints/controller/WaitMatinController.java
index ac5b143..77b9c66 100644
--- a/src/main/java/com/zy/ints/controller/WaitMatinController.java
+++ b/src/main/java/com/zy/ints/controller/WaitMatinController.java
@@ -70,10 +70,12 @@
@RequestParam(defaultValue = "10")Integer limit,
@RequestParam(required = false)String orderByField,
@RequestParam(required = false)String orderByType,
+ @RequestParam(required = false)String condition,
@RequestParam Map<String, Object> param){
EntityWrapper<WaitMatin> wrapper = new EntityWrapper<>();
excludeTrash(param);
convert(param, wrapper);
+ allLike(WaitMatin.class, param.keySet(), wrapper, condition);
if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
return R.ok(waitMatinService.selectPage(new Page<>(curr, limit), wrapper));
}
diff --git a/src/main/java/com/zy/ints/controller/WaitMatoutController.java b/src/main/java/com/zy/ints/controller/WaitMatoutController.java
new file mode 100644
index 0000000..b9f5ab7
--- /dev/null
+++ b/src/main/java/com/zy/ints/controller/WaitMatoutController.java
@@ -0,0 +1,127 @@
+package com.zy.ints.controller;
+
+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.common.web.BaseController;
+import com.zy.ints.entity.WaitMatout;
+import com.zy.ints.service.WaitMatoutService;
+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 WaitMatoutController extends BaseController {
+
+ @Autowired
+ private WaitMatoutService waitMatoutService;
+
+ @RequestMapping(value = "/waitMatout/{id}/auth")
+ @ManagerAuth
+ public R get(@PathVariable("id") String id) {
+ return R.ok(waitMatoutService.selectById(String.valueOf(id)));
+ }
+
+ @RequestMapping(value = "/waitMatout/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(required = false)String condition,
+ @RequestParam Map<String, Object> param){
+ EntityWrapper<WaitMatout> wrapper = new EntityWrapper<>();
+ excludeTrash(param);
+ convert(param, wrapper);
+ allLike(WaitMatout.class, param.keySet(), wrapper, condition);
+ if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
+ return R.ok(waitMatoutService.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 = "/waitMatout/add/auth")
+ @ManagerAuth
+ public R add(WaitMatout waitMatout) {
+ waitMatoutService.insert(waitMatout);
+ return R.ok();
+ }
+
+ @RequestMapping(value = "/waitMatout/update/auth")
+ @ManagerAuth
+ public R update(WaitMatout waitMatout){
+ if (Cools.isEmpty(waitMatout) || null==waitMatout.getSeqNo()){
+ return R.error();
+ }
+ waitMatoutService.updateById(waitMatout);
+ return R.ok();
+ }
+
+ @RequestMapping(value = "/waitMatout/delete/auth")
+ @ManagerAuth
+ public R delete(@RequestParam(value="ids[]") Long[] ids){
+ for (Long id : ids){
+ waitMatoutService.deleteById(id);
+ }
+ return R.ok();
+ }
+
+ @RequestMapping(value = "/waitMatout/export/auth")
+ @ManagerAuth
+ public R export(@RequestBody JSONObject param){
+ EntityWrapper<WaitMatout> wrapper = new EntityWrapper<>();
+ List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
+ Map<String, Object> map = excludeTrash(param.getJSONObject("waitMatout"));
+ convert(map, wrapper);
+ List<WaitMatout> list = waitMatoutService.selectList(wrapper);
+ return R.ok(exportSupport(list, fields));
+ }
+
+ @RequestMapping(value = "/waitMatoutQuery/auth")
+ @ManagerAuth
+ public R query(String condition) {
+ EntityWrapper<WaitMatout> wrapper = new EntityWrapper<>();
+ wrapper.like("mat_no", condition);
+ Page<WaitMatout> page = waitMatoutService.selectPage(new Page<>(0, 10), wrapper);
+ List<Map<String, Object>> result = new ArrayList<>();
+ for (WaitMatout waitMatout : page.getRecords()){
+ Map<String, Object> map = new HashMap<>();
+ map.put("id", waitMatout.getSeqNo());
+ map.put("value", waitMatout.getMatNo());
+ result.add(map);
+ }
+ return R.ok(result);
+ }
+
+ @RequestMapping(value = "/waitMatout/check/column/auth")
+ @ManagerAuth
+ public R query(@RequestBody JSONObject param) {
+ Wrapper<WaitMatout> wrapper = new EntityWrapper<WaitMatout>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val"));
+ if (null != waitMatoutService.selectOne(wrapper)){
+ return R.parse(BaseRes.REPEAT).add(getComment(WaitMatout.class, String.valueOf(param.get("key"))));
+ }
+ return R.ok();
+ }
+
+}
diff --git a/src/main/java/com/zy/ints/entity/WaitMatout.java b/src/main/java/com/zy/ints/entity/WaitMatout.java
new file mode 100644
index 0000000..cc2f458
--- /dev/null
+++ b/src/main/java/com/zy/ints/entity/WaitMatout.java
@@ -0,0 +1,455 @@
+package com.zy.ints.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import com.baomidou.mybatisplus.enums.IdType;
+import com.core.common.Cools;
+import com.core.common.SpringUtils;
+import com.zy.system.entity.User;
+import com.zy.system.service.UserService;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+@TableName("ints_wait_matout")
+public class WaitMatout implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 鍗曟嵁缂栧彿
+ */
+ @ApiModelProperty(value= "鍗曟嵁缂栧彿")
+ @TableId(value = "bill_no", type = IdType.INPUT)
+ @TableField("bill_no")
+ private String billNo;
+
+ /**
+ * 搴忓彿
+ */
+ @ApiModelProperty(value= "搴忓彿")
+ @TableId(value = "seq_no", type = IdType.INPUT)
+ @TableField("seq_no")
+ private Integer seqNo;
+
+ /**
+ * 鍗曟嵁绫诲瀷 1: 閿�鍞嚭搴� 2: 棰嗘枡鍑哄簱 3: 璋冩嫧鍑哄簱 4: 閲囪喘閫�鍥炲嚭搴� 5: 鍏朵粬鍑哄簱
+ */
+ @ApiModelProperty(value= "鍗曟嵁绫诲瀷 1: 閿�鍞嚭搴� 2: 棰嗘枡鍑哄簱 3: 璋冩嫧鍑哄簱 4: 閲囪喘閫�鍥炲嚭搴� 5: 鍏朵粬鍑哄簱 ")
+ @TableField("bill_type")
+ private Integer billType;
+
+ /**
+ * 鐗╂枡缂栫爜
+ */
+ @ApiModelProperty(value= "鐗╂枡缂栫爜")
+ @TableField("mat_no")
+ private String matNo;
+
+ /**
+ * 鐗╂枡鍚嶇О
+ */
+ @ApiModelProperty(value= "鐗╂枡鍚嶇О")
+ @TableField("mat_name")
+ private String matName;
+
+ /**
+ * 鏁伴噺
+ */
+ @ApiModelProperty(value= "鏁伴噺")
+ private Double qty;
+
+ /**
+ * 瑙勬牸
+ */
+ @ApiModelProperty(value= "瑙勬牸")
+ private String specs;
+
+ /**
+ * 鍗曚綅
+ */
+ @ApiModelProperty(value= "鍗曚綅")
+ private String unit;
+
+ /**
+ * 灏哄
+ */
+ @ApiModelProperty(value= "灏哄")
+ private String size;
+
+ /**
+ * 棰滆壊
+ */
+ @ApiModelProperty(value= "棰滆壊")
+ private String color;
+
+ /**
+ * 鍗曢噸
+ */
+ @ApiModelProperty(value= "鍗曢噸")
+ private Double weight;
+
+ /**
+ * 澶囨敞
+ */
+ @ApiModelProperty(value= "澶囨敞")
+ private String memo;
+
+ /**
+ * 宸插嚭搴撻噺
+ */
+ @ApiModelProperty(value= "宸插嚭搴撻噺")
+ @TableField("out_qty")
+ private Double outQty;
+
+ /**
+ * ERP杩炵嚎 0: 闈炶繛绾� 1: ERP杩炵嚎
+ */
+ @ApiModelProperty(value= "ERP杩炵嚎 0: 闈炶繛绾� 1: ERP杩炵嚎 ")
+ @TableField("link_erp")
+ private Integer linkErp;
+
+ /**
+ * 瀹屾垚鐘舵�� 0: 寰呭鐞� 1: 鍑哄簱涓� 2: 鍑哄簱瀹屾垚 3: 鍙栨秷鍑哄簱
+ */
+ @ApiModelProperty(value= "瀹屾垚鐘舵�� 0: 寰呭鐞� 1: 鍑哄簱涓� 2: 鍑哄簱瀹屾垚 3: 鍙栨秷鍑哄簱 ")
+ @TableField("io_status")
+ private Integer ioStatus;
+
+ /**
+ * 瀹屾垚鏃堕棿
+ */
+ @ApiModelProperty(value= "瀹屾垚鏃堕棿")
+ @TableField("io_time")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ private Date ioTime;
+
+ /**
+ * 淇敼浜哄憳
+ */
+ @ApiModelProperty(value= "淇敼浜哄憳")
+ @TableField("modi_user")
+ private Long modiUser;
+
+ /**
+ * 淇敼鏃堕棿
+ */
+ @ApiModelProperty(value= "淇敼鏃堕棿")
+ @TableField("modi_time")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ private Date modiTime;
+
+ /**
+ * 寤烘。浜哄憳
+ */
+ @ApiModelProperty(value= "寤烘。浜哄憳")
+ @TableField("appe_user")
+ private Long appeUser;
+
+ /**
+ * 寤烘。鏃堕棿
+ */
+ @ApiModelProperty(value= "寤烘。鏃堕棿")
+ @TableField("appe_time")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ private Date appeTime;
+
+ public WaitMatout() {}
+
+ public WaitMatout(String billNo,Integer seqNo,Integer billType,String matNo,String matName,Double qty,String specs,String unit,String size,String color,Double weight,String memo,Double outQty,Integer linkErp,Integer ioStatus,Date ioTime,Long modiUser,Date modiTime,Long appeUser,Date appeTime) {
+ this.billNo = billNo;
+ this.seqNo = seqNo;
+ this.billType = billType;
+ this.matNo = matNo;
+ this.matName = matName;
+ this.qty = qty;
+ this.specs = specs;
+ this.unit = unit;
+ this.size = size;
+ this.color = color;
+ this.weight = weight;
+ this.memo = memo;
+ this.outQty = outQty;
+ this.linkErp = linkErp;
+ this.ioStatus = ioStatus;
+ this.ioTime = ioTime;
+ this.modiUser = modiUser;
+ this.modiTime = modiTime;
+ this.appeUser = appeUser;
+ this.appeTime = appeTime;
+ }
+
+// WaitMatout waitMatout = new WaitMatout(
+// null, // 鍗曟嵁缂栧彿[闈炵┖]
+// null, // 搴忓彿[闈炵┖]
+// null, // 鍗曟嵁绫诲瀷
+// null, // 鐗╂枡缂栫爜[闈炵┖]
+// null, // 鐗╂枡鍚嶇О[闈炵┖]
+// null, // 鏁伴噺
+// null, // 瑙勬牸
+// null, // 鍗曚綅
+// null, // 灏哄
+// null, // 棰滆壊
+// null, // 鍗曢噸
+// null, // 澶囨敞
+// null, // 宸插嚭搴撻噺
+// null, // ERP杩炵嚎
+// null, // 瀹屾垚鐘舵��
+// null, // 瀹屾垚鏃堕棿
+// null, // 淇敼浜哄憳
+// null, // 淇敼鏃堕棿
+// null, // 寤烘。浜哄憳
+// null // 寤烘。鏃堕棿
+// );
+
+ public String getBillNo() {
+ return billNo;
+ }
+
+ public void setBillNo(String billNo) {
+ this.billNo = billNo;
+ }
+
+ public Integer getSeqNo() {
+ return seqNo;
+ }
+
+ public void setSeqNo(Integer seqNo) {
+ this.seqNo = seqNo;
+ }
+
+ public Integer getBillType() {
+ return billType;
+ }
+
+ public String getBillType$(){
+ if (null == this.billType){ return null; }
+ switch (this.billType){
+ case 1:
+ return "閿�鍞嚭搴�";
+ case 2:
+ return "棰嗘枡鍑哄簱";
+ case 3:
+ return "璋冩嫧鍑哄簱";
+ case 4:
+ return "閲囪喘閫�鍥炲嚭搴�";
+ case 5:
+ return "鍏朵粬鍑哄簱";
+ default:
+ return String.valueOf(this.billType);
+ }
+ }
+
+ public void setBillType(Integer billType) {
+ this.billType = billType;
+ }
+
+ public String getMatNo() {
+ return matNo;
+ }
+
+ public void setMatNo(String matNo) {
+ this.matNo = matNo;
+ }
+
+ public String getMatName() {
+ return matName;
+ }
+
+ public void setMatName(String matName) {
+ this.matName = matName;
+ }
+
+ public Double getQty() {
+ return qty;
+ }
+
+ public void setQty(Double qty) {
+ this.qty = qty;
+ }
+
+ public String getSpecs() {
+ return specs;
+ }
+
+ public void setSpecs(String specs) {
+ this.specs = specs;
+ }
+
+ public String getUnit() {
+ return unit;
+ }
+
+ public void setUnit(String unit) {
+ this.unit = unit;
+ }
+
+ public String getSize() {
+ return size;
+ }
+
+ public void setSize(String size) {
+ this.size = size;
+ }
+
+ public String getColor() {
+ return color;
+ }
+
+ public void setColor(String color) {
+ this.color = color;
+ }
+
+ public Double getWeight() {
+ return weight;
+ }
+
+ public void setWeight(Double weight) {
+ this.weight = weight;
+ }
+
+ public String getMemo() {
+ return memo;
+ }
+
+ public void setMemo(String memo) {
+ this.memo = memo;
+ }
+
+ public Double getOutQty() {
+ return outQty;
+ }
+
+ public void setOutQty(Double outQty) {
+ this.outQty = outQty;
+ }
+
+ public Integer getLinkErp() {
+ return linkErp;
+ }
+
+ public String getLinkErp$(){
+ if (null == this.linkErp){ return null; }
+ switch (this.linkErp){
+ case 0:
+ return "闈炶繛绾�";
+ case 1:
+ return "ERP杩炵嚎";
+ default:
+ return String.valueOf(this.linkErp);
+ }
+ }
+
+ public void setLinkErp(Integer linkErp) {
+ this.linkErp = linkErp;
+ }
+
+ public Integer getIoStatus() {
+ return ioStatus;
+ }
+
+ public String getIoStatus$(){
+ if (null == this.ioStatus){ return null; }
+ switch (this.ioStatus){
+ case 0:
+ return "寰呭鐞�";
+ case 1:
+ return "鍑哄簱涓�";
+ case 2:
+ return "鍑哄簱瀹屾垚";
+ case 3:
+ return "鍙栨秷鍑哄簱";
+ default:
+ return String.valueOf(this.ioStatus);
+ }
+ }
+
+ public void setIoStatus(Integer ioStatus) {
+ this.ioStatus = ioStatus;
+ }
+
+ 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 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;
+ }
+
+
+}
diff --git a/src/main/java/com/zy/ints/mapper/WaitMatoutMapper.java b/src/main/java/com/zy/ints/mapper/WaitMatoutMapper.java
new file mode 100644
index 0000000..b29b64a
--- /dev/null
+++ b/src/main/java/com/zy/ints/mapper/WaitMatoutMapper.java
@@ -0,0 +1,12 @@
+package com.zy.ints.mapper;
+
+import com.zy.ints.entity.WaitMatout;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+@Mapper
+@Repository
+public interface WaitMatoutMapper extends BaseMapper<WaitMatout> {
+
+}
diff --git a/src/main/java/com/zy/ints/service/WaitMatoutService.java b/src/main/java/com/zy/ints/service/WaitMatoutService.java
new file mode 100644
index 0000000..be40265
--- /dev/null
+++ b/src/main/java/com/zy/ints/service/WaitMatoutService.java
@@ -0,0 +1,8 @@
+package com.zy.ints.service;
+
+import com.zy.ints.entity.WaitMatout;
+import com.baomidou.mybatisplus.service.IService;
+
+public interface WaitMatoutService extends IService<WaitMatout> {
+
+}
diff --git a/src/main/java/com/zy/ints/service/impl/WaitMatoutServiceImpl.java b/src/main/java/com/zy/ints/service/impl/WaitMatoutServiceImpl.java
new file mode 100644
index 0000000..31dac72
--- /dev/null
+++ b/src/main/java/com/zy/ints/service/impl/WaitMatoutServiceImpl.java
@@ -0,0 +1,12 @@
+package com.zy.ints.service.impl;
+
+import com.zy.ints.mapper.WaitMatoutMapper;
+import com.zy.ints.entity.WaitMatout;
+import com.zy.ints.service.WaitMatoutService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+@Service("waitMatoutService")
+public class WaitMatoutServiceImpl extends ServiceImpl<WaitMatoutMapper, WaitMatout> implements WaitMatoutService {
+
+}
diff --git a/src/main/java/waitMatout.sql b/src/main/java/waitMatout.sql
new file mode 100644
index 0000000..bf4776c
--- /dev/null
+++ b/src/main/java/waitMatout.sql
@@ -0,0 +1,20 @@
+-- save waitMatout record
+-- mysql
+insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'waitMatout/waitMatout.html', 'waitMatout绠$悊', null , '2', null , '1');
+
+insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'waitMatout#view', '鏌ヨ', '', '3', '0', '1');
+insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'waitMatout#btn-add', '鏂板', '', '3', '1', '1');
+insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'waitMatout#btn-edit', '缂栬緫', '', '3', '2', '1');
+insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'waitMatout#btn-delete', '鍒犻櫎', '', '3', '3', '1');
+insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'waitMatout#btn-export', '瀵煎嚭', '', '3', '4', '1');
+insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'waitMatout#btn-into', '瀵煎叆', '', '3', '5', '1');
+
+-- sqlserver
+insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'waitMatout/waitMatout.html', N'鍑哄簱閫氱煡妗�', '222', '2', null, '1');
+
+insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'waitMatout#view', N'鏌ヨ', '20407', '3', '0', '1');
+insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'waitMatout#btn-add', N'鏂板', '20407', '3', '1', '1');
+insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'waitMatout#btn-edit', N'缂栬緫', '20407', '3', '2', '1');
+insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'waitMatout#btn-delete', N'鍒犻櫎', '20407', '3', '3', '1');
+insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'waitMatout#btn-export', N'瀵煎嚭', '20407', '3', '4', '1');
+insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'waitMatout#btn-into', N'瀵煎叆', '20407', '3', '5', '1');
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index ea1a31d..8016187 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -16,9 +16,6 @@
# password: xltys1995
# sql-server
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
- #url: jdbc:sqlserver://192.168.3.99:1433;databasename=gdasrs
- #username: sa
- #password: eisoft
url: jdbc:sqlserver://192.168.4.208:1433;databasename=xgmasrs
username: sa
password: sa@123
diff --git a/src/main/resources/mapper/WaitMatoutMapper.xml b/src/main/resources/mapper/WaitMatoutMapper.xml
new file mode 100644
index 0000000..cfcda26
--- /dev/null
+++ b/src/main/resources/mapper/WaitMatoutMapper.xml
@@ -0,0 +1,30 @@
+<?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.ints.mapper.WaitMatoutMapper">
+
+ <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
+ <resultMap id="BaseResultMap" type="com.zy.ints.entity.WaitMatout">
+ <result column="bill_no" property="billNo" />
+ <result column="seq_no" property="seqNo" />
+ <result column="bill_type" property="billType" />
+ <result column="mat_no" property="matNo" />
+ <result column="mat_name" property="matName" />
+ <result column="qty" property="qty" />
+ <result column="specs" property="specs" />
+ <result column="unit" property="unit" />
+ <result column="size" property="size" />
+ <result column="color" property="color" />
+ <result column="weight" property="weight" />
+ <result column="memo" property="memo" />
+ <result column="out_qty" property="outQty" />
+ <result column="link_erp" property="linkErp" />
+ <result column="io_status" property="ioStatus" />
+ <result column="io_time" property="ioTime" />
+ <result column="modi_user" property="modiUser" />
+ <result column="modi_time" property="modiTime" />
+ <result column="appe_user" property="appeUser" />
+ <result column="appe_time" property="appeTime" />
+
+ </resultMap>
+
+</mapper>
diff --git a/src/main/webapp/static/js/matCode/matCode.js b/src/main/webapp/static/js/matCode/matCode.js
index 8351966..a5871d6 100644
--- a/src/main/webapp/static/js/matCode/matCode.js
+++ b/src/main/webapp/static/js/matCode/matCode.js
@@ -445,7 +445,7 @@
type: 'datetime'
});
layDate.render({
- elem: '#modiTime\\$',
+ elem: 'modiTime#\\$',
type: 'datetime'
});
layDate.render({
diff --git a/src/main/webapp/static/js/matOut/matOut.js b/src/main/webapp/static/js/matOut/matOut.js
new file mode 100644
index 0000000..cfd471f
--- /dev/null
+++ b/src/main/webapp/static/js/matOut/matOut.js
@@ -0,0 +1,183 @@
+
+var locDetlData = [];
+function getCol() {
+ var cols = [
+ {fixed: 'left', field: 'count', title: '鏁伴噺(蹇呭~)', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}
+ ,{field: 'billNo', title:'鍗曟嵁缂栧彿', align: 'center'}
+ ,{field: 'seqNo', title:'搴忓彿', align: 'center', width:80}
+ ,{field: 'qty', title:'閫氱煡鍑哄簱閲�', align: 'center'}
+ ,{field: 'outQty', title:'宸插嚭搴撻噺', align: 'center'}
+ ];
+ arrRemove(detlCols, 'field', 'qty');
+ cols.push.apply(cols, detlCols);
+ // cols.push({fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:80})
+ return cols;
+}
+
+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',
+ headers: {token: localStorage.getItem('token')},
+ data: [],
+ even: true,
+ toolbar: '#toolbar',
+ cellMinWidth: 50,
+ cols: [getCol()],
+ done: function(res, curr, count) {
+ limit();
+ getOutBound();
+ }
+ });
+
+ // 椤甸潰淇敼
+ table.on('edit(chooseData)', function (obj) {
+ updateLocDetlData(obj.data.locNo, obj.data.billNo, obj.data.seqNo, obj.data.matNo, Number(obj.value));
+ });
+
+ // 鐩戝惉澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(chooseData)', function (obj) {
+ var data = locDetlData;
+ switch (obj.event) {
+ case 'outbound':
+ if (data.length === 0){
+ layer.msg('璇峰厛娣诲姞浜у搧');
+ } else {
+ var staNo = $("#staNoSelect").val();
+ if (staNo === "" || staNo === null){
+ layer.msg("璇烽�夋嫨鍑哄簱鍙�");
+ return;
+ }
+ debugger
+ var locDetls = [];
+ data.forEach(function(elem) {
+ locDetls.push({locNo: elem.locNo,billNo:elem.billNo,seqNo:elem.seqNo, matNo: elem.matNo, count: elem.count});
+ });
+ let param = {
+ outSite: staNo,
+ locDetls: locDetls
+ }
+ $.ajax({
+ url: baseUrl+"/mat/out/start",
+ headers: {'token': localStorage.getItem('token')},
+ data: JSON.stringify(param),
+ contentType:'application/json;charset=UTF-8',
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200){
+ locDetlData = [];
+ tableIns.reload({data: locDetlData,done:function (res) {limit();getOutBound();}});
+ layer.msg(res.msg);
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ } else {
+ layer.msg(res.msg)
+ }
+ }
+ });
+ }
+ break;
+ }
+ });
+
+ // 鐩戝惉琛屽伐鍏蜂簨浠�
+ table.on('tool(chooseData)', function(obj){
+ var data = obj.data;
+ switch (obj.event) {
+ case 'remove':
+ for (var i = locDetlData.length - 1; i >= 0; i--) {
+ if (locDetlData[i].locNo === data.locNo && locDetlData[i].matNo === data.matNo) {
+ locDetlData.splice(i, 1);
+ }
+ }
+ tableIns.reload({data: locDetlData,done:function (res) {limit();getOutBound();}});
+ break;
+ }
+ });
+
+ function updateLocDetlData(locNo, matNo, count) {
+ if (isNaN(count)) {
+ layer.msg("璇疯緭鍏ユ暟瀛�");
+ } else {
+ if (count > 0) {
+ for (var i=0;i<locDetlData.length;i++){
+ if (locDetlData[i]["locNo"] === locNo && locDetlData[i]["matNo"] === matNo){
+ if (count > locDetlData[i]["anfme"]) {
+ layer.msg("涓嶈兘瓒呰繃鍘熸暟閲�");
+ } else {
+ locDetlData[i]["count"] = count;
+ }
+ break;
+ }
+ }
+ } else {
+ layer.msg("鏁伴噺蹇呴』澶т簬闆�");
+ }
+ }
+ tableIns.reload({data: locDetlData,done:function (res) {limit(); getOutBound();}});
+ }
+
+ // 鑾峰彇鍑哄簱鍙�
+ 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 = $("#takeSiteSelectTemplate").html();
+ var template = Handlebars.compile(tpl);
+ var html = template(res);
+ $('#staNoSelect').append(html);
+ form.render('select');
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ }else {
+ layer.msg(res.msg)
+ }
+ }
+ })
+ }
+})
+
+// 鎻愬彇浜у搧
+var locDetlLayerIdx;
+function getLocDetl() {
+ locDetlLayerIdx = layer.open({
+ type: 2,
+ title: '鎻愬彇鍑鸿揣鍐呭',
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ shadeClose: true,
+ content: 'waitMatoutQuery.html',
+ success: function(layero, index){
+ }
+ });
+}
+
+// 娣诲姞琛ㄦ牸鏁版嵁
+function addTableData(data) {
+ for (var i=0;i<data.length;i++){
+ let pass = false;
+ for (var j=0;j<locDetlData.length;j++){
+ if (data[i].billNo === locDetlData[j].billNo && data[i].seqNo === locDetlData[j].seqNo) {
+ pass = true;
+ break;
+ }
+ }
+ if (pass) {
+ data.splice(i--, 1);
+ } else {
+ data[i]["count"] = data[i]["qty"];
+ }
+
+ }
+ locDetlData.push.apply(locDetlData, data);
+ tableIns.reload({data: locDetlData});
+ layer.close(locDetlLayerIdx);
+}
\ No newline at end of file
diff --git a/src/main/webapp/static/js/pakStore/stockOut.js b/src/main/webapp/static/js/pakStore/stockOut.js
index 5165a6c..6c08a87 100644
--- a/src/main/webapp/static/js/pakStore/stockOut.js
+++ b/src/main/webapp/static/js/pakStore/stockOut.js
@@ -121,7 +121,7 @@
// 鑾峰彇鍑哄簱鍙�
function getOutBound(){
$.ajax({
- url: baseUrl+"/available/take/site/1",
+ url: baseUrl+"/available/take/site",
headers: {'token': localStorage.getItem('token')},
method: 'POST',
async: false,
diff --git a/src/main/webapp/static/js/waitMatin/waitMatin.js b/src/main/webapp/static/js/waitMatin/waitMatin.js
index e73e593..8f831a1 100644
--- a/src/main/webapp/static/js/waitMatin/waitMatin.js
+++ b/src/main/webapp/static/js/waitMatin/waitMatin.js
@@ -238,16 +238,20 @@
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
+ });
}
layDateRender();
diff --git a/src/main/webapp/static/js/waitMatout/waitMatout.js b/src/main/webapp/static/js/waitMatout/waitMatout.js
new file mode 100644
index 0000000..75d07ef
--- /dev/null
+++ b/src/main/webapp/static/js/waitMatout/waitMatout.js
@@ -0,0 +1,274 @@
+var pageCurr;
+layui.config({
+ base: baseUrl + "/static/layui/lay/modules/"
+}).use(['table','laydate', 'form', 'admin'], function(){
+ var table = layui.table;
+ var $ = layui.jquery;
+ var layer = layui.layer;
+ var layDate = layui.laydate;
+ var form = layui.form;
+ var admin = layui.admin;
+
+ // 鏁版嵁娓叉煋
+ tableIns = table.render({
+ elem: '#waitMatout',
+ headers: {token: localStorage.getItem('token')},
+ url: baseUrl+'/waitMatout/list/auth',
+ page: true,
+ limit: 16,
+ limits: [16, 30, 50, 100, 200, 500],
+ toolbar: '#toolbar',
+ cellMinWidth: 50,
+ cols: [[
+ {type: 'checkbox'}
+ ,{field: 'billNo', align: 'center',title: '鍗曟嵁缂栧彿'}
+ ,{field: 'seqNo', align: 'center',title: '搴忓彿'}
+ ,{field: 'billType$', align: 'center',title: '鍗曟嵁绫诲瀷'}
+ ,{field: 'matNo', align: 'center',title: '鐗╂枡缂栫爜'}
+ ,{field: 'matName', align: 'center',title: '鐗╂枡鍚嶇О'}
+ ,{field: 'qty', align: 'center',title: '鏁伴噺'}
+ ,{field: 'specs', align: 'center',title: '瑙勬牸'}
+ ,{field: 'unit', align: 'center',title: '鍗曚綅'}
+ ,{field: 'size', align: 'center',title: '灏哄', hide: true}
+ ,{field: 'color', align: 'center',title: '棰滆壊', hide: true}
+ ,{field: 'weight', align: 'center',title: '鍗曢噸', hide: true}
+ ,{field: 'memo', align: 'center',title: '澶囨敞', hide: true}
+ ,{field: 'outQty', align: 'center',title: '宸插嚭搴撻噺'}
+ ,{field: 'linkErp$', align: 'center',title: 'ERP杩炵嚎'}
+ ,{field: 'ioStatus$', align: 'center',title: '瀹屾垚鐘舵��'}
+ ,{field: 'ioTime$', align: 'center',title: '瀹屾垚鏃堕棿', hide: true}
+ ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳',event: 'modiUser', style: 'cursor:pointer', hide: true}
+ ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿', hide: true}
+ ,{field: 'appeUser$', align: 'center',title: '寤烘。浜哄憳',event: 'appeUser', style: 'cursor:pointer', hide: true}
+ ,{field: 'appeTime$', 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();
+ }
+ });
+
+ // 鐩戝惉鎺掑簭浜嬩欢
+ table.on('sort(waitMatout)', 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}
+ });
+ });
+
+ // 鐩戝惉澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(waitMatout)', function (obj) {
+ var checkStatus = table.checkStatus(obj.config.id).data;
+ switch(obj.event) {
+ case 'addData':
+ showEditModel();
+ break;
+ case 'deleteData':
+ if (checkStatus.length === 0) {
+ layer.msg('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁', {icon: 2});
+ return;
+ }
+ var ids = checkStatus.map(function (d) {
+ return d.seqNo;
+ });
+ del(ids);
+ 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 = {
+ 'waitMatout': exportData,
+ 'fields': fields
+ };
+ $.ajax({
+ url: baseUrl+"/waitMatout/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, {icon: 2})
+ }
+ }
+ });
+ });
+ break;
+ }
+ });
+
+ // 鐩戝惉琛屽伐鍏蜂簨浠�
+ table.on('tool(waitMatout)', function(obj){
+ var data = obj.data;
+ switch (obj.event) {
+ case 'edit':
+ showEditModel(data);
+ break;
+ case "del":
+ var ids = [data.seqNo];
+ del(ids);
+ break;
+ }
+ });
+
+ /* 寮圭獥 - 鏂板銆佷慨鏀� */
+ function showEditModel(mData) {
+ admin.open({
+ type: 1,
+ area: '600px',
+ title: (mData ? '淇敼' : '娣诲姞') + '璁㈠崟鐘舵��',
+ content: $('#editDialog').html(),
+ success: function (layero, dIndex) {
+ layDateRender();
+ form.val('detail', mData);
+ form.on('submit(editSubmit)', function (data) {
+ var loadIndex = layer.load(2);
+ $.ajax({
+ url: baseUrl+"/waitMatout/"+(mData?'update':'add')+"/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: data.field,
+ method: 'POST',
+ success: function (res) {
+ layer.close(loadIndex);
+ if (res.code === 200){
+ layer.close(dIndex);
+ layer.msg(res.msg, {icon: 1});
+ tableReload();
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ }else {
+ layer.msg(res.msg, {icon: 2});
+ }
+ }
+ })
+ return false;
+ });
+ $(layero).children('.layui-layer-content').css('overflow', 'visible');
+ layui.form.render('select');
+ }
+ });
+ }
+
+ /* 鍒犻櫎 */
+ function del(ids) {
+ layer.confirm('纭畾瑕佸垹闄ら�変腑鏁版嵁鍚楋紵', {
+ skin: 'layui-layer-admin',
+ shade: .1
+ }, function (i) {
+ layer.close(i);
+ var loadIndex = layer.load(2);
+ $.ajax({
+ url: baseUrl+"/waitMatout/delete/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: {ids: ids},
+ method: 'POST',
+ success: function (res) {
+ layer.close(loadIndex);
+ if (res.code === 200){
+ layer.msg(res.msg, {icon: 1});
+ tableReload();
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ } else {
+ layer.msg(res.msg, {icon: 2});
+ }
+ }
+ })
+ });
+ }
+
+ // 鎼滅储
+ form.on('submit(search)', function (data) {
+ pageCurr = 1;
+ tableReload(false);
+ });
+
+ // 閲嶇疆
+ form.on('submit(reset)', function (data) {
+ pageCurr = 1;
+ clearFormVal($('#search-box'));
+ tableReload(false);
+ });
+
+ // 鏃堕棿閫夋嫨鍣�
+ function layDateRender() {
+ 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
+ });
+ }
+ layDateRender();
+
+});
+
+// 鍏抽棴鍔ㄤ綔
+$(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;
+ });
+ tableIns.reload({
+ where: searchData,
+ page: {curr: pageCurr}
+ });
+}
diff --git a/src/main/webapp/views/matCode/matCode.html b/src/main/webapp/views/matCode/matCode.html
index a1fa1e0..6cfe00c 100644
--- a/src/main/webapp/views/matCode/matCode.html
+++ b/src/main/webapp/views/matCode/matCode.html
@@ -56,9 +56,9 @@
<div class="layui-input-inline">
<input class="layui-input" type="text" name="mat_no" placeholder="浜у搧缂栫爜" autocomplete="off">
</div>
+ </div>
<!-- 鏃ユ湡鑼冨洿 -->
<div class="layui-inline" style="width: 300px">
- </div>
<div class="layui-input-inline">
<input class="layui-input layui-laydate-range" name="modi_time" type="text" placeholder="璧峰鏃堕棿 - 缁堟鏃堕棿" autocomplete="off" style="width: 300px">
</div>
diff --git a/src/main/webapp/views/matOut/matOut.html b/src/main/webapp/views/matOut/matOut.html
new file mode 100644
index 0000000..1a8855a
--- /dev/null
+++ b/src/main/webapp/views/matOut/matOut.html
@@ -0,0 +1,129 @@
+<!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>
+ html {
+ height: 100%;
+ padding: 10px;
+ background-color: #f1f1f1;
+ }
+ body {
+ background-color: #fff;
+ border-radius: 5px;
+ box-shadow: 0 0 3px rgba(0,0,0,.3);
+ padding-bottom: 20px;
+ }
+
+ #staNoSpan {
+ text-align: center;
+ display: inline-block;
+ width: 100px;
+ font-size: 13px;
+ }
+ .layui-btn-container .layui-form-select {
+ display: inline-block;
+ width: 150px;
+ height: 30px;
+ }
+ .layui-btn-container .layui-form-select.layui-form-selected {
+ display: inline-block;
+ width: 150px;
+ }
+ .layui-btn-container .layui-select-title input {
+ font-size: 13px;
+ }
+ .layui-btn-container .layui-anim.layui-anim-upbit dd {
+ font-size: 13px;
+ }
+
+ #btn-outbound {
+ margin-left: 60px;
+ display: none;
+ }
+
+ /*----------------------------------*/
+ .function-area {
+ padding: 20px 50px;
+ }
+ .function-btn {
+ font-size: 16px;
+ padding: 1px 1px 1px 1px;
+ width: 100px;
+ height: 50px;
+ border-color: #2b425b;
+ border-radius: 4px;
+ border-width: 2px;
+ background: none;
+ border-style: solid;
+ transition: 0.4s;
+ cursor: pointer;
+ letter-spacing: 3px;
+ }
+ .function-btn:hover {
+ background-color: #2b425b;
+ color: #fff;
+ }
+
+ #mat-query {
+ display: none;
+ }
+ </style>
+</head>
+<body>
+
+<!-- 鍔熻兘鍖� -->
+<div class="function-area">
+ <button id="mat-query" class="function-btn" onclick="getLocDetl()">鏂板</button>
+</div>
+
+<hr>
+
+<!-- 琛ㄦ牸 -->
+<div style="padding-bottom: 5px; margin-bottom: 45px">
+
+ <!-- 澶撮儴 -->
+ <script type="text/html" id="toolbar">
+ <div class="layui-form">
+ <div class="layui-btn-container">
+ <!-- 1.閫夋嫨鍑哄簱鍙� -->
+ <span id="staNoSpan">鍑哄簱鍙o細</span>
+ <select id="staNoSelect" lay-verify="required">
+ <option value="">璇烽�夋嫨绔欑偣</option>
+ </select>
+ <!-- 2.鍚姩鍑哄簱 -->
+ <button class="layui-btn layui-btn-lg" id="btn-outbound" lay-event="outbound">鍚姩鍑哄簱</button>
+ </div>
+ </div>
+ </script>
+
+ <!-- 琛� -->
+ <script type="text/html" id="operate">
+ <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="remove">绉婚櫎</a>
+ </script>
+
+ <table class="layui-table" id="chooseData" lay-filter="chooseData"></table>
+</div>
+
+<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>
+<script type="text/javascript" src="../../static/js/matOut/matOut.js" charset="utf-8"></script>
+
+<script type="text/template" id="takeSiteSelectTemplate">
+ {{#each data}}
+ <option value="{{siteId}}">{{desc}}</option>
+ {{/each}}
+</script>
+</body>
+</html>
+
diff --git a/src/main/webapp/views/matOut/waitMatoutQuery.html b/src/main/webapp/views/matOut/waitMatoutQuery.html
new file mode 100644
index 0000000..8756b0f
--- /dev/null
+++ b/src/main/webapp/views/matOut/waitMatoutQuery.html
@@ -0,0 +1,250 @@
+<!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>
+ body {
+ padding: 0 20px;
+ }
+ .layui-table-box {
+ border-right: 1px solid #9F9F9F;
+ border-left: 1px solid #9F9F9F;
+ }
+
+ #search-box {
+ padding: 30px 0 20px 0;
+ }
+ #search-box .layui-inline:first-child {
+ margin-left: 30px;
+ }
+ #search-box .layui-inline {
+ margin-right: 5px;
+ }
+
+ #data-search-btn {
+ margin-left: 10px;
+ display: inline-block;
+ }
+ #data-search-btn.layui-btn-container .layui-btn {
+ margin-right: 20px;
+ }
+ </style>
+</head>
+<body>
+
+<!-- 鎼滅储鏍� -->
+<fieldset class="layui-elem-field site-demo-button" style="margin: 20px;">
+ <legend>鎼滅储鏍�</legend>
+ <!-- 鎼滅储鏍� -->
+ <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="bill_no" placeholder="鍗曟嵁缂栧彿" autocomplete="off">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="mat_no" placeholder="浜у搧缂栫爜" autocomplete="off">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="mat_name" 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" style="display: inline-block">
+ <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>
+</fieldset>
+
+<script type="text/html" id="toolbar">
+ <div class="layui-btn-container">
+ <button class="layui-btn" id="btn-confirm" lay-event="confirm" style="">鎻愬彇</button>
+ </div>
+</script>
+
+<div class="layui-form">
+ <table class="layui-hide" id="stockOut" lay-filter="stockOut"></table>
+</div>
+
+<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>
+
+</body>
+<script>
+
+ var pageCurr;
+ function getCol() {
+ var cols = [
+ {type: 'checkbox', fixed: 'left'}
+ ,{field: 'qty', title: '閫氱煡鍑哄簱閲�', fixed: 'left', width:100}
+ ,{field: 'outQty', title: '宸插嚭搴撻噺', fixed: 'left', width:90}
+ ];
+ cols.push.apply(cols, matCols);
+ cols.push({field: 'billNo', title:'鍗曟嵁缂栧彿', align: 'center'}
+ ,{field: 'seqNo', title:'搴忓彿', align: 'center', width:80}
+ ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide: true}
+ ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'})
+ return cols;
+ }
+
+ 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;
+ // 鏁版嵁娓叉煋
+ locDetlTableIns = table.render({
+ elem: '#stockOut',
+ headers: {token: localStorage.getItem('token')},
+ url: baseUrl+'/waitMatout/list/auth',
+ page: true,
+ limit: 10,
+ even: true,
+ toolbar: '#toolbar',
+ cellMinWidth: 50,
+ cols: [getCol()],
+ 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;
+ // $('.layui-form-checkbox').css("pointer-events", "none");
+ // $('td[data-field="0').css("cursor", "pointer")
+ }
+ });
+
+ // 鐩戝惉澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(stockOut)', function (obj) {
+ var checkStatus = table.checkStatus(obj.config.id);
+ var data = checkStatus.data;
+ switch(obj.event) {
+ case 'confirm':
+ if (data.length === 0){
+ layer.msg("璇烽�夋嫨鏁版嵁");
+ return;
+ }
+ var locNos = [];
+ data.forEach(function(elem) {
+ locNos.push(elem.locNo);
+ });
+ $.ajax({
+ url: baseUrl+"/locDetl/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: {locNos:locNos},
+ method: 'POST',
+ async: false,
+ success: function (res) {
+ if (res.code === 200) {
+ data = res.data;
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/";
+ } else {
+ layer.msg(res.msg)
+ }
+ }
+ })
+ parent.addTableData(data);
+ break;
+ }
+ });
+
+ // 鎼滅储鏍忔悳绱簨浠�
+ form.on('submit(search)', function (data) {
+ pageCurr = 1;
+ tableReload();
+ });
+
+ // 鎼滅储鏍忛噸缃簨浠�
+ form.on('submit(reset)', function (data) {
+ pageCurr = 1;
+ clearFormVal($('#search-box'));
+ tableReload();
+ });
+
+ layDate.render({
+ elem: '.layui-laydate-range'
+ ,type: 'datetime'
+ ,range: true
+ });
+ })
+
+ var b = true;
+ $(function(){
+ $(document.body).on('click','td[data-field="0"]',function(){
+ var locNo = $(this).next().children("div").html();
+ if (b) {
+ b = false;
+ $("tr td[data-field=locNo\\$] div:contains("+ locNo +")").parent().prev().children().children("div").click();
+ setTimeout(function () {
+ b = true;
+ }, 200)
+ }
+ });
+ })
+
+ function tableReload(child) {
+ var searchData = {};
+ $.each($('#search-box [name]').serializeArray(), function() {
+ searchData[this.name] = this.value;
+ });
+ locDetlTableIns.reload({
+ where: searchData,
+ page: {
+ curr: pageCurr
+ },
+ done: function (res, curr, count) {
+ if (res.code === 403) {
+ top.location.href = baseUrl+"/";
+ }
+ pageCurr=curr;
+ $('.layui-form-checkbox').css("pointer-events", "none");
+ $('td[data-field="0').css("cursor", "pointer")
+ }
+ });
+ }
+
+ function clearFormVal(el) {
+ $(':input', el)
+ .val('')
+ .removeAttr('checked')
+ .removeAttr('selected');
+ }
+</script>
+</html>
+
diff --git a/src/main/webapp/views/waitMatin/waitMatin.html b/src/main/webapp/views/waitMatin/waitMatin.html
index 711ac91..c6ec045 100644
--- a/src/main/webapp/views/waitMatin/waitMatin.html
+++ b/src/main/webapp/views/waitMatin/waitMatin.html
@@ -49,7 +49,18 @@
<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="id" placeholder="缂栧彿" autocomplete="off">
+ <input class="layui-input" type="text" name="bill_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" id="modi_time" name="modi_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>
<!-- 寰呮坊鍔� -->
diff --git a/src/main/webapp/views/waitMatout/waitMatout.html b/src/main/webapp/views/waitMatout/waitMatout.html
new file mode 100644
index 0000000..6310e90
--- /dev/null
+++ b/src/main/webapp/views/waitMatout/waitMatout.html
@@ -0,0 +1,218 @@
+<!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/admin.css?v=318" 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="bill_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" id="modi_time" name="modi_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="waitMatout" lay-filter="waitMatout"></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">瀵煎嚭</button>
+ </div>
+</script>
+
+<script type="text/html" id="operate">
+ <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">淇敼</a>
+ <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">鍒犻櫎</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/waitMatout/waitMatout.js" charset="utf-8"></script>
+</body>
+<!-- 琛ㄥ崟寮圭獥 -->
+<script type="text/html" id="editDialog">
+ <form id="detail" lay-filter="detail" class="layui-form admin-form">
+ <input name="id" type="hidden">
+ <div class="layui-row">
+ <div class="layui-col-md12">
+ <div class="layui-form-item">
+ <label class="layui-form-label layui-form-required">鍗曟嵁缂栧彿: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="billNo" placeholder="璇疯緭鍏ュ崟鎹紪鍙�" lay-vertype="tips" lay-verify="required">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label layui-form-required">搴忓彿: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="seqNo" placeholder="璇疯緭鍏ュ簭鍙�" lay-vertype="tips" lay-verify="required">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">鍗曟嵁绫诲瀷: </label>
+ <div class="layui-input-block">
+ <select name="billType">
+ <option value="">璇烽�夋嫨鍗曟嵁绫诲瀷</option>
+ <option value="1">閿�鍞嚭搴�</option>
+ <option value="2">棰嗘枡鍑哄簱</option>
+ <option value="3">璋冩嫧鍑哄簱</option>
+ <option value="4">閲囪喘閫�鍥炲嚭搴�</option>
+ <option value="5">鍏朵粬鍑哄簱</option>
+ </select>
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label layui-form-required">鐗╂枡缂栫爜: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="matNo" placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�" lay-vertype="tips" lay-verify="required">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label layui-form-required">鐗╂枡鍚嶇О: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="matName" placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" lay-vertype="tips" lay-verify="required">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">鏁伴噺: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="qty" placeholder="璇疯緭鍏ユ暟閲�">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">瑙勬牸: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="specs" placeholder="璇疯緭鍏ヨ鏍�">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">鍗曚綅: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="unit" placeholder="璇疯緭鍏ュ崟浣�">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">灏哄: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="size" placeholder="璇疯緭鍏ュ昂瀵�">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">棰滆壊: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="color" placeholder="璇疯緭鍏ラ鑹�">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">鍗曢噸: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="weight" placeholder="璇疯緭鍏ュ崟閲�">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">澶囨敞: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="memo" placeholder="璇疯緭鍏ュ娉�">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">宸插嚭搴撻噺: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="outQty" placeholder="璇疯緭鍏ュ凡鍑哄簱閲�">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">ERP杩炵嚎: </label>
+ <div class="layui-input-block">
+ <select name="linkErp">
+ <option value="">璇烽�夋嫨ERP杩炵嚎</option>
+ <option value="0">闈炶繛绾�</option>
+ <option value="1">ERP杩炵嚎</option>
+ </select>
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">瀹屾垚鐘舵��: </label>
+ <div class="layui-input-block">
+ <select name="ioStatus">
+ <option value="">璇烽�夋嫨瀹屾垚鐘舵��</option>
+ <option value="0">寰呭鐞�</option>
+ <option value="1">鍑哄簱涓�</option>
+ <option value="2">鍑哄簱瀹屾垚</option>
+ <option value="3">鍙栨秷鍑哄簱</option>
+ </select>
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">瀹屾垚鏃堕棿: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="ioTime" id="ioTime$" placeholder="璇疯緭鍏ュ畬鎴愭椂闂�">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">淇敼浜哄憳: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="modiUser" placeholder="璇疯緭鍏ヤ慨鏀逛汉鍛�">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">淇敼鏃堕棿: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="modiTime" id="modiTime$" placeholder="璇疯緭鍏ヤ慨鏀规椂闂�">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">寤烘。浜哄憳: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="appeUser" placeholder="璇疯緭鍏ュ缓妗d汉鍛�">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">寤烘。鏃堕棿: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="appeTime" id="appeTime$" placeholder="璇疯緭鍏ュ缓妗f椂闂�">
+ </div>
+ </div>
+
+ </div>
+ </div>
+ <hr class="layui-bg-gray">
+ <div class="layui-form-item text-right">
+ <button class="layui-btn" lay-filter="editSubmit" lay-submit="">淇濆瓨</button>
+ <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">鍙栨秷</button>
+ </div>
+ </form>
+</script>
+</html>
+
--
Gitblit v1.9.1