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
37c64788
Commit
37c64788
authored
Jan 29, 2019
by
乾坤平台
Committed by
季圣华
Jan 29, 2019
Browse files
!22 添加出库时开启序列号的商品强制附加使用序列号
Merge pull request !22 from 乾坤平台/master
parents
b55e9d15
88f4420d
Changes
37
Show whitespace changes
Inline
Side-by-side
erp_web/js/easyui-1.3.5/themes/icon.css
View file @
37c64788
...
...
@@ -97,3 +97,6 @@
.icon-page-excel
{
background
:
url('icons/page_excel.png')
no-repeat
center
center
;
}
.icon-basket_add
{
background
:
url('icons/basket_add.png')
no-repeat
center
center
;
}
\ No newline at end of file
erp_web/js/easyui-1.3.5/themes/icons/basket_add.png
0 → 100644
View file @
37c64788
752 Bytes
erp_web/js/md5/md5.js
0 → 100644
View file @
37c64788
/*
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
* Digest Algorithm, as defined in RFC 1321.
* Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
* Distributed under the BSD License
* See http://pajhome.org.uk/crypt/md5 for more info.
*/
/*
* Configurable variables. You may need to tweak these to be compatible with
* the server-side, but the defaults work in most cases.
*/
var
hexcase
=
0
;
/* hex output format. 0 - lowercase; 1 - uppercase */
var
b64pad
=
""
;
/* base-64 pad character. "=" for strict RFC compliance */
var
chrsz
=
8
;
/* bits per input character. 8 - ASCII; 16 - Unicode */
/*
* These are the functions you'll usually want to call
* They take string arguments and return either hex or base-64 encoded strings
*/
function
hex_md5
(
s
){
return
binl2hex
(
core_md5
(
str2binl
(
s
),
s
.
length
*
chrsz
));}
function
b64_md5
(
s
){
return
binl2b64
(
core_md5
(
str2binl
(
s
),
s
.
length
*
chrsz
));}
function
str_md5
(
s
){
return
binl2str
(
core_md5
(
str2binl
(
s
),
s
.
length
*
chrsz
));}
function
hex_hmac_md5
(
key
,
data
)
{
return
binl2hex
(
core_hmac_md5
(
key
,
data
));
}
function
b64_hmac_md5
(
key
,
data
)
{
return
binl2b64
(
core_hmac_md5
(
key
,
data
));
}
function
str_hmac_md5
(
key
,
data
)
{
return
binl2str
(
core_hmac_md5
(
key
,
data
));
}
/*
* Perform a simple self-test to see if the VM is working
*/
function
md5_vm_test
()
{
return
hex_md5
(
"
abc
"
)
==
"
900150983cd24fb0d6963f7d28e17f72
"
;
}
/*
* Calculate the MD5 of an array of little-endian words, and a bit length
*/
function
core_md5
(
x
,
len
)
{
/* append padding */
x
[
len
>>
5
]
|=
0x80
<<
((
len
)
%
32
);
x
[(((
len
+
64
)
>>>
9
)
<<
4
)
+
14
]
=
len
;
var
a
=
1732584193
;
var
b
=
-
271733879
;
var
c
=
-
1732584194
;
var
d
=
271733878
;
for
(
var
i
=
0
;
i
<
x
.
length
;
i
+=
16
)
{
var
olda
=
a
;
var
oldb
=
b
;
var
oldc
=
c
;
var
oldd
=
d
;
a
=
md5_ff
(
a
,
b
,
c
,
d
,
x
[
i
+
0
],
7
,
-
680876936
);
d
=
md5_ff
(
d
,
a
,
b
,
c
,
x
[
i
+
1
],
12
,
-
389564586
);
c
=
md5_ff
(
c
,
d
,
a
,
b
,
x
[
i
+
2
],
17
,
606105819
);
b
=
md5_ff
(
b
,
c
,
d
,
a
,
x
[
i
+
3
],
22
,
-
1044525330
);
a
=
md5_ff
(
a
,
b
,
c
,
d
,
x
[
i
+
4
],
7
,
-
176418897
);
d
=
md5_ff
(
d
,
a
,
b
,
c
,
x
[
i
+
5
],
12
,
1200080426
);
c
=
md5_ff
(
c
,
d
,
a
,
b
,
x
[
i
+
6
],
17
,
-
1473231341
);
b
=
md5_ff
(
b
,
c
,
d
,
a
,
x
[
i
+
7
],
22
,
-
45705983
);
a
=
md5_ff
(
a
,
b
,
c
,
d
,
x
[
i
+
8
],
7
,
1770035416
);
d
=
md5_ff
(
d
,
a
,
b
,
c
,
x
[
i
+
9
],
12
,
-
1958414417
);
c
=
md5_ff
(
c
,
d
,
a
,
b
,
x
[
i
+
10
],
17
,
-
42063
);
b
=
md5_ff
(
b
,
c
,
d
,
a
,
x
[
i
+
11
],
22
,
-
1990404162
);
a
=
md5_ff
(
a
,
b
,
c
,
d
,
x
[
i
+
12
],
7
,
1804603682
);
d
=
md5_ff
(
d
,
a
,
b
,
c
,
x
[
i
+
13
],
12
,
-
40341101
);
c
=
md5_ff
(
c
,
d
,
a
,
b
,
x
[
i
+
14
],
17
,
-
1502002290
);
b
=
md5_ff
(
b
,
c
,
d
,
a
,
x
[
i
+
15
],
22
,
1236535329
);
a
=
md5_gg
(
a
,
b
,
c
,
d
,
x
[
i
+
1
],
5
,
-
165796510
);
d
=
md5_gg
(
d
,
a
,
b
,
c
,
x
[
i
+
6
],
9
,
-
1069501632
);
c
=
md5_gg
(
c
,
d
,
a
,
b
,
x
[
i
+
11
],
14
,
643717713
);
b
=
md5_gg
(
b
,
c
,
d
,
a
,
x
[
i
+
0
],
20
,
-
373897302
);
a
=
md5_gg
(
a
,
b
,
c
,
d
,
x
[
i
+
5
],
5
,
-
701558691
);
d
=
md5_gg
(
d
,
a
,
b
,
c
,
x
[
i
+
10
],
9
,
38016083
);
c
=
md5_gg
(
c
,
d
,
a
,
b
,
x
[
i
+
15
],
14
,
-
660478335
);
b
=
md5_gg
(
b
,
c
,
d
,
a
,
x
[
i
+
4
],
20
,
-
405537848
);
a
=
md5_gg
(
a
,
b
,
c
,
d
,
x
[
i
+
9
],
5
,
568446438
);
d
=
md5_gg
(
d
,
a
,
b
,
c
,
x
[
i
+
14
],
9
,
-
1019803690
);
c
=
md5_gg
(
c
,
d
,
a
,
b
,
x
[
i
+
3
],
14
,
-
187363961
);
b
=
md5_gg
(
b
,
c
,
d
,
a
,
x
[
i
+
8
],
20
,
1163531501
);
a
=
md5_gg
(
a
,
b
,
c
,
d
,
x
[
i
+
13
],
5
,
-
1444681467
);
d
=
md5_gg
(
d
,
a
,
b
,
c
,
x
[
i
+
2
],
9
,
-
51403784
);
c
=
md5_gg
(
c
,
d
,
a
,
b
,
x
[
i
+
7
],
14
,
1735328473
);
b
=
md5_gg
(
b
,
c
,
d
,
a
,
x
[
i
+
12
],
20
,
-
1926607734
);
a
=
md5_hh
(
a
,
b
,
c
,
d
,
x
[
i
+
5
],
4
,
-
378558
);
d
=
md5_hh
(
d
,
a
,
b
,
c
,
x
[
i
+
8
],
11
,
-
2022574463
);
c
=
md5_hh
(
c
,
d
,
a
,
b
,
x
[
i
+
11
],
16
,
1839030562
);
b
=
md5_hh
(
b
,
c
,
d
,
a
,
x
[
i
+
14
],
23
,
-
35309556
);
a
=
md5_hh
(
a
,
b
,
c
,
d
,
x
[
i
+
1
],
4
,
-
1530992060
);
d
=
md5_hh
(
d
,
a
,
b
,
c
,
x
[
i
+
4
],
11
,
1272893353
);
c
=
md5_hh
(
c
,
d
,
a
,
b
,
x
[
i
+
7
],
16
,
-
155497632
);
b
=
md5_hh
(
b
,
c
,
d
,
a
,
x
[
i
+
10
],
23
,
-
1094730640
);
a
=
md5_hh
(
a
,
b
,
c
,
d
,
x
[
i
+
13
],
4
,
681279174
);
d
=
md5_hh
(
d
,
a
,
b
,
c
,
x
[
i
+
0
],
11
,
-
358537222
);
c
=
md5_hh
(
c
,
d
,
a
,
b
,
x
[
i
+
3
],
16
,
-
722521979
);
b
=
md5_hh
(
b
,
c
,
d
,
a
,
x
[
i
+
6
],
23
,
76029189
);
a
=
md5_hh
(
a
,
b
,
c
,
d
,
x
[
i
+
9
],
4
,
-
640364487
);
d
=
md5_hh
(
d
,
a
,
b
,
c
,
x
[
i
+
12
],
11
,
-
421815835
);
c
=
md5_hh
(
c
,
d
,
a
,
b
,
x
[
i
+
15
],
16
,
530742520
);
b
=
md5_hh
(
b
,
c
,
d
,
a
,
x
[
i
+
2
],
23
,
-
995338651
);
a
=
md5_ii
(
a
,
b
,
c
,
d
,
x
[
i
+
0
],
6
,
-
198630844
);
d
=
md5_ii
(
d
,
a
,
b
,
c
,
x
[
i
+
7
],
10
,
1126891415
);
c
=
md5_ii
(
c
,
d
,
a
,
b
,
x
[
i
+
14
],
15
,
-
1416354905
);
b
=
md5_ii
(
b
,
c
,
d
,
a
,
x
[
i
+
5
],
21
,
-
57434055
);
a
=
md5_ii
(
a
,
b
,
c
,
d
,
x
[
i
+
12
],
6
,
1700485571
);
d
=
md5_ii
(
d
,
a
,
b
,
c
,
x
[
i
+
3
],
10
,
-
1894986606
);
c
=
md5_ii
(
c
,
d
,
a
,
b
,
x
[
i
+
10
],
15
,
-
1051523
);
b
=
md5_ii
(
b
,
c
,
d
,
a
,
x
[
i
+
1
],
21
,
-
2054922799
);
a
=
md5_ii
(
a
,
b
,
c
,
d
,
x
[
i
+
8
],
6
,
1873313359
);
d
=
md5_ii
(
d
,
a
,
b
,
c
,
x
[
i
+
15
],
10
,
-
30611744
);
c
=
md5_ii
(
c
,
d
,
a
,
b
,
x
[
i
+
6
],
15
,
-
1560198380
);
b
=
md5_ii
(
b
,
c
,
d
,
a
,
x
[
i
+
13
],
21
,
1309151649
);
a
=
md5_ii
(
a
,
b
,
c
,
d
,
x
[
i
+
4
],
6
,
-
145523070
);
d
=
md5_ii
(
d
,
a
,
b
,
c
,
x
[
i
+
11
],
10
,
-
1120210379
);
c
=
md5_ii
(
c
,
d
,
a
,
b
,
x
[
i
+
2
],
15
,
718787259
);
b
=
md5_ii
(
b
,
c
,
d
,
a
,
x
[
i
+
9
],
21
,
-
343485551
);
a
=
safe_add
(
a
,
olda
);
b
=
safe_add
(
b
,
oldb
);
c
=
safe_add
(
c
,
oldc
);
d
=
safe_add
(
d
,
oldd
);
}
return
Array
(
a
,
b
,
c
,
d
);
}
/*
* These functions implement the four basic operations the algorithm uses.
*/
function
md5_cmn
(
q
,
a
,
b
,
x
,
s
,
t
)
{
return
safe_add
(
bit_rol
(
safe_add
(
safe_add
(
a
,
q
),
safe_add
(
x
,
t
)),
s
),
b
);
}
function
md5_ff
(
a
,
b
,
c
,
d
,
x
,
s
,
t
)
{
return
md5_cmn
((
b
&
c
)
|
((
~
b
)
&
d
),
a
,
b
,
x
,
s
,
t
);
}
function
md5_gg
(
a
,
b
,
c
,
d
,
x
,
s
,
t
)
{
return
md5_cmn
((
b
&
d
)
|
(
c
&
(
~
d
)),
a
,
b
,
x
,
s
,
t
);
}
function
md5_hh
(
a
,
b
,
c
,
d
,
x
,
s
,
t
)
{
return
md5_cmn
(
b
^
c
^
d
,
a
,
b
,
x
,
s
,
t
);
}
function
md5_ii
(
a
,
b
,
c
,
d
,
x
,
s
,
t
)
{
return
md5_cmn
(
c
^
(
b
|
(
~
d
)),
a
,
b
,
x
,
s
,
t
);
}
/*
* Calculate the HMAC-MD5, of a key and some data
*/
function
core_hmac_md5
(
key
,
data
)
{
var
bkey
=
str2binl
(
key
);
if
(
bkey
.
length
>
16
)
bkey
=
core_md5
(
bkey
,
key
.
length
*
chrsz
);
var
ipad
=
Array
(
16
),
opad
=
Array
(
16
);
for
(
var
i
=
0
;
i
<
16
;
i
++
)
{
ipad
[
i
]
=
bkey
[
i
]
^
0x36363636
;
opad
[
i
]
=
bkey
[
i
]
^
0x5C5C5C5C
;
}
var
hash
=
core_md5
(
ipad
.
concat
(
str2binl
(
data
)),
512
+
data
.
length
*
chrsz
);
return
core_md5
(
opad
.
concat
(
hash
),
512
+
128
);
}
/*
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
* to work around bugs in some JS interpreters.
*/
function
safe_add
(
x
,
y
)
{
var
lsw
=
(
x
&
0xFFFF
)
+
(
y
&
0xFFFF
);
var
msw
=
(
x
>>
16
)
+
(
y
>>
16
)
+
(
lsw
>>
16
);
return
(
msw
<<
16
)
|
(
lsw
&
0xFFFF
);
}
/*
* Bitwise rotate a 32-bit number to the left.
*/
function
bit_rol
(
num
,
cnt
)
{
return
(
num
<<
cnt
)
|
(
num
>>>
(
32
-
cnt
));
}
/*
* Convert a string to an array of little-endian words
* If chrsz is ASCII, characters >255 have their hi-byte silently ignored.
*/
function
str2binl
(
str
)
{
var
bin
=
Array
();
var
mask
=
(
1
<<
chrsz
)
-
1
;
for
(
var
i
=
0
;
i
<
str
.
length
*
chrsz
;
i
+=
chrsz
)
bin
[
i
>>
5
]
|=
(
str
.
charCodeAt
(
i
/
chrsz
)
&
mask
)
<<
(
i
%
32
);
return
bin
;
}
/*
* Convert an array of little-endian words to a string
*/
function
binl2str
(
bin
)
{
var
str
=
""
;
var
mask
=
(
1
<<
chrsz
)
-
1
;
for
(
var
i
=
0
;
i
<
bin
.
length
*
32
;
i
+=
chrsz
)
str
+=
String
.
fromCharCode
((
bin
[
i
>>
5
]
>>>
(
i
%
32
))
&
mask
);
return
str
;
}
/*
* Convert an array of little-endian words to a hex string.
*/
function
binl2hex
(
binarray
)
{
var
hex_tab
=
hexcase
?
"
0123456789ABCDEF
"
:
"
0123456789abcdef
"
;
var
str
=
""
;
for
(
var
i
=
0
;
i
<
binarray
.
length
*
4
;
i
++
)
{
str
+=
hex_tab
.
charAt
((
binarray
[
i
>>
2
]
>>
((
i
%
4
)
*
8
+
4
))
&
0xF
)
+
hex_tab
.
charAt
((
binarray
[
i
>>
2
]
>>
((
i
%
4
)
*
8
))
&
0xF
);
}
return
str
;
}
/*
* Convert an array of little-endian words to a base-64 string
*/
function
binl2b64
(
binarray
)
{
var
tab
=
"
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/
"
;
var
str
=
""
;
for
(
var
i
=
0
;
i
<
binarray
.
length
*
4
;
i
+=
3
)
{
var
triplet
=
(((
binarray
[
i
>>
2
]
>>
8
*
(
i
%
4
))
&
0xFF
)
<<
16
)
|
(((
binarray
[
i
+
1
>>
2
]
>>
8
*
((
i
+
1
)
%
4
))
&
0xFF
)
<<
8
)
|
((
binarray
[
i
+
2
>>
2
]
>>
8
*
((
i
+
2
)
%
4
))
&
0xFF
);
for
(
var
j
=
0
;
j
<
4
;
j
++
)
{
if
(
i
*
8
+
j
*
6
>
binarray
.
length
*
32
)
str
+=
b64pad
;
else
str
+=
tab
.
charAt
((
triplet
>>
6
*
(
3
-
j
))
&
0x3F
);
}
}
return
str
;
}
erp_web/js/pages/materials/in_out.js
View file @
37c64788
...
...
@@ -23,7 +23,8 @@
var
organUrl
=
""
;
//组织数据接口地址
var
amountNum
=
""
;
//单据编号开头字符
var
depotString
=
""
;
//店铺id列表
var
orgDefaultId
=
0
;
//单位默认编号
/**默认编号有意义吗,不如空着吧*/
var
orgDefaultId
=
''
;
//单位默认编号
var
orgDefaultList
;
//存储查询出来的会员列表
var
accountList
;
//账户列表
var
outItemList
;
//支出项目列表
...
...
@@ -682,7 +683,7 @@
}
}
thisStock
=
(
thisStock
/
loadRatio
).
toFixed
(
2
);
body
.
find
(
"
[field='Stock']
"
).
find
(
input
).
val
(
thisStock
).
attr
(
"
data-stock
"
,
res
.
rows
[
0
].
thisSum
);
//加载库存数据
body
.
find
(
"
[field='Stock']
"
).
find
(
input
).
val
(
thisStock
).
attr
(
"
data-stock
"
,
res
.
data
.
page
[
0
].
thisSum
);
//加载库存数据
}
else
{
body
.
find
(
"
[field='Stock']
"
).
find
(
input
).
val
(
0
).
attr
(
"
data-stock
"
,
0
);
//加载库存数据
...
...
@@ -757,14 +758,20 @@
anotherDepotTextField
=
"
depotName
"
;
}
if
(
listSubType
==
"
礼品充值
"
){
/**
* who added the .action
* */
isShowAnotherDepot
=
false
;
//礼品充值时候显示礼品卡
anotherDepotHeadName
=
"
礼品卡
"
;
anotherDepotUrl
=
"
/depot/findGiftByType
.action
?type=1
"
;
anotherDepotUrl
=
"
/depot/findGiftByType?type=1
"
;
anotherDepotTextField
=
"
name
"
;
}
if
(
listSubType
==
"
礼品销售
"
){
/**
* who added the .action
* */
depotHeadName
=
"
礼品卡
"
;
depotUrl
=
"
/depot/findGiftByType
.action
?type=1
"
;
depotUrl
=
"
/depot/findGiftByType?type=1
"
;
depotTextField
=
"
name
"
;
}
else
{
...
...
@@ -1290,8 +1297,12 @@
if
(
r
)
{
$
.
ajax
({
type
:
"
post
"
,
url
:
"
/depotHead/
"
+
depotHeadID
+
"
/delete
"
,
// url: "/depotHead/" + depotHeadID + "/delete",
url
:
"
/depotHead/deleteDepotHeadAndDetail
"
,
dataType
:
"
json
"
,
data
:{
id
:
depotHeadID
},
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
==
200
)
{
$
(
"
#searchBtn
"
).
click
();
...
...
@@ -1382,7 +1393,8 @@
//批量删除
$
.
ajax
({
type
:
"
post
"
,
url
:
"
/depotHead/batchDelete
"
,
// url: "/depotHead/batchDelete",
url
:
"
/depotHead/batchDeleteDepotHeadAndDetail
"
,
dataType
:
"
json
"
,
async
:
false
,
data
:
({
...
...
@@ -1560,7 +1572,7 @@
$
(
"
#addOrgan
"
).
off
(
"
click
"
).
on
(
"
click
"
,
function
(){
$
(
'
#supplierDlg
'
).
dialog
(
'
open
'
).
dialog
(
'
setTitle
'
,
'
<img src="/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加供应商信息
'
);
});
url
=
'
/depotHead/add
'
;
url
=
'
/depotHead/add
DepotHeadAndDetail
'
;
//零售单据修改收款时,自动计算找零
if
(
listSubType
==
"
零售
"
||
listSubType
==
"
零售退货
"
)
{
...
...
@@ -1628,7 +1640,7 @@
}
$
(
"
#Number
"
).
val
(
depotHeadInfo
[
2
]).
attr
(
"
data-defaultNumber
"
,
depotHeadInfo
[
2
]);
$
(
"
#OperTime
"
).
val
(
depotHeadInfo
[
4
]);
$
(
'
#OrganId
'
).
combobox
(
'
setValue
'
,
depotHeadInfo
[
5
]);
$
(
'
#OrganId
'
).
combobox
(
'
setValue
'
,
depotHeadInfo
[
5
]
==
'
undefined
'
?
''
:
depotHeadInfo
[
5
]);
$
(
"
#HandsPersonId
"
).
val
(
depotHeadInfo
[
6
]);
$
(
"
#AccountId
"
).
val
(
depotHeadInfo
[
7
]);
$
(
"
#ChangeAmount
"
).
val
(
depotHeadInfo
[
8
]);
...
...
@@ -1715,7 +1727,7 @@
initTableData_material
(
"
edit
"
,
TotalPrice
);
//商品列表
reject
();
//撤销下、刷新商品列表
url
=
'
/depotHead/update?id=
'
+
depotHeadInfo
[
0
];
url
=
'
/depotHead/update
DepotHeadAndDetail
?id=
'
+
depotHeadInfo
[
0
];
}
//查看信息
...
...
@@ -1899,6 +1911,18 @@
return
flag
;
}
//保存信息
/**
* 2019-01-25
* 我对这个方法的实现结果存在严重怀疑,决定重构
* 有如下疑点:
* 1、保存完主表,返回结果后,再发起请求去操作子表,如何保证事务的一致性(业务数据一致性)
* 2、保存完主表后,再通过selectmax的方式去获取主表主键id完全就是看人品的不可靠的思路
* 修改计划:
* 2019-01-25修改零售出库相关操作
* 修改方式,重写url,将主从表操作合并
*
*
* **/
$
(
"
#saveDepotHead
"
).
off
(
"
click
"
).
on
(
"
click
"
,
function
(){
if
(
!
$
(
'
#depotHeadFM
'
).
form
(
'
validate
'
)){
return
;
...
...
@@ -1961,6 +1985,7 @@
$
.
messager
.
alert
(
'
提示
'
,
'
选择多账户时的找零金额不能大于0!
'
,
'
warning
'
);
return
;
}
}
else
if
(
listTitle
===
"
销售出库列表
"
){
if
(
!
$
(
'
#OrganId
'
).
combobox
(
'
getValue
'
)){
...
...
@@ -2052,13 +2077,7 @@
if
(
$
(
"
#AccountId
"
).
val
()
===
"
many
"
){
//多账户
getAccountID
=
null
;
}
$
.
ajax
({
type
:
"
post
"
,
url
:
url
,
dataType
:
"
json
"
,
async
:
false
,
data
:
({
info
:
JSON
.
stringify
({
var
infoStr
=
JSON
.
stringify
({
Type
:
listType
,
SubType
:
listSubType
,
ProjectId
:
ProjectId
,
...
...
@@ -2083,7 +2102,24 @@
OtherMoneyList
:
$
(
"
#OtherMoney
"
).
attr
(
"
data-itemarr
"
),
//支出项目列表-涉及费用
OtherMoneyItem
:
$
(
"
#OtherMoney
"
).
attr
(
"
data-itemmoneyarr
"
),
//支出项目金额列表-涉及费用
AccountDay
:
$
(
"
#AccountDay
"
).
val
()
//结算天数
})
});
/**
* 零售出库,单独操作
* */
if
(
url
.
indexOf
(
"
/depotHead/addDepotHeadAndDetail
"
)
>=
0
){
addDepotHeadAndDetail
(
url
,
infoStr
);
return
;
}
else
if
(
url
.
indexOf
(
"
/depotHead/updateDepotHeadAndDetail
"
)
>=
0
){
updateDepotHeadAndDetail
(
url
,
infoStr
,
preTotalPrice
);
return
;
}
$
.
ajax
({
type
:
"
post
"
,
url
:
url
,
dataType
:
"
json
"
,
async
:
false
,
data
:
({
info
:
infoStr
}),
success
:
function
(
tipInfo
)
{
...
...
@@ -2955,7 +2991,103 @@
}
}
/**
* 新增单据主表及单据子表
* */
function
addDepotHeadAndDetail
(
url
,
infoStr
){
var
inserted
=
$
(
"
#materialData
"
).
datagrid
(
'
getChanges
'
,
"
inserted
"
);
var
deleted
=
$
(
"
#materialData
"
).
datagrid
(
'
getChanges
'
,
"
deleted
"
);
var
updated
=
$
(
"
#materialData
"
).
datagrid
(
'
getChanges
'
,
"
updated
"
);
$
.
ajax
({
type
:
"
post
"
,
url
:
url
,
dataType
:
"
json
"
,
async
:
false
,
data
:
({
info
:
infoStr
,
inserted
:
JSON
.
stringify
(
inserted
),
deleted
:
JSON
.
stringify
(
deleted
),
updated
:
JSON
.
stringify
(
updated
)
}),
success
:
function
(
tipInfo
){
if
(
tipInfo
){
if
(
tipInfo
.
code
!=
200
){
$
.
messager
.
alert
(
'
提示
'
,
tipInfo
.
msg
,
'
error
'
);
return
;
}
$
.
messager
.
alert
(
'
提示
'
,
'
保存成功!
'
,
'
info
'
);
$
(
'
#depotHeadDlg
'
).
dialog
(
'
close
'
);
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
showDepotHeadDetails
(
opts
.
pageNumber
,
opts
.
pageSize
);
}
else
{
$
.
messager
.
show
({
title
:
'
错误提示
'
,
msg
:
'
保存信息失败,请稍后重试!
'
});
}
},
//此处添加错误处理
error
:
function
()
{
$
.
messager
.
alert
(
'
提示
'
,
'
保存信息异常,请稍后再试!
'
,
'
error
'
);
return
;
}
});
}
/**
* 修改单据主表及单据子表
* */
function
updateDepotHeadAndDetail
(
url
,
infoStr
,
preTotalPrice
){
var
inserted
=
$
(
"
#materialData
"
).
datagrid
(
'
getChanges
'
,
"
inserted
"
);
var
deleted
=
$
(
"
#materialData
"
).
datagrid
(
'
getChanges
'
,
"
deleted
"
);
var
updated
=
$
(
"
#materialData
"
).
datagrid
(
'
getChanges
'
,
"
updated
"
);
$
.
ajax
({
type
:
"
post
"
,
url
:
url
,
dataType
:
"
json
"
,
async
:
false
,
data
:
({
id
:
url
.
substring
(
url
.
lastIndexOf
(
"
?id=
"
)
+
4
,
url
.
length
),
info
:
infoStr
,
inserted
:
JSON
.
stringify
(
inserted
),
deleted
:
JSON
.
stringify
(
deleted
),
updated
:
JSON
.
stringify
(
updated
),
preTotalPrice
:
preTotalPrice
}),
success
:
function
(
tipInfo
){
if
(
tipInfo
){
if
(
tipInfo
.
code
!=
200
){
$
.
messager
.
alert
(
'
提示
'
,
tipInfo
.
msg
,
'
error
'
);
return
;
}
$
.
messager
.
alert
(
'
提示
'
,
'
保存成功!
'
,
'
info
'
);
$
(
'
#depotHeadDlg
'
).
dialog
(
'
close
'
);
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
showDepotHeadDetails
(
opts
.
pageNumber
,
opts
.
pageSize
);
if
(
endEditing
())
{
$
(
'
#materialData
'
).
datagrid
(
'
acceptChanges
'
);
}
}
else
{
$
.
messager
.
show
({
title
:
'
错误提示
'
,
msg
:
'
保存信息失败,请稍后重试!
'
});
}
},
//此处添加错误处理
error
:
function
()
{
$
.
messager
.
alert
(
'
提示
'
,
'
保存信息异常,请稍后再试!
'
,
'
error
'
);
return
;
}
});
}
...
...
erp_web/login.html
View file @
37c64788
...
...
@@ -7,6 +7,7 @@
<link
type=
"text/css"
rel=
"stylesheet"
href=
"/css/css.css"
/>
<script
type=
"text/javascript"
src=
"/js/jquery-1.8.0.min.js"
></script>
<script
type=
"text/javascript"
src=
"/js/common/common.js"
></script>
<script
type=
"text/javascript"
src=
"/js/md5/md5.js"
></script>
</head>
<body
id=
"login_body"
>
<form
action=
"admin.html"
>
...
...
@@ -95,7 +96,7 @@
dataType
:
"
json
"
,
data
:
({
loginame
:
username
,
password
:
password
password
:
hex_md5
(
password
)
}),
success
:
function
(
res
)
{
if
(
res
)
{
...
...
erp_web/pages/manage/serialNumber.html
View file @
37c64788
...
...
@@ -87,12 +87,59 @@
</div>
</form>
</div>
<div
id=
"dlg-buttons"
>
<a
href=
"javascript:void(0)"
id=
"saveSerialNumber"
class=
"easyui-linkbutton"
iconCls=
"icon-ok"
>
保存
</a>
<a
href=
"javascript:void(0)"
id=
"cancelSerialNumber"
class=
"easyui-linkbutton"
iconCls=
"icon-cancel"
onclick=
"javascript:$('#serialNumberDlg').dialog('close')"
>
取消
</a>
</div>
<div
id=
"batAddSerialNumberDlg"
class=
"easyui-dialog"
style=
"width:860px;height:420px;padding:10px 20px"
closed=
"true"
buttons=
"#bat-dlg-buttons"
modal=
"true"
collapsible=
"false"
closable=
"true"
>
<form
id=
"batAddserialNumberFM"
method=
"post"
novalidate
>
<div
id=
"batAddtt"
class=
"easyui-tabs"
style=
"width:800px;height:320px;"
>
<div
title=
"批量自定义序列号"
style=
"padding:20px;"
>
<table>
<tr>
<td
style=
"width:60px; height:30px;"
>
商品名称
</td>
<td
style=
"padding:5px;width:180px;"
>
<input
name=
"materialName"
id=
"batAddMaterialName"
class=
"easyui-validatebox"
data-options=
"required:true,validType:'length[2,30]'"
style=
"width: 180px;height: 20px"
/>
</td>
<td
style=
"width:80px;"
>
序列号前缀
</td>
<td
style=
"padding:5px;width:180px;"
>
<input
name=
"serialNumber"
id=
"batAddSerialNumberInput"
class=
"easyui-validatebox"
data-options=
"required:true,validType:'length[1,30]'"
style=
"width: 180px;height: 20px"
/>
</td>
<td
style=
"width:200px;"
></td>
</tr>
<tr>
<td
style=
"width:80px;"
>
序列号数量
</td>
<td
style=
"padding:5px;width:180px;"
>
<input
name=
"batAddTotal"
id=
"batAddTotal"
class=
"easyui-numberbox"
data-options=
"min:0,max:10000"
style=
"width: 180px;height: 20px"
/>
</td>
<td></td>
</tr>
<tr>
<td
style=
"height:30px;"
>
备注
</td>
<td
style=
"padding:5px"
colspan=
"3"
>
<textarea
name=
"remark"
id=
"batAddremark"
rows=
"2"
cols=
"2"
placeholder=
"暂无备注信息"
style=
"width: 468px; height:40px;"
></textarea>
</td>
<td></td>
</tr>
</table>
</div>
</div>
</form>
</div>
<div
id=
"bat-dlg-buttons"
>
<a
href=
"javascript:void(0)"
id=
"batAddSerialNumberBtn"
class=
"easyui-linkbutton"
iconCls=
"icon-ok"
>
保存
</a>
<a
href=
"javascript:void(0)"
id=
"batCancelSerialNumberBtn"
class=
"easyui-linkbutton"
iconCls=
"icon-cancel"
onclick=
"javascript:$('#batAddSerialNumberDlg').dialog('close')"
>
取消
</a>
</div>
<script
type=
"text/javascript"
>
...
...
@@ -153,13 +200,13 @@
}
},
{
title
:
'
商品名称
'
,
field
:
'
materialName
'
,
width
:
100
},
{
title
:
'
序列号
'
,
field
:
'
serialNumber
'
,
width
:
8
0
},
{
title
:
'
已卖出
'
,
field
:
'
isSell
'
,
width
:
15
0
,
formatter
:
function
(
value
)
{
return
value
?
"
是
"
:
"
否
"
;
{
title
:
'
序列号
'
,
field
:
'
serialNumber
'
,
width
:
20
0
},
{
title
:
'
已卖出
'
,
field
:
'
isSell
'
,
width
:
6
0
,
formatter
:
function
(
value
)
{
return
value
==
'
1
'
?
"
是
"
:
"
否
"
;
}
},
{
title
:
'
已删除
'
,
field
:
'
deleteFlag
'
,
width
:
60
,
formatter
:
function
(
value
)
{
return
value
?
"
是
"
:
"
否
"
;
return
value
==
'
1
'
?
"
是
"
:
"
否
"
;
}
},
{
title
:
'
创建时间
'
,
field
:
'
createTime
'
,
width
:
140
,
formatter
:
formatDatebox
},
...
...
@@ -184,6 +231,15 @@
batDeleteSerialNumber
();
}
},
'
-
'
,
{
id
:
'
batAddSerialNumber
'
,
text
:
'
批量添加
'
,
iconCls
:
'
icon-basket_add
'
,
handler
:
function
()
{
batAddSerialNumber
();
}
},
],
onLoadError
:
function
()
{
$
.
messager
.
alert
(
'
页面加载提示
'
,
'
页面加载异常,请稍后再试!
'
,
'
error
'
);
...
...
@@ -489,6 +545,70 @@
return
dt
.
format
(
"
yyyy-MM-dd hh:mm:ss
"
);
//扩展的Date的format方法(上述插件实现)
}
/**
* 批量添加序列号
* */
function
batAddSerialNumber
(){
$
(
'
#batAddSerialNumberDlg
'
).
dialog
(
'
open
'
).
dialog
(
'
setTitle
'
,
'
<img src="/js/easyui-1.3.5/themes/icons/edit_add.png"/> 批量添加序列号信息
'
);
$
(
"
.window-mask
"
).
css
({
width
:
webW
,
height
:
webH
});
$
(
'
#batAddMaterialName
'
).
val
(
''
);
$
(
'
#batAddSerialNumberInput
'
).
val
(
''
);
$
(
'
#batAddTotal
'
).
val
(
'
100
'
);
$
(
'
#batAddremark
'
).
val
(
''
);
url
=
'
/serialNumber/batAddSerialNumber
'
;
}
//保存信息
$
(
"
#batAddSerialNumberBtn
"
).
off
(
"
click
"
).
on
(
"
click
"
,
function
()
{
if
(
!
$
(
'
#batAddMaterialName
'
).
val
())
{
$
.
messager
.
alert
(
'
提示
'
,
'
商品名称不能为空!
'
,
'
warning
'
);
return
;
}
if
(
!
$
(
'
#batAddSerialNumberInput
'
).
val
())
{
$
.
messager
.
alert
(
'
提示
'
,
'
序列号前缀不能为空!
'
,
'
warning
'
);
return
;
}
if
(
!
$
(
'
#batAddTotal
'
).
val
())
{
$
.
messager
.
alert
(
'
提示
'
,
'
序列号数量不能为空!
'
,
'
warning
'
);
return
;
}
var
materialName
=
$
(
'
#batAddMaterialName
'
).
val
();
var
serialNumberPrefix
=
$
(
'
#batAddSerialNumberInput
'
).
val
();
var
batAddTotal
=
$
(
'
#batAddTotal
'
).
val
();
var
remark
=
$
(
'
#batAddremark
'
).
val
();
$
.
ajax
({
type
:
"
post
"
,
url
:
url
,
dataType
:
"
json
"
,
async
:
false
,
data
:
({
materialName
:
materialName
,
serialNumberPrefix
:
serialNumberPrefix
,
batAddTotal
:
batAddTotal
,
remark
:
remark
}),
success
:
function
(
res
)
{
if
(
res
){
if
(
res
.
code
!=
200
){
$
.
messager
.
alert
(
'
提示
'
,
res
.
msg
,
'
error
'
);
return
;
}
if
(
res
.
code
===
200
)
{
$
(
'
#batAddSerialNumberDlg
'
).
dialog
(
'
close
'
);
//加载完以后重新初始化
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
showSerialNumberDetails
(
opts
.
pageNumber
,
opts
.
pageSize
);
}
}
},
//此处添加错误处理
error
:
function
()
{
$
.
messager
.
alert
(
'
提示
'
,
'
保存序列化信息异常,请稍后再试!
'
,
'
error
'
);
return
;
}
});
});
</script>
</body>
...
...
erp_web/pages/materials/material.html
View file @
37c64788
...
...
@@ -684,7 +684,7 @@
},
{
title
:
'
序列号
'
,
field
:
'
enableSerialNumber
'
,
width
:
70
,
align
:
"
center
"
,
formatter
:
function
(
value
)
{
return
value
?
"
启用
"
:
"
禁用
"
;
return
value
==
'
1
'
?
"
启用
"
:
"
禁用
"
;
}
}
]],
...
...
@@ -1363,7 +1363,7 @@
// console.log("enableSerialNumber:"+(materialInfo[24]=='true'?'1':'0'));
// console.log("enableSerialNumber:"+materialInfo[24]);
// $("#enableSerialNumber").combobox('setValue',materialInfo[24]=='true'?'1':'0');
$
(
"
#enableSerialNumber
"
).
val
(
materialInfo
[
24
]
==
'
true
'
?
'
1
'
:
'
0
'
);
$
(
"
#enableSerialNumber
"
).
val
(
materialInfo
[
24
]
==
'
1
'
?
'
1
'
:
'
0
'
);
// console.log($("#enableSerialNumber").val());
var
categoryName
=
""
;
//类型名称
...
...
sql/jsh_erp.sql
View file @
37c64788
...
...
@@ -5219,5 +5219,25 @@ alter table jsh_material add enableSerialNumber bit(1) DEFAULT 0 COMMENT '是否
-- ----------------------------
delete from `jsh_functions` where Name='序列号';
INSERT INTO `jsh_functions`(`Number`, `Name`, `PNumber`, `URL`, `State`, `Sort`, `Enabled`, `Type`, `PushBtn`) VALUES ('010104', '序列号', '0101', '../manage/serialNumber.html', b'0', '0246', b'1', '电脑版', '');
-- ----------------------------
-- 删除单据主表供应商id字段对应外键约束
-- ----------------------------
ALTER TABLE jsh_depothead DROP FOREIGN KEY jsh_depothead_ibfk_3;
-- ----------------------------
-- 序列号表添加单据主表id字段,用于跟踪序列号流向
-- ----------------------------
alter table jsh_serial_number add depothead_Id bigint(20) DEFAULT null COMMENT '单据主表id,用于跟踪序列号流向';
-- ----------------------------
-- 修改商品表enableSerialNumber字段类型为varchar(1)
-- ----------------------------
alter table jsh_material change enableSerialNumber enableSerialNumber varchar(1) DEFAULT '0' COMMENT '是否开启序列号,0否,1是';
-- ----------------------------
-- 修改序列号表is_Sell字段类型为varchar(1)
-- 修改序列号表delete_Flag字段类型为varchar(1)
-- ----------------------------
alter table jsh_serial_number change is_Sell is_Sell varchar(1) DEFAULT '0' COMMENT '是否卖出,0未卖出,1卖出';
alter table jsh_serial_number change delete_Flag delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
-- ----------------------------
-- 删除单据子表单据主表id字段对应外键约束
-- ----------------------------
ALTER TABLE jsh_depotitem DROP FOREIGN KEY jsh_depotitem_ibfk_1;
\ No newline at end of file
sql/华夏ERP数据库设计汇总.xlsx
View file @
37c64788
No preview for this file type
src/main/java/com/jsh/erp/constants/BusinessConstants.java
View file @
37c64788
...
...
@@ -21,18 +21,49 @@ public class BusinessConstants {
* 默认的分页页数
*/
public
static
final
String
DEFAULT_PAGINATION_PAGE_SIZE
=
"10"
;
/**
* 商品是否开启序列号标识enableSerialNumber 0否false,1是true
*
* */
public
static
final
boolean
MATERIAL_ENABLE_SERIAL_NUMBER
=
true
;
public
static
final
boolean
MATERIAL_NOT_ENABLE_SERIAL_NUMBER
=
false
;
/**
* 单据主表出入库类型 type 入库 出库
* depothead
* */
public
static
final
String
DEPOTHEAD_TYPE_STORAGE
=
"入库"
;
public
static
final
String
DEPOTHEAD_TYPE_OUT
=
"出库"
;
/**
* 付款类型 payType //现付/预付款
* */
public
static
final
String
PAY_TYPE_PREPAID
=
"预付款"
;
public
static
final
String
PAY_TYPE_BY_CASH
=
"现付"
;
/**
* 删除标记 deleteFlag '0'未删除 '1'已删除
* */
public
static
final
String
DELETE_FLAG_DELETED
=
"1"
;
public
static
final
String
DELETE_FLAG_EXISTS
=
"0"
;
/**
* 是否卖出 isSell '0'未卖出 '1'已卖出
* */
public
static
final
String
IS_SELL_SELLED
=
"1"
;
public
static
final
String
IS_SELL_HOLD
=
"0"
;
/**
* 商品是否开启序列号标识enableSerialNumber '0'未启用 '1'启用
* */
public
static
final
String
ENABLE_SERIAL_NUMBER_ENABLED
=
"1"
;
public
static
final
String
ENABLE_SERIAL_NUMBER_NOT_ENABLED
=
"0"
;
/**
* 出入库分类
*采购、采购退货、其它、零售、销售、调拨、礼品充值
* */
public
static
final
String
SUB_TYPE_PURCHASE
=
"采购"
;
public
static
final
String
SUB_TYPE_PURCHASE_TETURNS
=
"采购退货"
;
public
static
final
String
SUB_TYPE_OTHER
=
"其它"
;
public
static
final
String
SUB_TYPE_RETAIL
=
"零售"
;
public
static
final
String
SUB_TYPE_SALES
=
"销售"
;
public
static
final
String
SUB_TYPE_TRANSFER
=
"调拨"
;
/**
* 批量插入sql时最大的数据条数
* */
public
static
final
int
BATCH_INSERT_MAX_NUMBER
=
500
;
...
...
src/main/java/com/jsh/erp/constants/ExceptionConstants.java
View file @
37c64788
...
...
@@ -34,6 +34,9 @@ public class ExceptionConstants {
/**序列号不能为为空*/
public
static
final
int
SERIAL_NUMBERE_NOT_BE_EMPTY_CODE
=
10500000
;
public
static
final
String
SERIAL_NUMBERE_NOT_BE_EMPTY_MSG
=
"序列号不能为为空"
;
/**商品%s下序列号不充足,请补充后重试*/
public
static
final
int
MATERIAL_SERIAL_NUMBERE_NOT_ENOUGH_CODE
=
10500000
;
public
static
final
String
MATERIAL_SERIAL_NUMBERE_NOT_ENOUGH_MSG
=
"商品:%s下序列号不充足,请补充后重试"
;
...
...
src/main/java/com/jsh/erp/controller/DepotController.java
View file @
37c64788
...
...
@@ -92,7 +92,7 @@ public class DepotController {
return
arr
;
}
@
Ge
tMapping
(
value
=
"/findDepotByUserId"
)
@
Reques
tMapping
(
value
=
"/findDepotByUserId"
)
public
JSONArray
findDepotByUserId
(
@RequestParam
(
"UBType"
)
String
type
,
@RequestParam
(
"UBKeyId"
)
String
keyId
,
HttpServletRequest
request
)
{
JSONArray
arr
=
new
JSONArray
();
...
...
@@ -128,7 +128,7 @@ public class DepotController {
* @param request
* @return
*/
@
Po
stMapping
(
value
=
"/findGiftByType"
)
@
Reque
stMapping
(
value
=
"/findGiftByType"
)
public
JSONArray
findGiftByType
(
@RequestParam
(
"type"
)
Integer
type
,
HttpServletRequest
request
)
{
JSONArray
arr
=
new
JSONArray
();
...
...
src/main/java/com/jsh/erp/controller/DepotHeadController.java
View file @
37c64788
...
...
@@ -2,6 +2,7 @@ package com.jsh.erp.controller;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jsh.erp.constants.ExceptionConstants
;
import
com.jsh.erp.datasource.entities.DepotHead
;
import
com.jsh.erp.datasource.vo.DepotHeadVo4InDetail
;
import
com.jsh.erp.datasource.vo.DepotHeadVo4InOutMCount
;
...
...
@@ -464,5 +465,75 @@ public class DepotHeadController {
}
return
allMoney
;
}
/**
* create by: cjl
* description:
* 新增单据主表及单据子表信息
* create time: 2019/1/25 14:36
* @Param: beanJson
* @Param: inserted
* @Param: deleted
* @Param: updated
* @return java.lang.String
*/
@RequestMapping
(
value
=
"/addDepotHeadAndDetail"
)
public
Object
addDepotHeadAndDetail
(
@RequestParam
(
"info"
)
String
beanJson
,
@RequestParam
(
"inserted"
)
String
inserted
,
@RequestParam
(
"deleted"
)
String
deleted
,
@RequestParam
(
"updated"
)
String
updated
)
throws
Exception
{
JSONObject
result
=
ExceptionConstants
.
standardSuccess
();
depotHeadService
.
addDepotHeadAndDetail
(
beanJson
,
inserted
,
deleted
,
updated
);
return
result
;
}
/**
* create by: cjl
* description:
* 更新单据主表及单据子表信息
* create time: 2019/1/28 14:47
* @Param: id
* @Param: beanJson
* @Param: inserted
* @Param: deleted
* @Param: updated
* @Param: preTotalPrice
* @return java.lang.Object
*/
@RequestMapping
(
value
=
"/updateDepotHeadAndDetail"
)
public
Object
updateDepotHeadAndDetail
(
@RequestParam
(
"id"
)
Long
id
,
@RequestParam
(
"info"
)
String
beanJson
,
@RequestParam
(
"inserted"
)
String
inserted
,
@RequestParam
(
"deleted"
)
String
deleted
,
@RequestParam
(
"updated"
)
String
updated
,
@RequestParam
(
"preTotalPrice"
)
BigDecimal
preTotalPrice
)
throws
Exception
{
JSONObject
result
=
ExceptionConstants
.
standardSuccess
();
depotHeadService
.
updateDepotHeadAndDetail
(
id
,
beanJson
,
inserted
,
deleted
,
updated
,
preTotalPrice
);
return
result
;
}
/**
* create by: cjl
* description:
* 删除单据主表及子表信息
* create time: 2019/1/28 17:29
* @Param: id
* @return java.lang.Object
*/
@RequestMapping
(
value
=
"/deleteDepotHeadAndDetail"
)
public
Object
deleteDepotHeadAndDetail
(
@RequestParam
(
"id"
)
Long
id
)
throws
Exception
{
JSONObject
result
=
ExceptionConstants
.
standardSuccess
();
depotHeadService
.
deleteDepotHeadAndDetail
(
id
);
return
result
;
}
/**
* create by: cjl
* description:
* 删除单据主表及子表信息
* create time: 2019/1/28 17:29
* @Param: id
* @return java.lang.Object
*/
@RequestMapping
(
value
=
"/batchDeleteDepotHeadAndDetail"
)
public
Object
batchDeleteDepotHeadAndDetail
(
@RequestParam
(
"ids"
)
String
ids
)
throws
Exception
{
JSONObject
result
=
ExceptionConstants
.
standardSuccess
();
depotHeadService
.
batchDeleteDepotHeadAndDetail
(
ids
);
return
result
;
}
}
src/main/java/com/jsh/erp/controller/DepotItemController.java
View file @
37c64788
...
...
@@ -262,7 +262,7 @@ public class DepotItemController {
@RequestParam
(
"deleted"
)
String
deleted
,
@RequestParam
(
"updated"
)
String
updated
,
@RequestParam
(
"headerId"
)
Long
headerId
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<
String
,
Object
>();
try
{
depotItemService
.
saveDetials
(
inserted
,
deleted
,
updated
,
headerId
);
...
...
src/main/java/com/jsh/erp/controller/SerialNumberController.java
View file @
37c64788
...
...
@@ -88,6 +88,27 @@ public class SerialNumberController {
return
result
;
}
/**
* create by: cjl
* description:
*批量添加序列号
* create time: 2019/1/29 15:11
* @Param: materialName
* @Param: serialNumberPrefix
* @Param: batAddTotal
* @Param: remark
* @return java.lang.Object
*/
@PostMapping
(
"/serialNumber/batAddSerialNumber"
)
@ResponseBody
public
Object
batAddSerialNumber
(
@RequestParam
(
"materialName"
)
String
materialName
,
@RequestParam
(
"serialNumberPrefix"
)
String
serialNumberPrefix
,
@RequestParam
(
"batAddTotal"
)
Integer
batAddTotal
,
@RequestParam
(
"remark"
)
String
remark
){
JSONObject
result
=
ExceptionConstants
.
standardSuccess
();
serialNumberService
.
batAddSerialNumber
(
materialName
,
serialNumberPrefix
,
batAddTotal
,
remark
);
return
result
;
}
...
...
src/main/java/com/jsh/erp/controller/SupplierController.java
View file @
37c64788
...
...
@@ -176,7 +176,12 @@ public class SupplierController {
item
.
put
(
"AdvanceIn"
,
supplier
.
getAdvancein
());
item
.
put
(
"BeginNeedGet"
,
supplier
.
getBeginneedget
());
item
.
put
(
"BeginNeedPay"
,
supplier
.
getBeginneedpay
());
/**
* 2018-01-28这里会有空指针异常
* */
if
(
supplier
.
getIsystem
()!=
null
){
item
.
put
(
"isystem"
,
supplier
.
getIsystem
()
==
(
short
)
0
?
"是"
:
"否"
);
}
item
.
put
(
"description"
,
supplier
.
getDescription
());
item
.
put
(
"fax"
,
supplier
.
getFax
());
item
.
put
(
"telephone"
,
supplier
.
getTelephone
());
...
...
src/main/java/com/jsh/erp/controller/UserController.java
View file @
37c64788
...
...
@@ -41,12 +41,12 @@ public class UserController {
String
username
=
loginame
.
trim
();
password
=
password
.
trim
();
//因密码用MD5加密,需要对密码进行转化
try
{
password
=
Tools
.
md5Encryp
(
password
);
}
catch
(
NoSuchAlgorithmException
e
)
{
e
.
printStackTrace
();
logger
.
error
(
">>>>>>>>>>>>>>转化MD5字符串错误 :"
+
e
.
getMessage
(),
e
);
}
//
try {
//
password = Tools.md5Encryp(password);
//
} catch (NoSuchAlgorithmException e) {
//
e.printStackTrace();
//
logger.error(">>>>>>>>>>>>>>转化MD5字符串错误 :" + e.getMessage(), e);
//
}
//判断用户是否已经登录过,登录过不再处理
Object
userInfo
=
request
.
getSession
().
getAttribute
(
"user"
);
User
sessionUser
=
new
User
();
...
...
src/main/java/com/jsh/erp/datasource/entities/Material.java
View file @
37c64788
...
...
@@ -190,7 +190,7 @@ public class Material {
* 2019-01-21新增字段enableSerialNumber
*是否开启序列号
* */
private
Boolean
enableSerialNumber
;
private
String
enableSerialNumber
;
/**
* This method was generated by MyBatis Generator.
...
...
@@ -744,11 +744,11 @@ public class Material {
this
.
otherfield3
=
otherfield3
==
null
?
null
:
otherfield3
.
trim
();
}
public
Boolean
getEnableSerialNumber
()
{
public
String
getEnableSerialNumber
()
{
return
enableSerialNumber
;
}
public
void
setEnableSerialNumber
(
Boolean
enableSerialNumber
)
{
public
void
setEnableSerialNumber
(
String
enableSerialNumber
)
{
this
.
enableSerialNumber
=
enableSerialNumber
;
}
}
\ No newline at end of file
src/main/java/com/jsh/erp/datasource/entities/MaterialExample.java
View file @
37c64788
...
...
@@ -1704,6 +1704,72 @@ public class MaterialExample {
addCriterion
(
"OtherField3 not between"
,
value1
,
value2
,
"otherfield3"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnableSerialNumberIsNull
()
{
addCriterion
(
"enableSerialNumber is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnableSerialNumberIsNotNull
()
{
addCriterion
(
"enableSerialNumber is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnableSerialNumberEqualTo
(
String
value
)
{
addCriterion
(
"enableSerialNumber ="
,
value
,
"enableSerialNumber"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnableSerialNumberNotEqualTo
(
String
value
)
{
addCriterion
(
"enableSerialNumber <>"
,
value
,
"enableSerialNumber"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnableSerialNumberGreaterThan
(
String
value
)
{
addCriterion
(
"enableSerialNumber >"
,
value
,
"enableSerialNumber"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnableSerialNumberGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"enableSerialNumber >="
,
value
,
"enableSerialNumber"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnableSerialNumberLessThan
(
String
value
)
{
addCriterion
(
"enableSerialNumber <"
,
value
,
"enableSerialNumber"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnableSerialNumberLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"enableSerialNumber <="
,
value
,
"enableSerialNumber"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnableSerialNumberLike
(
String
value
)
{
addCriterion
(
"enableSerialNumber like"
,
value
,
"enableSerialNumber"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnableSerialNumberNotLike
(
String
value
)
{
addCriterion
(
"enableSerialNumber not like"
,
value
,
"enableSerialNumber"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnableSerialNumberIn
(
List
<
String
>
values
)
{
addCriterion
(
"enableSerialNumber in"
,
values
,
"enableSerialNumber"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnableSerialNumberNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"enableSerialNumber not in"
,
values
,
"enableSerialNumber"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnableSerialNumberBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"enableSerialNumber between"
,
value1
,
value2
,
"enableSerialNumber"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEnableSerialNumberNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"enableSerialNumber not between"
,
value1
,
value2
,
"enableSerialNumber"
);
return
(
Criteria
)
this
;
}
}
/**
...
...
src/main/java/com/jsh/erp/datasource/entities/MaterialVo4Unit.java
View file @
37c64788
...
...
@@ -59,7 +59,7 @@ public class MaterialVo4Unit {
* 2019-01-21新增字段enableSerialNumber
*是否开启序列号
* */
private
Boolean
enableSerialNumber
;
private
String
enableSerialNumber
;
public
Long
getId
()
{
return
id
;
...
...
@@ -269,11 +269,11 @@ public class MaterialVo4Unit {
this
.
materialOther
=
materialOther
;
}
public
Boolean
getEnableSerialNumber
()
{
public
String
getEnableSerialNumber
()
{
return
enableSerialNumber
;
}
public
void
setEnableSerialNumber
(
Boolean
enableSerialNumber
)
{
public
void
setEnableSerialNumber
(
String
enableSerialNumber
)
{
this
.
enableSerialNumber
=
enableSerialNumber
;
}
}
\ No newline at end of file
Prev
1
2
Next
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