Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
4d05d5ee
Commit
4d05d5ee
authored
Apr 22, 2020
by
季圣华
Browse files
解决单位被删后导致商品选择的bug
parent
19a90d57
Changes
2
Show whitespace changes
Inline
Side-by-side
erp_web/pages/manage/unit.html
View file @
4d05d5ee
...
@@ -330,10 +330,18 @@
...
@@ -330,10 +330,18 @@
oldUnit
=
""
;
oldUnit
=
""
;
unitID
=
0
;
unitID
=
0
;
url
=
'
/unit/add
'
;
url
=
'
/unit/add
'
;
//单位名称事件
$
(
"
#basicName
"
).
textbox
(
'
textbox
'
).
bind
(
"
keyup
"
,
function
()
{
$
(
"
#unitName
"
).
text
(
$
(
this
).
val
());
});
}
}
//保存信息
//保存信息
$
(
"
#saveUnit
"
).
off
(
"
click
"
).
on
(
"
click
"
,
function
()
{
$
(
"
#saveUnit
"
).
off
(
"
click
"
).
on
(
"
click
"
,
function
()
{
if
(
!
$
(
'
#unitFM
'
).
form
(
'
validate
'
)){
return
;
}
else
{
if
(
checkUnitName
())
{
if
(
checkUnitName
())
{
return
;
return
;
}
}
...
@@ -354,8 +362,8 @@
...
@@ -354,8 +362,8 @@
ratio
:
otherNum
ratio
:
otherNum
})
})
}),
}),
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
===
200
)
{
if
(
res
&&
res
.
code
===
200
)
{
$
(
'
#unitDlg
'
).
dialog
(
'
close
'
);
$
(
'
#unitDlg
'
).
dialog
(
'
close
'
);
//加载完以后重新初始化
//加载完以后重新初始化
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
...
@@ -368,6 +376,7 @@
...
@@ -368,6 +376,7 @@
return
;
return
;
}
}
});
});
}
});
});
//编辑信息
//编辑信息
...
@@ -382,6 +391,10 @@
...
@@ -382,6 +391,10 @@
$
(
"
#otherNum
"
).
textbox
(
"
setValue
"
,
rowsdata
.
ratio
);
$
(
"
#otherNum
"
).
textbox
(
"
setValue
"
,
rowsdata
.
ratio
);
$
(
"
#unitName
"
).
text
(
rowsdata
.
basicUnit
);
$
(
"
#unitName
"
).
text
(
rowsdata
.
basicUnit
);
url
=
'
/unit/update?id=
'
+
rowsdata
.
id
;
url
=
'
/unit/update?id=
'
+
rowsdata
.
id
;
//单位名称事件
$
(
"
#basicName
"
).
textbox
(
'
textbox
'
).
bind
(
"
keyup
"
,
function
()
{
$
(
"
#unitName
"
).
text
(
$
(
this
).
val
());
});
}
}
//检查名称是否存在 ++ 重名无法提示问题需要跟进
//检查名称是否存在 ++ 重名无法提示问题需要跟进
...
@@ -472,11 +485,6 @@
...
@@ -472,11 +485,6 @@
$
(
"
#searchBtn
"
).
click
();
$
(
"
#searchBtn
"
).
click
();
}
}
});
});
//单位名称事件
$
(
"
#basicName
"
).
off
(
"
keyup
"
).
on
(
"
keyup
"
,
function
()
{
$
(
"
#unitName
"
).
text
(
$
(
this
).
val
());
});
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
src/main/java/com/jsh/erp/controller/MaterialController.java
View file @
4d05d5ee
...
@@ -157,8 +157,10 @@ public class MaterialController {
...
@@ -157,8 +157,10 @@ public class MaterialController {
ratio
=
""
;
ratio
=
""
;
}
else
{
}
else
{
ratio
=
material
.
getUnitName
();
ratio
=
material
.
getUnitName
();
if
(
ratio
!=
null
)
{
ratio
=
ratio
.
substring
(
ratio
.
indexOf
(
"("
));
ratio
=
ratio
.
substring
(
ratio
.
indexOf
(
"("
));
}
}
}
//品名/型号/扩展信息/包装
//品名/型号/扩展信息/包装
String
MaterialName
=
""
;
String
MaterialName
=
""
;
String
mBarCode
=
""
;
String
mBarCode
=
""
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment