Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
drp
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
drp
Commits
e8351fcb
Commit
e8351fcb
authored
Mar 18, 2015
by
reedmi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善商品添加
parent
853128f1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
13 deletions
+27
-13
src/main/java/com/originspark/drp/models/resources/Ware.java
src/main/java/com/originspark/drp/models/resources/Ware.java
+22
-11
src/main/webapp/drp/app/view/resources/WareView.js
src/main/webapp/drp/app/view/resources/WareView.js
+4
-1
src/main/webapp/drp/app/view/resources/WareViewForm.js
src/main/webapp/drp/app/view/resources/WareViewForm.js
+1
-1
No files found.
src/main/java/com/originspark/drp/models/resources/Ware.java
View file @
e8351fcb
...
...
@@ -183,6 +183,18 @@ public class Ware extends AbstractModel {
this
.
inventories
=
inventories
;
}
public
int
getCountOfInCosts
(){
return
getInCosts
().
size
();
}
public
int
getCountOfOutCosts
(){
return
getOutCosts
().
size
();
}
public
int
getCountOfInventories
(){
return
getInventories
().
size
();
}
@Override
public
String
toString
()
{
return
"Ware(商品) => ["
+
super
.
toString
()
+
", name="
+
name
+
", brand="
+
brand
+
", model="
+
model
+
", unit="
+
unit
+
"]"
;
...
...
@@ -194,20 +206,19 @@ public class Ware extends AbstractModel {
Vendor
vendor
=
getVendor
();
if
(
vendor
!=
null
)
{
vendorUI
.
put
(
"id"
,
vendor
.
getId
());
vendorUI
.
put
(
"
name"
,
vendor
.
getName
());
vendorUI
.
put
(
"
contactMan"
,
vendor
.
getContactMan
());
}
return
vendorUI
;
}
public
int
getCountOfInCosts
(){
return
getInCosts
().
size
();
}
public
int
getCountOfOutCosts
(){
return
getOutCosts
().
size
();
}
public
int
getCountOfInventories
(){
return
getInventories
().
size
();
@JsonProperty
(
"category"
)
public
Map
<
String
,
Object
>
getCategoryUI
()
{
Map
<
String
,
Object
>
categoryUI
=
new
HashMap
<
String
,
Object
>();
WareCategory
category
=
getCategory
();
if
(
category
!=
null
)
{
categoryUI
.
put
(
"id"
,
category
.
getId
());
categoryUI
.
put
(
"name"
,
category
.
getName
());
}
return
categoryUI
;
}
}
src/main/webapp/drp/app/view/resources/WareView.js
View file @
e8351fcb
...
...
@@ -96,7 +96,10 @@ Ext.define('drp.app.view.resources.WareView', {
dataIndex
:
'
name
'
,
text
:
'
品名
'
,
renderer
:
function
(
value
,
mate
,
record
)
{
return
record
.
data
[
'
category.name
'
]
+
'
-
'
+
value
;
if
(
record
.
data
[
'
category.name
'
])
{
return
record
.
data
[
'
category.name
'
]
+
'
-
'
+
value
;
}
return
value
;
}
},
{
xtype
:
'
gridcolumn
'
,
...
...
src/main/webapp/drp/app/view/resources/WareViewForm.js
View file @
e8351fcb
...
...
@@ -126,7 +126,7 @@ Ext.define("drp.app.view.resources.WareViewForm", {
margin
:
'
5 0 0 5
'
,
name
:
'
vendor.id
'
,
valueField
:
'
id
'
,
displayField
:
'
name
'
,
displayField
:
'
contactMan
'
,
editable
:
false
,
store
:
'
drp.app.store.resources.VendorStore
'
,
fieldLabel
:
'
供应商
'
...
...
Write
Preview
Markdown
is supported
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