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
5764b911
Commit
5764b911
authored
Mar 18, 2015
by
Junshan Wang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'custom-for-wangli' of
http://182.92.242.253/originstar/drp.git
into custom-for-wangli
parents
2096b784
f2a829ce
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
171 additions
and
139 deletions
+171
-139
src/main/java/com/originspark/drp/controllers/projects/costs/StockInCostController.java
...drp/controllers/projects/costs/StockInCostController.java
+5
-2
src/main/java/com/originspark/drp/controllers/projects/invoices/StockOutInvoiceController.java
...trollers/projects/invoices/StockOutInvoiceController.java
+1
-1
src/main/java/com/originspark/drp/controllers/resources/VendorController.java
...iginspark/drp/controllers/resources/VendorController.java
+1
-2
src/main/java/com/originspark/drp/service/resources/VendorServiceBean.java
.../originspark/drp/service/resources/VendorServiceBean.java
+5
-2
src/main/java/com/originspark/drp/service/resources/WareServiceBean.java
...om/originspark/drp/service/resources/WareServiceBean.java
+3
-2
src/main/webapp/drp/app/controller/projects/invoices/StockInInvoiceController.js
.../controller/projects/invoices/StockInInvoiceController.js
+47
-43
src/main/webapp/drp/app/controller/projects/invoices/StockOutInvoiceController.js
...controller/projects/invoices/StockOutInvoiceController.js
+46
-41
src/main/webapp/drp/app/model/resources/VendorModel.js
src/main/webapp/drp/app/model/resources/VendorModel.js
+6
-8
src/main/webapp/drp/app/model/resources/WareModel.js
src/main/webapp/drp/app/model/resources/WareModel.js
+1
-1
src/main/webapp/drp/app/view/projects/costs/StockInCostView.js
...ain/webapp/drp/app/view/projects/costs/StockInCostView.js
+2
-3
src/main/webapp/drp/app/view/projects/costs/StockOutCostView.js
...in/webapp/drp/app/view/projects/costs/StockOutCostView.js
+0
-1
src/main/webapp/drp/app/view/projects/invoices/StockInInvoiceView.js
...bapp/drp/app/view/projects/invoices/StockInInvoiceView.js
+1
-1
src/main/webapp/drp/app/view/projects/invoices/StockOutInvoiceView.js
...app/drp/app/view/projects/invoices/StockOutInvoiceView.js
+2
-11
src/main/webapp/drp/app/view/resources/StockInWareWin.js
src/main/webapp/drp/app/view/resources/StockInWareWin.js
+22
-0
src/main/webapp/drp/app/view/resources/StockOutWareWin.js
src/main/webapp/drp/app/view/resources/StockOutWareWin.js
+22
-0
src/main/webapp/drp/app/view/resources/VendorView.js
src/main/webapp/drp/app/view/resources/VendorView.js
+6
-20
src/main/webapp/drp/app/view/resources/WareView.js
src/main/webapp/drp/app/view/resources/WareView.js
+1
-1
No files found.
src/main/java/com/originspark/drp/controllers/projects/costs/StockInCostController.java
View file @
5764b911
package
com
.
originspark
.
drp
.
controllers
.
projects
.
costs
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -52,10 +53,12 @@ public class StockInCostController extends BaseController{
return
failure
(
"抱歉,不能重复添加商品"
);
}
stockInCost
.
setCreatedBy
(
getCurrentUser
().
getName
());
stockInCost
.
setForDate
(
invoice
.
getForDate
());
stockInCost
.
setCreatedOn
(
new
Date
());
stockInCost
.
setCreatedBy
(
getCurrentUser
().
getName
());
stockInCost
.
setUpdatedOn
(
new
Date
());
stockInCost
.
setUpdatedBy
(
getCurrentUser
().
getName
());
service
.
save
(
stockInCost
);
return
ok
(
"创建成功"
);
}
...
...
src/main/java/com/originspark/drp/controllers/projects/invoices/StockOutInvoiceController.java
View file @
5764b911
...
...
@@ -40,7 +40,7 @@ public class StockOutInvoiceController extends AbstractInvoiceController {
String
data
=
request
.
getParameter
(
"data"
);
ObjectMapper
mapper
=
new
ObjectMapper
();
IdsJson
json
=
null
;
try
{
json
=
mapper
.
readValue
(
data
,
IdsJson
.
class
);
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/originspark/drp/controllers/resources/VendorController.java
View file @
5764b911
...
...
@@ -18,9 +18,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.originspark.drp.controllers.BaseController
;
import
com.originspark.drp.models.resources.Vendor
;
import
com.originspark.drp.util.SessionUtil
;
import
com.originspark.drp.util.json.IdsJson
;
import
com.originspark.drp.util.json.FilterRequest
;
import
com.originspark.drp.util.json.IdsJson
;
import
com.originspark.drp.util.json.JsonUtils
;
@Controller
...
...
src/main/java/com/originspark/drp/service/resources/VendorServiceBean.java
View file @
5764b911
...
...
@@ -126,10 +126,13 @@ public class VendorServiceBean extends BaseDAOSupport<Vendor> implements VendorS
@Override
public
boolean
have
(
Vendor
vendor
)
{
String
jpql
=
"from Vendor where name =:name and contactMan =:contactMan"
;
String
jpql
=
"from Vendor where name =:name and contactMan =:contactMan
and phone =:phone and address =:address and note =:note
"
;
TypedQuery
<
Vendor
>
query
=
em
.
createQuery
(
jpql
,
Vendor
.
class
)
.
setParameter
(
"name"
,
vendor
.
getName
())
.
setParameter
(
"contactMan"
,
vendor
.
getContactMan
());
.
setParameter
(
"contactMan"
,
vendor
.
getContactMan
())
.
setParameter
(
"phone"
,
vendor
.
getPhone
())
.
setParameter
(
"address"
,
vendor
.
getAddress
())
.
setParameter
(
"note"
,
vendor
.
getNote
());
List
<
Vendor
>
vendors
=
query
.
getResultList
();
if
(
vendors
.
isEmpty
()){
...
...
src/main/java/com/originspark/drp/service/resources/WareServiceBean.java
View file @
5764b911
...
...
@@ -138,13 +138,14 @@ public class WareServiceBean extends BaseDAOSupport<Ware> implements WareService
@Override
public
boolean
have
(
Ware
ware
)
{
String
jpql
=
"from Ware where name =:name and model =:model and unit =:unit and brand =:brand and category =:category"
;
String
jpql
=
"from Ware where name =:name and model =:model and unit =:unit and brand =:brand and category =:category
and vendor =:vendor
"
;
TypedQuery
<
Ware
>
query
=
em
.
createQuery
(
jpql
,
Ware
.
class
)
.
setParameter
(
"name"
,
ware
.
getName
())
.
setParameter
(
"model"
,
ware
.
getModel
())
.
setParameter
(
"unit"
,
ware
.
getUnit
())
.
setParameter
(
"brand"
,
ware
.
getBrand
())
.
setParameter
(
"category"
,
ware
.
getCategory
());
.
setParameter
(
"category"
,
ware
.
getCategory
())
.
setParameter
(
"vendor"
,
ware
.
getVendor
());
List
<
Ware
>
wares
=
query
.
getResultList
();
if
(
wares
.
isEmpty
()){
...
...
src/main/webapp/drp/app/controller/projects/invoices/StockInInvoiceController.js
View file @
5764b911
This diff is collapsed.
Click to expand it.
src/main/webapp/drp/app/controller/projects/invoices/StockOutInvoiceController.js
View file @
5764b911
This diff is collapsed.
Click to expand it.
src/main/webapp/drp/app/model/resources/VendorModel.js
View file @
5764b911
Ext
.
define
(
"
drp.app.model.resources.VendorModel
"
,
{
extend
:
"
drp.app.model.AbstractModel
"
,
fields
:
[
{
name
:
"
name
"
,
// 名称
type
:
"
string
"
name
:
"
name
"
// 名称
},
{
name
:
"
contactMan
"
,
// 联系人
type
:
"
string
"
name
:
"
contactMan
"
// 联系人
},
{
name
:
"
address
"
,
//地址
type
:
"
string
"
name
:
"
address
"
//地址
},
{
name
:
"
phone
"
,
// 联系电话
type
:
"
string
"
name
:
"
phone
"
// 联系电话
},
{
name
:
"
note
"
// 联系电话
},
{
name
:
'
countOfWares
'
,
// 产品供应数量
type
:
'
int
'
,
...
...
src/main/webapp/drp/app/model/resources/WareModel.js
View file @
5764b911
...
...
@@ -22,7 +22,7 @@ Ext.define("drp.app.model.resources.WareModel", {
name
:
"
vendor.id
"
,
persist
:
false
},
{
name
:
"
vendor.
name
"
,
name
:
"
vendor.
contactMan
"
,
persist
:
false
},
{
name
:
'
note
'
// 备注
...
...
src/main/webapp/drp/app/view/projects/costs/StockInCostView.js
View file @
5764b911
...
...
@@ -108,7 +108,6 @@ Ext.define('drp.app.view.projects.resources.StockInCostView', {
name
:
'
regulator
'
,
valueField
:
'
name
'
,
displayField
:
'
name
'
,
allowBlank
:
false
,
store
:
'
drp.app.store.users.RegulatorStore
'
,
fieldLabel
:
'
经手人
'
},
{
...
...
@@ -206,7 +205,7 @@ Ext.define('drp.app.view.projects.resources.StockInCostView', {
}
}
}]
}]
/*
,
}],
listeners
:
{
select
:
function
(
grid
,
record
){
var
cost
=
record
.
data
;
...
...
@@ -225,7 +224,7 @@ Ext.define('drp.app.view.projects.resources.StockInCostView', {
inCostForm
.
down
(
'
#wareQuantity_stockInCost_nf
'
).
setReadOnly
(
false
);
inCostForm
.
down
(
'
#wareQuantity_stockInCost_nf
'
).
setValue
(
cost
.
quantity
);
}
}
*/
}
},
{
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<入库单-商品添加的form
xtype
:
'
panel
'
,
region
:
'
south
'
,
...
...
src/main/webapp/drp/app/view/projects/costs/StockOutCostView.js
View file @
5764b911
...
...
@@ -129,7 +129,6 @@ Ext.define('drp.app.view.projects.costs.StockOutCostView', {
name
:
'
regulator
'
,
valueField
:
'
name
'
,
displayField
:
'
name
'
,
allowBlank
:
false
,
store
:
'
drp.app.store.users.RegulatorStore
'
,
fieldLabel
:
'
经手人
'
},
{
...
...
src/main/webapp/drp/app/view/projects/invoices/StockInInvoiceView.js
View file @
5764b911
...
...
@@ -158,7 +158,7 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', {
text
:
'
库管员
'
},
{
xtype
:
'
gridcolumn
'
,
dataIndex
:
'
regulator
Name
'
,
dataIndex
:
'
regulator
'
,
flex
:
2
,
text
:
'
经手人
'
}],
...
...
src/main/webapp/drp/app/view/projects/invoices/StockOutInvoiceView.js
View file @
5764b911
...
...
@@ -18,7 +18,6 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
listeners
:
{
selectionchange
:
function
(
sm
,
selections
)
{
me
.
down
(
'
#deleteOutInvoice_btn
'
).
setDisabled
(
selections
.
length
==
0
);
me
.
down
(
'
#submitOutInvoice_btn
'
).
setDisabled
(
selections
.
length
==
0
);
}
}
});
...
...
@@ -164,7 +163,7 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
text
:
'
库管员
'
},
{
xtype
:
'
gridcolumn
'
,
dataIndex
:
'
regulator
Name
'
,
dataIndex
:
'
regulator
'
,
flex
:
2
,
text
:
'
经手人
'
}],
...
...
@@ -190,15 +189,7 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
itemId
:
'
deleteOutInvoice_btn
'
,
disabled
:
true
,
text
:
'
删除
'
}
/*, {
itemId : 'submitOutInvoice_btn',
disabled : true,
text : '提交审核',
icon : 'resources/images/icons/database_save.png',
menu : {
items : menuItems
}
}*/
]
}]
}]
}]
...
...
src/main/webapp/drp/app/view/resources/StockInWareWin.js
0 → 100644
View file @
5764b911
Ext
.
define
(
'
drp.app.view.resources.StockInWareWin
'
,
{
extend
:
'
Ext.window.Window
'
,
alias
:
'
widget.stockinwarewin
'
,
height
:
520
,
width
:
920
,
constrain
:
true
,
modal
:
true
,
closeAction
:
'
hide
'
,
resizable
:
false
,
layout
:
{
type
:
'
fit
'
},
items
:
[{
xtype
:
'
panel
'
,
layout
:
'
fit
'
,
items
:[{
xtype
:
'
wareview
'
,
title
:
''
,
closable
:
false
}]
}]
});
\ No newline at end of file
src/main/webapp/drp/app/view/resources/StockOutWareWin.js
0 → 100644
View file @
5764b911
Ext
.
define
(
'
drp.app.view.resources.StockOutWareWin
'
,
{
extend
:
'
Ext.window.Window
'
,
alias
:
'
widget.stockoutwarewin
'
,
height
:
520
,
width
:
920
,
constrain
:
true
,
modal
:
true
,
closeAction
:
'
hide
'
,
resizable
:
false
,
layout
:
{
type
:
'
fit
'
},
items
:
[{
xtype
:
'
panel
'
,
layout
:
'
fit
'
,
items
:[{
xtype
:
'
wareview
'
,
title
:
''
,
closable
:
false
}]
}]
});
\ No newline at end of file
src/main/webapp/drp/app/view/resources/VendorView.js
View file @
5764b911
...
...
@@ -83,48 +83,34 @@ Ext.define('drp.app.view.resources.VendorView', {
autoScroll
:
true
,
columns
:
[{
xtype
:
'
gridcolumn
'
,
width
:
90
,
flex
:
1
,
dataIndex
:
'
contactMan
'
,
text
:
'
联系人
'
},
{
xtype
:
'
gridcolumn
'
,
width
:
130
,
flex
:
1
,
dataIndex
:
'
phone
'
,
text
:
'
联系电话
'
},
{
xtype
:
'
gridcolumn
'
,
width
:
160
,
flex
:
2
,
dataIndex
:
'
name
'
,
text
:
'
公司名称
'
},
{
xtype
:
'
gridcolumn
'
,
width
:
180
,
flex
:
2
,
dataIndex
:
'
address
'
,
text
:
'
公司地址
'
},
{
xtype
:
'
gridcolumn
'
,
width
:
100
,
flex
:
1
,
dataIndex
:
'
countOfWares
'
,
text
:
'
供应商品数量
'
},
{
xtype
:
'
gridcolumn
'
,
width
:
200
,
flex
:
3
,
dataIndex
:
'
note
'
,
text
:
'
备注
'
},
{
xtype
:
'
gridcolumn
'
,
text
:
'
维护信息
'
,
columns
:
[{
xtype
:
'
gridcolumn
'
,
width
:
140
,
dataIndex
:
'
createOn
'
,
text
:
'
创建时间
'
},
{
xtype
:
'
gridcolumn
'
,
width
:
140
,
dataIndex
:
'
updateOn
'
,
text
:
'
更新时间
'
}]
}],
dockedItems
:
[{
xtype
:
'
toolbar
'
,
...
...
src/main/webapp/drp/app/view/resources/WareView.js
View file @
5764b911
...
...
@@ -129,7 +129,7 @@ Ext.define('drp.app.view.resources.WareView', {
},
{
xtype
:
'
gridcolumn
'
,
width
:
100
,
dataIndex
:
'
vendor.
name
'
,
dataIndex
:
'
vendor.
contactMan
'
,
text
:
'
供应商
'
},
{
xtype
:
'
gridcolumn
'
,
...
...
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