From e4e8132629c4d8d9ea3ac585b3f22793be000fa5 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期四, 18 六月 2020 17:09:59 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java | 10 +++++-----
src/main/webapp/static/js/pakStore/stockAdjust.js | 23 ++++++++++++++---------
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java | 12 +++++++++---
3 files changed, 28 insertions(+), 17 deletions(-)
diff --git a/src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java b/src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java
index 9483bf4..5947e14 100644
--- a/src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java
+++ b/src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java
@@ -16,17 +16,17 @@
public static class LocDetlAdjust {
// 鐗╂枡鍙�
- private String matNo;
+ private String matnr;
// 鍙樻洿鏁伴噺
private Double count;
- public String getMatNo() {
- return matNo;
+ public String getMatnr() {
+ return matnr;
}
- public void setMatNo(String matNo) {
- this.matNo = matNo;
+ public void setMatnr(String matnr) {
+ this.matnr = matnr;
}
public Double getCount() {
diff --git a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
index 72a4744..496d6bb 100644
--- a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -469,13 +469,19 @@
throw new CoolException("搴撲綅涓嶅瓨鍦�");
}
for (LocDetlAdjustParam.LocDetlAdjust adjust : param.getList()) {
+ if (Cools.isEmpty(adjust.getMatnr())) {
+ throw new CoolException(BaseRes.PARAM);
+ }
LocDetl sqlParam = new LocDetl();
sqlParam.setLocNo(locMast.getLocNo());
- sqlParam.setMatnr(adjust.getMatNo());
+ sqlParam.setMatnr(adjust.getMatnr());
LocDetl one = locDetlService.selectOne(new EntityWrapper<>(sqlParam));
// 淇濆瓨鏂板簱瀛樻槑缁�
if (Cools.isEmpty(one)) {
- MatCode matCode = matCodeService.selectById(adjust.getMatNo());
+ if (adjust.getCount() == 0){
+ continue;
+ }
+ MatCode matCode = matCodeService.selectById(adjust.getMatnr());
LocDetl locDetl = new LocDetl();
locDetl.setLocNo(locMast.getLocNo());
locDetl.setMatnr(matCode.getMatNo());
@@ -512,7 +518,7 @@
sqlParam1.setModiUser(userId);
if (!locDetlService.update(sqlParam1, new EntityWrapper<LocDetl>()
.eq("loc_no", locMast.getLocNo())
- .eq("matnr", adjust.getMatNo()))) {
+ .eq("matnr", adjust.getMatnr()))) {
throw new CoolException("淇敼搴撳瓨鏄庣粏澶辫触");
}
}
diff --git a/src/main/webapp/static/js/pakStore/stockAdjust.js b/src/main/webapp/static/js/pakStore/stockAdjust.js
index b4df94a..d227469 100644
--- a/src/main/webapp/static/js/pakStore/stockAdjust.js
+++ b/src/main/webapp/static/js/pakStore/stockAdjust.js
@@ -19,7 +19,6 @@
cols: [[
{fixed: 'left', field: 'count', title: '瀹為檯鏁伴噺', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}
,{field: 'anfme', align: 'center',title: '鏁伴噺'}
- ,{field: 'locNo$', align: 'center',title: '搴撲綅鍙�'}
,{field: 'matnr', align: 'center',title: '鐗╂枡'}
,{field: 'lgnum', align: 'center',title: '浠撳簱鍙�'}
,{field: 'tbnum', align: 'center',title: '杞偍璇锋眰缂栧彿'}
@@ -79,7 +78,7 @@
success: function (res) {
if (res.code === 200){
layer.msg(currLocNo + res.msg);
- reset();
+ init(currLocNo)
} else if (res.code === 403){
top.location.href = baseUrl+"/";
}else {
@@ -115,6 +114,15 @@
layer.msg("璇疯緭鍏ュ簱浣嶅彿");
return;
}
+ init(locNo);
+ });
+
+ // 閲嶇疆浜嬩欢
+ form.on('submit(reset)', function (data) {
+ reset();
+ });
+
+ function init(locNo) {
http.post(baseUrl + "/locDetl/list/auth", {locNo: locNo,limit: 1000}, function (res) {
matCodeData = [];
let data = res.data.records;
@@ -126,12 +134,7 @@
locTips(true, locNo);
tableReload();
})
- });
-
- // 閲嶇疆浜嬩欢
- form.on('submit(reset)', function (data) {
- reset();
- });
+ }
function reset() {
clearFormVal($('#search-box'));
@@ -230,7 +233,9 @@
count: initCountVal,
anfme: initAnfmeVal,
removeBtn: true,
- matnr: data[i].matNo
+ matnr: data[i].matNo,
+ maktx: data[i].matName,
+ altme: data[i].str1,
})
}
matCodeData.push.apply(matCodeData,applyData);
--
Gitblit v1.9.1