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
853128f1
Commit
853128f1
authored
Mar 18, 2015
by
Yonggang Yuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'custom-for-wangli' of git@182.92.242.253:originstar/drp.git into custom-for-wangli
parents
209a09f7
293ad776
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
193 additions
and
606 deletions
+193
-606
src/main/java/com/originspark/drp/controllers/projects/costs/StockInCostController.java
...drp/controllers/projects/costs/StockInCostController.java
+14
-18
src/main/java/com/originspark/drp/controllers/projects/invoices/StockInInvoiceController.java
...ntrollers/projects/invoices/StockInInvoiceController.java
+17
-87
src/main/java/com/originspark/drp/models/projects/invoices/AbstractInvoice.java
...inspark/drp/models/projects/invoices/AbstractInvoice.java
+13
-0
src/main/java/com/originspark/drp/models/projects/invoices/StockOutInvoice.java
...inspark/drp/models/projects/invoices/StockOutInvoice.java
+7
-12
src/main/webapp/drp/app/controller/projects/invoices/StockInInvoiceController.js
.../controller/projects/invoices/StockInInvoiceController.js
+35
-166
src/main/webapp/drp/app/controller/projects/invoices/StockOutInvoiceController.js
...controller/projects/invoices/StockOutInvoiceController.js
+4
-52
src/main/webapp/drp/app/model/projects/invoices/AbstractInvoiceModel.js
...p/drp/app/model/projects/invoices/AbstractInvoiceModel.js
+4
-28
src/main/webapp/drp/app/model/projects/invoices/StockInInvoiceModel.js
...pp/drp/app/model/projects/invoices/StockInInvoiceModel.js
+1
-1
src/main/webapp/drp/app/model/projects/invoices/StockOutInvoiceModel.js
...p/drp/app/model/projects/invoices/StockOutInvoiceModel.js
+2
-2
src/main/webapp/drp/app/store/AbstractStore.js
src/main/webapp/drp/app/store/AbstractStore.js
+1
-1
src/main/webapp/drp/app/view/projects/costs/StockInCostShowView.js
...webapp/drp/app/view/projects/costs/StockInCostShowView.js
+9
-18
src/main/webapp/drp/app/view/projects/costs/StockInCostView.js
...ain/webapp/drp/app/view/projects/costs/StockInCostView.js
+67
-120
src/main/webapp/drp/app/view/projects/invoices/StockInInvoiceView.js
...bapp/drp/app/view/projects/invoices/StockInInvoiceView.js
+15
-69
src/main/webapp/drp/app/view/projects/invoices/StockOutInvoiceView.js
...app/drp/app/view/projects/invoices/StockOutInvoiceView.js
+4
-32
No files found.
src/main/java/com/originspark/drp/controllers/projects/costs/StockInCostController.java
View file @
853128f1
...
...
@@ -3,8 +3,6 @@ package com.originspark.drp.controllers.projects.costs;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -18,7 +16,6 @@ import com.originspark.drp.controllers.BaseController;
import
com.originspark.drp.models.projects.costs.StockInCost
;
import
com.originspark.drp.models.projects.invoices.StockInInvoice
;
import
com.originspark.drp.service.projects.costs.StockInCostService
;
import
com.originspark.drp.util.SessionUtil
;
import
com.originspark.drp.util.json.FilterRequest
;
import
com.originspark.drp.util.json.JsonUtils
;
...
...
@@ -31,18 +28,18 @@ public class StockInCostController extends BaseController{
@RequestMapping
(
method
=
RequestMethod
.
POST
)
@ResponseBody
public
String
create
(
@RequestBody
StockInCost
stockInCost
,
HttpServletRequest
request
)
{
public
String
create
(
@RequestBody
StockInCost
stockInCost
)
{
StockInInvoice
invoiceUI
=
stockInCost
.
getInvoice
();
if
(
invoiceUI
==
null
){
return
failure
(
"所选入库单不能为空"
);
}
StockInInvoice
invoice
=
stockInInvoiceService
.
findById
(
invoiceUI
.
getId
());
if
(
invoice
==
null
){
return
failure
(
"你所选择的入库单不存在,请重新选择"
);
}
//检查该商品是否已经存在
boolean
have
=
false
;
for
(
StockInCost
cost
:
invoice
.
getCosts
()){
...
...
@@ -51,14 +48,14 @@ public class StockInCostController extends BaseController{
break
;
}
}
if
(
have
){
if
(
have
)
{
return
failure
(
"抱歉,不能重复添加商品"
);
}
stockInCost
.
setCreatedBy
(
SessionUtil
.
getCurrentUserName
(
request
));
stockInCost
.
setCreatedBy
(
getCurrentUser
().
getName
(
));
stockInCost
.
setForDate
(
invoice
.
getForDate
());
service
.
save
(
stockInCost
);
return
ok
(
"创建成功"
);
}
...
...
@@ -72,19 +69,18 @@ public class StockInCostController extends BaseController{
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
PUT
)
@ResponseBody
public
String
update
(
@PathVariable
Long
id
,
@RequestBody
StockInCost
stockInCost
,
HttpServletRequest
request
)
{
public
String
update
(
@PathVariable
Long
id
,
@RequestBody
StockInCost
stockInCost
)
{
StockInCost
existingStockInCost
=
service
.
findById
(
StockInCost
.
class
,
id
);
if
(
existingStockInCost
==
null
)
{
return
failure
(
"您要更新的
商品
不存在"
);
return
failure
(
"您要更新的
记录
不存在"
);
}
existingStockInCost
.
setUnitPrice
(
stockInCost
.
getUnitPrice
());
existingStockInCost
.
setQuantity
(
stockInCost
.
getQuantity
());
existingStockInCost
.
setUpdatedBy
(
SessionUtil
.
getCurrentUserName
(
request
));
existingStockInCost
.
setUpdatedBy
(
getCurrentUser
().
getName
());
service
.
update
(
existingStockInCost
);
return
ok
(
"更新成功"
);
}
...
...
@@ -103,5 +99,5 @@ public class StockInCostController extends BaseController{
return
ok
(
data
,
count
);
}
}
src/main/java/com/originspark/drp/controllers/projects/invoices/StockInInvoiceController.java
View file @
853128f1
...
...
@@ -16,71 +16,43 @@ import org.springframework.web.bind.annotation.ResponseBody;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.originspark.drp.models.projects.invoices.StockInInvoice
;
import
com.originspark.drp.util.SessionUtil
;
import
com.originspark.drp.util.enums.AuditState
;
import
com.originspark.drp.util.json.AuditStateUpdateJson
;
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
@RequestMapping
(
"
stockInInvoice
"
)
@RequestMapping
(
"
invoices/in
"
)
public
class
StockInInvoiceController
extends
AbstractInvoiceController
{
private
Logger
logger
=
Logger
.
getLogger
(
StockInInvoiceController
.
class
);
/*
@RequestMapping(method = RequestMethod.POST)
@RequestMapping
(
method
=
RequestMethod
.
POST
)
@ResponseBody
public String create(@RequestBody StockInInvoice invoice,HttpServletRequest request) {
Project systemUI = invoice.getSystem();
if(systemUI == null){
return failure("所选系统不能为空");
}
Project system = projectService.findById(systemUI.getId());
if(system==null){
return failure("你所选择的系统不存在,请重新选择");
}
invoice.setMaterialKeeperName(system.getMaterialKeeperName());
invoice.setWareKeeperName(system.getWareKeeperName());
invoice.setProjectManagerName(system.getProjectManagerName());
String currentUserName = SessionUtil.getCurrentUserName(request);
invoice.setCreatedByUserName(currentUserName);
public
String
create
(
@RequestBody
StockInInvoice
invoice
)
{
invoice
.
setCreatedBy
(
getCurrentUser
().
getName
());
StockInInvoice
savedInvoice
=
stockInInvoiceService
.
save
(
invoice
);
logger.info(">添加成功:"+savedInvoice.toString());
return ok("
系统确认成功",
savedInvoice.getId());
return
ok
(
"
信息确认成功"
,
savedInvoice
.
getId
());
}
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
PUT
)
@ResponseBody
public String update(@PathVariable Long id, @RequestBody StockInInvoice invoice
,HttpServletRequest request
) {
public
String
update
(
@PathVariable
Long
id
,
@RequestBody
StockInInvoice
invoice
)
{
StockInInvoice
existingInvoice
=
stockInInvoiceService
.
findById
(
StockInInvoice
.
class
,
id
);
if
(
existingInvoice
==
null
)
{
return
failure
(
"您要更新的入库单不存在"
);
}
Project systemUI = invoice.getSystem();
if(systemUI != null){
if(systemUI.getId() != null){
Project system = projectService.findById(systemUI.getId());
existingInvoice.setSystem(system);
}
}
existingInvoice
.
setForDate
(
invoice
.
getForDate
());
existingInvoice
.
setCode
(
invoice
.
getCode
());
existingInvoice
.
setTotalPrice
(
invoice
.
getTotalPrice
());
existingInvoice.setUpdatedByUserName(SessionUtil.getCurrentUserName(request));
existingInvoice
.
setUpdatedBy
(
getCurrentUser
().
getName
());
stockInInvoiceService
.
update
(
existingInvoice
);
return ok("更新成功",existingInvoice.getId());
}*/
return
ok
(
"更新成功"
,
existingInvoice
.
getId
());
}
@RequestMapping
(
method
=
RequestMethod
.
GET
)
@ResponseBody
...
...
@@ -100,8 +72,8 @@ public class StockInInvoiceController extends AbstractInvoiceController {
@RequestMapping
(
value
=
"/deleteBatch"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
String
deleteBatch
(
HttpServletRequest
request
)
{
String
data
=
request
.
getParameter
(
"data"
);
public
String
deleteBatch
()
{
String
data
=
request
()
.
getParameter
(
"data"
);
ObjectMapper
mapper
=
new
ObjectMapper
();
IdsJson
json
=
null
;
...
...
@@ -120,7 +92,7 @@ public class StockInInvoiceController extends AbstractInvoiceController {
continue
;
}
StockInInvoice
invoice
=
stockInInvoiceService
.
findById
(
StockInInvoice
.
class
,
id
);
if
(
invoice
!=
null
&&
invoice
.
getCosts
().
isEmpty
()){
stockInInvoiceService
.
delete
(
invoice
);
logger
.
info
(
">删除成功:"
+
invoice
.
toString
());
...
...
@@ -130,46 +102,4 @@ public class StockInInvoiceController extends AbstractInvoiceController {
return
ok
(
"删除成功(注释:部分合价不为0的入库单已忽略)"
);
}
/*@RequestMapping(value = "/updateAuditState", method = RequestMethod.GET)
@ResponseBody
public String updateAuditStateByUser(HttpServletRequest request) {
String data = request.getParameter("data");
ObjectMapper mapper = new ObjectMapper();
AuditStateUpdateJson json = null;
try {
json = mapper.readValue(data, AuditStateUpdateJson.class);
} catch (Exception e) {
return failure("提交数据有误");
}
if (json == null) {
return failure("没有需要审核的数据");
}
// 对当前登录用户的验证
AbstractUser user = SessionUtil.getCurrentUser(request);
Long userId = json.getUserId();
String userType = json.getUserType();
if (user.getId() != userId || !user.getType().equals(userType)) {
return failure("操作失败,无审核权限");
}
AuditState state = json.getState();
for (Long id : json.getInvoiceIds()) {
if(id == null){
continue;
}
StockInInvoice inInvoice = stockInInvoiceService.findById(StockInInvoice.class, id);
updateState(inInvoice, userType, state);
stockInInvoiceService.update(inInvoice);
}
return ok("提交成功");
}*/
}
src/main/java/com/originspark/drp/models/projects/invoices/AbstractInvoice.java
View file @
853128f1
...
...
@@ -56,6 +56,11 @@ public abstract class AbstractInvoice extends AbstractModel{
*/
private
String
regulator
;
/**
* 领用人
*/
private
String
receiveMan
;
public
static
enum
COLUMNS
{
STARTDATE
,
ENDDATE
,
CODE
,
MINTOTAL
,
MAXTOTAL
,
PROJECT
,
SYSTEM
,
...
...
@@ -122,6 +127,14 @@ public abstract class AbstractInvoice extends AbstractModel{
this
.
totalPrice
=
totalPrice
;
}
public
String
getReceiveMan
()
{
return
receiveMan
;
}
public
void
setReceiveMan
(
String
receiveMan
)
{
this
.
receiveMan
=
receiveMan
;
}
@Override
public
String
toString
()
{
return
super
.
toString
()+
", code="
+
code
+
", forDate="
+
forDate
+
", totalPrice="
+
totalPrice
;
...
...
src/main/java/com/originspark/drp/models/projects/invoices/StockOutInvoice.java
View file @
853128f1
...
...
@@ -25,9 +25,9 @@ public class StockOutInvoice extends AbstractInvoice{
private
List
<
StockOutCost
>
costs
;
/**
*
领用人
*
联系地址
*/
private
String
receiveMan
;
private
String
address
;
public
List
<
StockOutCost
>
getCosts
()
{
return
costs
;
...
...
@@ -37,20 +37,15 @@ public class StockOutInvoice extends AbstractInvoice{
this
.
costs
=
costs
;
}
public
String
get
ReceiveMan
()
{
return
receiveMan
;
public
String
get
Address
()
{
return
address
;
}
public
void
set
ReceiveMan
(
String
receiveMan
)
{
this
.
receiveMan
=
receiveMan
;
public
void
set
Address
(
String
address
)
{
this
.
address
=
address
;
}
public
int
getCostCount
(){
return
getCosts
().
size
();
}
@Override
public
String
toString
()
{
return
"StockInInvoice(出库单) => ["
+
super
.
toString
()+
", receiveMan="
+
receiveMan
+
"]"
;
}
}
src/main/webapp/drp/app/controller/projects/invoices/StockInInvoiceController.js
View file @
853128f1
This diff is collapsed.
Click to expand it.
src/main/webapp/drp/app/controller/projects/invoices/StockOutInvoiceController.js
View file @
853128f1
...
...
@@ -24,20 +24,11 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
currentInvoice
=
null
;
wareWindow
=
false
;
invoiceGrid
=
panel
.
down
(
'
gridpanel
'
);
//只有材料员可以新建删除出库单
/*if(user.type != "MaterialKeeper"){
invoiceGrid.down('#addOutInvoice_btn').setVisible(false);
invoiceGrid.down('#deleteOutInvoice_btn').setVisible(false);
}
if(user.type == "Leader"){
invoiceGrid.down('#operationOutInvoice_tb').setVisible(false);
}*/
}
},
//stock_in_invoice filter
'
stockoutinvoiceview > gridpanel
'
:
{
afterrender
:
this
.
buildFiltersByLoginUser
,
itemdblclick
:
this
.
showUpdateOutInvoiceForm
},
...
...
@@ -156,12 +147,6 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
},
{
property
:
"
endDate
"
,
value
:
Ext
.
Date
.
format
(
form
.
down
(
"
#endDate_filter
"
).
getValue
(),
'
Y-m-d
'
)
},
{
property
:
"
project
"
,
value
:
form
.
down
(
"
#projectName_filter
"
).
getValue
()
},
{
property
:
"
system
"
,
value
:
form
.
down
(
"
#systemName_filter
"
).
getValue
()
},
{
property
:
"
minTotal
"
,
value
:
form
.
down
(
"
#minTotal_filter
"
).
getValue
()
...
...
@@ -175,49 +160,16 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
property
:
"
receiveManName
"
,
value
:
form
.
down
(
"
#receiveManName_filter
"
).
getValue
()
},
{
property
:
"
materialKeepe
rName
"
,
value
:
form
.
down
(
"
#
materialKeepe
rName_filter
"
).
getValue
()
property
:
"
regulato
rName
"
,
value
:
form
.
down
(
"
#
regulato
rName_filter
"
).
getValue
()
},
{
property
:
"
wareKeeperName
"
,
value
:
form
.
down
(
"
#wareKeeperName_filter
"
).
getValue
()
},
{
property
:
"
projectM
anagerName
"
,
value
:
form
.
down
(
"
#
projetM
anagerName_filter
"
).
getValue
()
property
:
"
m
anagerName
"
,
value
:
form
.
down
(
"
#
m
anagerName_filter
"
).
getValue
()
}
]);
},
//根据当前登录用户过滤出库单
buildFiltersByLoginUser
:
function
(
grid
){
var
filters
=
[];
var
index
=
0
;
if
(
user
.
type
==
"
MaterialKeeper
"
){
filters
[
index
++
]
=
new
Object
({
property
:
"
materialKeeperId
"
,
value
:
user
.
id
});
}
else
if
(
user
.
type
==
"
WareKeeper
"
){
filters
[
index
++
]
=
{
property
:
"
materialKeeperAuditState
"
,
value
:
"
APPROVED
"
};
filters
[
index
++
]
=
{
property
:
"
wareKeeperId
"
,
value
:
user
.
id
};
}
else
if
(
user
.
type
==
"
ProjectManager
"
){
filters
[
index
++
]
=
new
Object
({
property
:
"
wareKeeperAuditState
"
,
value
:
"
APPROVED
"
});
filters
[
index
++
]
=
new
Object
({
property
:
"
projectManagerId
"
,
value
:
user
.
id
});
}
var
store
=
grid
.
getStore
();
store
.
filters
.
clear
();
store
.
filter
(
filters
);
},
//入库商品-删除
deleteStockOutCost
:
function
(
btn
)
{
...
...
src/main/webapp/drp/app/model/projects/invoices/AbstractInvoiceModel.js
View file @
853128f1
...
...
@@ -5,40 +5,16 @@ Ext.define("drp.app.model.projects.invoices.AbstractInvoiceModel", {
},
{
name
:
"
forDate
"
},
{
name
:
"
system
"
name
:
'
manager
'
},
{
name
:
"
system.id
"
,
persist
:
false
name
:
'
wareKeeper
'
},
{
name
:
"
system.projectName
"
,
persist
:
false
name
:
'
regulator
'
},
{
name
:
"
system.name
"
,
persist
:
false
name
:
"
receiveMan
"
},
{
name
:
"
totalPrice
"
,
type
:
"
number
"
},
{
name
:
"
materialKeeperName
"
,
persist
:
false
},
{
name
:
"
wareKeeperName
"
,
persist
:
false
},
{
name
:
"
projectManagerName
"
,
persist
:
false
},
{
name
:
"
wareKeeperAuditState
"
,
persist
:
false
},
{
name
:
"
materialKeeperAuditState
"
,
persist
:
false
},
{
name
:
"
projectManagerAuditState
"
,
persist
:
false
},
{
name
:
"
pass
"
,
type
:
"
boolean
"
},
{
name
:
"
costCount
"
,
type
:
"
int
"
,
...
...
src/main/webapp/drp/app/model/projects/invoices/StockInInvoiceModel.js
View file @
853128f1
...
...
@@ -2,7 +2,7 @@ Ext.define("drp.app.model.projects.invoices.StockInInvoiceModel", {
extend
:
"
drp.app.model.projects.invoices.AbstractInvoiceModel
"
,
proxy
:
{
type
:
'
rest
'
,
url
:
'
stockInInvoice
'
,
url
:
'
invoices/in
'
,
reader
:
{
type
:
"
json
"
,
root
:
"
data
"
,
...
...
src/main/webapp/drp/app/model/projects/invoices/StockOutInvoiceModel.js
View file @
853128f1
Ext
.
define
(
"
drp.app.model.projects.invoices.StockOutInvoiceModel
"
,
{
extend
:
"
drp.app.model.projects.invoices.AbstractInvoiceModel
"
,
fields
:
[{
name
:
"
receiveMan
"
name
:
"
address
"
}
],
proxy
:
{
type
:
'
rest
'
,
url
:
'
stockOutInvoice
'
,
url
:
'
invoices/out
'
,
reader
:
{
type
:
"
json
"
,
root
:
"
data
"
,
...
...
src/main/webapp/drp/app/store/AbstractStore.js
View file @
853128f1
...
...
@@ -2,7 +2,7 @@ Ext.define("drp.app.store.AbstractStore", {
extend
:
'
Ext.data.Store
'
,
model
:
'
drp.app.model.AbstractModel
'
,
pageSize
:
50
,
autoLoad
:
false
,
//
autoLoad : false,
remoteFilter
:
true
,
remoteSort
:
true
});
\ No newline at end of file
src/main/webapp/drp/app/view/projects/costs/StockInCostShowView.js
View file @
853128f1
...
...
@@ -22,7 +22,7 @@ Ext.define('drp.app.view.projects.resources.StockInCostShowView', {
height
:
40
,
items
:
[{
xtype
:
'
form
'
,
itemId
:
'
s
ystemInfo_s
tockInCost_form
'
,
itemId
:
'
stockInCost_form
'
,
items
:
[{
xtype
:
'
fieldcontainer
'
,
layout
:
'
column
'
,
...
...
@@ -30,16 +30,9 @@ Ext.define('drp.app.view.projects.resources.StockInCostShowView', {
xtype
:
'
displayfield
'
,
margin
:
'
5 0 0 15
'
,
labelWidth
:
30
,
name
:
'
system.projectName
'
,
name
:
'
receiveMan
'
,
width
:
200
,
fieldLabel
:
'
项目
'
},
{
xtype
:
'
displayfield
'
,
margin
:
'
5 0 0 15
'
,
labelWidth
:
30
,
name
:
'
system.name
'
,
width
:
200
,
fieldLabel
:
'
系统
'
fieldLabel
:
'
收到
'
},
{
xtype
:
'
displayfield
'
,
fieldLabel
:
'
日期
'
,
...
...
@@ -108,25 +101,23 @@ Ext.define('drp.app.view.projects.resources.StockInCostShowView', {
flex
:
1
,
margin
:
'
0 0 0 30
'
,
labelWidth
:
50
,
itemId
:
'
wareKeep
erName_df
'
,
fieldLabel
:
'
库管员
'
itemId
:
'
manag
erName_df
'
,
fieldLabel
:
'
负责人
'
},
{
xtype
:
'
displayfield
'
,
flex
:
1
,
labelWidth
:
50
,
itemId
:
'
material
KeeperName_df
'
,
fieldLabel
:
'
材料
员
'
itemId
:
'
ware
KeeperName_df
'
,
fieldLabel
:
'
库管
员
'
},
{
xtype
:
'
displayfield
'
,
flex
:
1
,
labelWidth
:
60
,
itemId
:
'
projectManage
rName_df
'
,
fieldLabel
:
'
项目经理
'
itemId
:
'
regulato
rName_df
'
,
fieldLabel
:
'
经手人
'
}]
}]
});
me
.
callParent
(
arguments
);
}
});
\ No newline at end of file
src/main/webapp/drp/app/view/projects/costs/StockInCostView.js
View file @
853128f1
This diff is collapsed.
Click to expand it.
src/main/webapp/drp/app/view/projects/invoices/StockInInvoiceView.js
View file @
853128f1
...
...
@@ -13,32 +13,15 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', {
initComponent
:
function
()
{
var
me
=
this
;
var
selModel
=
Ext
.
create
(
'
Ext.selection.CheckboxModel
'
,
{
listeners
:
{
selectionchange
:
function
(
sm
,
selections
)
{
me
.
down
(
'
#deleteInInvoice_btn
'
).
setDisabled
(
selections
.
length
==
0
);
me
.
down
(
'
#submitInInvoice_btn
'
).
setDisabled
(
selections
.
length
==
0
);
}
}
});
var
menuItems
=
[{
xtype
:
'
button
'
,
action
:
'
approveInInvoice
'
,
icon
:
'
resources/images/icons/approved.gif
'
,
text
:
'
提交通过
'
}];
if
(
user
.
type
!=
"
MaterialKeeper
"
){
menuItems
[
1
]
=
{
xtype
:
'
button
'
,
action
:
'
unapproveInInvoice
'
,
icon
:
'
resources/images/icons/unapproved.gif
'
,
text
:
'
失败退回
'
};
}
Ext
.
applyIf
(
me
,
{
items
:
[{
...
...
@@ -67,18 +50,6 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', {
fieldLabel
:
'
结束日期
'
,
editable
:
false
,
format
:
'
Y-m-d
'
},
{
xtype
:
'
textfield
'
,
margin
:
'
5 0 0 20
'
,
labelWidth
:
60
,
itemId
:
'
projectName_filter
'
,
fieldLabel
:
'
项目名称
'
},
{
xtype
:
'
textfield
'
,
margin
:
'
5 0 0 20
'
,
labelWidth
:
60
,
itemId
:
'
systemName_filter
'
,
fieldLabel
:
'
系统名称
'
}]
},
{
xtype
:
'
fieldcontainer
'
,
...
...
@@ -109,8 +80,8 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', {
xtype
:
'
textfield
'
,
margin
:
'
5 0 0 10
'
,
labelWidth
:
60
,
itemId
:
'
materialKeepe
rName_filter
'
,
fieldLabel
:
'
材料员
'
itemId
:
'
regulato
rName_filter
'
,
fieldLabel
:
'
经手人
'
},
{
xtype
:
'
textfield
'
,
margin
:
'
5 0 0 20
'
,
...
...
@@ -121,8 +92,8 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', {
xtype
:
'
textfield
'
,
margin
:
'
5 0 0 20
'
,
labelWidth
:
60
,
itemId
:
'
projetM
anagerName_filter
'
,
fieldLabel
:
'
项目经理
'
itemId
:
'
m
anagerName_filter
'
,
fieldLabel
:
'
负责人
'
},
{
xtype
:
'
button
'
,
margin
:
'
5 0 0 25
'
,
...
...
@@ -161,14 +132,9 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', {
dataIndex
:
'
code
'
},
{
xtype
:
'
gridcolumn
'
,
dataIndex
:
'
system.projectName
'
,
flex
:
2
,
text
:
'
项目名称
'
},
{
xtype
:
'
gridcolumn
'
,
dataIndex
:
'
system.name
'
,
dataIndex
:
'
receiveMan
'
,
flex
:
2
,
text
:
'
系统名称
'
text
:
'
收到
'
},
{
xtype
:
'
gridcolumn
'
,
dataIndex
:
'
totalPrice
'
,
...
...
@@ -176,31 +142,19 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', {
text
:
'
合价
'
},
{
xtype
:
'
gridcolumn
'
,
dataIndex
:
'
ma
terialKeeperName
'
,
dataIndex
:
'
ma
nager
'
,
flex
:
2
,
text
:
'
材料员
'
,
renderer
:
function
(
value
,
metadata
,
record
)
{
var
materialKeeperAuditState
=
record
.
data
.
materialKeeperAuditState
;
return
me
.
displyAuditState
(
value
,
materialKeeperAuditState
);
}
text
:
'
负责人
'
},
{
xtype
:
'
gridcolumn
'
,
dataIndex
:
'
wareKeeper
Name
'
,
dataIndex
:
'
wareKeeper
'
,
flex
:
2
,
text
:
'
库管员
'
,
renderer
:
function
(
value
,
metadata
,
record
)
{
var
wareKeeperAuditState
=
record
.
data
.
wareKeeperAuditState
;
return
me
.
displyAuditState
(
value
,
wareKeeperAuditState
);
}
text
:
'
库管员
'
},
{
xtype
:
'
gridcolumn
'
,
dataIndex
:
'
projectManage
rName
'
,
dataIndex
:
'
regulato
rName
'
,
flex
:
2
,
text
:
'
项目经理
'
,
renderer
:
function
(
value
,
metadata
,
record
)
{
var
projectManagerAuditState
=
record
.
data
.
projectManagerAuditState
;
return
me
.
displyAuditState
(
value
,
projectManagerAuditState
);
}
text
:
'
经手人
'
}],
dockedItems
:
[{
xtype
:
'
pagingtoolbar
'
,
...
...
@@ -224,15 +178,7 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', {
itemId
:
'
deleteInInvoice_btn
'
,
disabled
:
true
,
text
:
'
删除
'
}
/*, {
itemId : 'submitInInvoice_btn',
disabled : true,
text : '提交审核',
icon : 'resources/images/icons/database_save.png',
menu : {
items : menuItems
}
}*/
]
}]
}]
}]
...
...
src/main/webapp/drp/app/view/projects/invoices/StockOutInvoiceView.js
View file @
853128f1
...
...
@@ -13,7 +13,7 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
initComponent
:
function
()
{
var
me
=
this
;
var
selModel
=
Ext
.
create
(
'
Ext.selection.CheckboxModel
'
,
{
listeners
:
{
selectionchange
:
function
(
sm
,
selections
)
{
...
...
@@ -22,23 +22,7 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
}
}
});
var
menuItems
=
[{
xtype
:
'
button
'
,
action
:
'
approveOutInvoice
'
,
icon
:
'
resources/images/icons/approved.gif
'
,
text
:
'
提交通过
'
}];
if
(
user
.
type
!=
"
MaterialKeeper
"
){
menuItems
[
1
]
=
{
xtype
:
'
button
'
,
action
:
'
unapproveOutInvoice
'
,
icon
:
'
resources/images/icons/unapproved.gif
'
,
text
:
'
失败退回
'
};
}
Ext
.
applyIf
(
me
,
{
items
:
[{
...
...
@@ -67,18 +51,6 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
fieldLabel
:
'
结束日期
'
,
editable
:
false
,
format
:
'
Y-m-d
'
},
{
xtype
:
'
textfield
'
,
margin
:
'
5 0 0 20
'
,
labelWidth
:
60
,
itemId
:
'
projectName_filter
'
,
fieldLabel
:
'
项目名称
'
},
{
xtype
:
'
textfield
'
,
margin
:
'
5 0 0 20
'
,
labelWidth
:
60
,
itemId
:
'
systemName_filter
'
,
fieldLabel
:
'
系统名称
'
}]
},
{
xtype
:
'
fieldcontainer
'
,
...
...
@@ -115,7 +87,7 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
xtype
:
'
textfield
'
,
margin
:
'
5 0 0 10
'
,
labelWidth
:
60
,
itemId
:
'
materialKeepe
rName_filter
'
,
itemId
:
'
regulato
rName_filter
'
,
fieldLabel
:
'
材料员
'
},
{
xtype
:
'
textfield
'
,
...
...
@@ -127,7 +99,7 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
xtype
:
'
textfield
'
,
margin
:
'
5 0 0 20
'
,
labelWidth
:
60
,
itemId
:
'
projetM
anagerName_filter
'
,
itemId
:
'
m
anagerName_filter
'
,
fieldLabel
:
'
项目经理
'
},
{
xtype
:
'
button
'
,
...
...
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