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
419b27f1
Commit
419b27f1
authored
Mar 18, 2015
by
reedmi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初步完成出库单
parent
4e2b7d12
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
303 additions
and
546 deletions
+303
-546
src/main/java/com/originspark/drp/controllers/projects/costs/StockOutCostController.java
...rp/controllers/projects/costs/StockOutCostController.java
+10
-8
src/main/java/com/originspark/drp/controllers/projects/invoices/StockInInvoiceController.java
...ntrollers/projects/invoices/StockInInvoiceController.java
+0
-2
src/main/java/com/originspark/drp/controllers/projects/invoices/StockOutInvoiceController.java
...trollers/projects/invoices/StockOutInvoiceController.java
+10
-83
src/main/java/com/originspark/drp/models/AbstractModel.java
src/main/java/com/originspark/drp/models/AbstractModel.java
+16
-16
src/main/java/com/originspark/drp/models/projects/invoices/StockOutInvoice.java
...inspark/drp/models/projects/invoices/StockOutInvoice.java
+19
-5
src/main/resources/sql/users.sql
src/main/resources/sql/users.sql
+6
-6
src/main/webapp/drp/app/controller/projects/invoices/StockInInvoiceController.js
.../controller/projects/invoices/StockInInvoiceController.js
+2
-3
src/main/webapp/drp/app/controller/projects/invoices/StockOutInvoiceController.js
...controller/projects/invoices/StockOutInvoiceController.js
+96
-216
src/main/webapp/drp/app/model/projects/invoices/StockOutInvoiceModel.js
...p/drp/app/model/projects/invoices/StockOutInvoiceModel.js
+4
-2
src/main/webapp/drp/app/view/projects/costs/StockInCostView.js
...ain/webapp/drp/app/view/projects/costs/StockInCostView.js
+2
-2
src/main/webapp/drp/app/view/projects/costs/StockOutCostShowView.js
...ebapp/drp/app/view/projects/costs/StockOutCostShowView.js
+32
-31
src/main/webapp/drp/app/view/projects/costs/StockOutCostView.js
...in/webapp/drp/app/view/projects/costs/StockOutCostView.js
+76
-131
src/main/webapp/drp/app/view/projects/invoices/StockInInvoiceView.js
...bapp/drp/app/view/projects/invoices/StockInInvoiceView.js
+10
-4
src/main/webapp/drp/app/view/projects/invoices/StockOutInvoiceView.js
...app/drp/app/view/projects/invoices/StockOutInvoiceView.js
+20
-37
No files found.
src/main/java/com/originspark/drp/controllers/projects/costs/StockOutCostController.java
View file @
419b27f1
package
com
.
originspark
.
drp
.
controllers
.
projects
.
costs
;
package
com
.
originspark
.
drp
.
controllers
.
projects
.
costs
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
...
@@ -31,18 +32,18 @@ public class StockOutCostController extends BaseController{
...
@@ -31,18 +32,18 @@ public class StockOutCostController extends BaseController{
@RequestMapping
(
method
=
RequestMethod
.
POST
)
@RequestMapping
(
method
=
RequestMethod
.
POST
)
@ResponseBody
@ResponseBody
public
String
create
(
@RequestBody
StockOutCost
stockOutCost
,
HttpServletRequest
request
)
{
public
String
create
(
@RequestBody
StockOutCost
stockOutCost
)
{
StockOutInvoice
invoiceUI
=
stockOutCost
.
getInvoice
();
StockOutInvoice
invoiceUI
=
stockOutCost
.
getInvoice
();
if
(
invoiceUI
==
null
){
if
(
invoiceUI
==
null
){
return
failure
(
"所选出库单不能为空"
);
return
failure
(
"所选出库单不能为空"
);
}
}
StockOutInvoice
invoice
=
stockOutInvoiceService
.
findById
(
invoiceUI
.
getId
());
StockOutInvoice
invoice
=
stockOutInvoiceService
.
findById
(
invoiceUI
.
getId
());
if
(
invoice
==
null
){
if
(
invoice
==
null
){
return
failure
(
"你所选择的入库单不存在,请重新选择"
);
return
failure
(
"你所选择的入库单不存在,请重新选择"
);
}
}
//检查该商品是否已经存在
//检查该商品是否已经存在
boolean
have
=
false
;
boolean
have
=
false
;
for
(
StockOutCost
cost
:
invoice
.
getCosts
()){
for
(
StockOutCost
cost
:
invoice
.
getCosts
()){
...
@@ -51,13 +52,14 @@ public class StockOutCostController extends BaseController{
...
@@ -51,13 +52,14 @@ public class StockOutCostController extends BaseController{
break
;
break
;
}
}
}
}
if
(
have
){
if
(
have
){
return
failure
(
"抱歉,不能重复添加商品"
);
return
failure
(
"抱歉,不能重复添加商品"
);
}
}
stockOutCost
.
setCreatedBy
(
SessionUtil
.
getCurrentUserName
(
request
));
stockOutCost
.
setForDate
(
invoice
.
getForDate
());
stockOutCost
.
setCreatedOn
(
new
Date
());
stockOutCost
.
setCreatedBy
(
getCurrentUser
().
getName
());
stockOutCost
.
setUpdatedOn
(
new
Date
());
service
.
save
(
stockOutCost
);
service
.
save
(
stockOutCost
);
return
ok
(
"创建成功"
);
return
ok
(
"创建成功"
);
}
}
...
...
src/main/java/com/originspark/drp/controllers/projects/invoices/StockInInvoiceController.java
View file @
419b27f1
...
@@ -3,8 +3,6 @@ package com.originspark.drp.controllers.projects.invoices;
...
@@ -3,8 +3,6 @@ package com.originspark.drp.controllers.projects.invoices;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
org.apache.log4j.Logger
;
import
org.apache.log4j.Logger
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
src/main/java/com/originspark/drp/controllers/projects/invoices/StockOutInvoiceController.java
View file @
419b27f1
...
@@ -16,42 +16,22 @@ import org.springframework.web.bind.annotation.ResponseBody;
...
@@ -16,42 +16,22 @@ import org.springframework.web.bind.annotation.ResponseBody;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.originspark.drp.models.projects.invoices.StockOutInvoice
;
import
com.originspark.drp.models.projects.invoices.StockOutInvoice
;
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.FilterRequest
;
import
com.originspark.drp.util.json.IdsJson
;
import
com.originspark.drp.util.json.JsonUtils
;
import
com.originspark.drp.util.json.JsonUtils
;
@Controller
@Controller
@RequestMapping
(
"
stockOutInvoice
"
)
@RequestMapping
(
"
invoices/out
"
)
public
class
StockOutInvoiceController
extends
AbstractInvoiceController
{
public
class
StockOutInvoiceController
extends
AbstractInvoiceController
{
private
Logger
logger
=
Logger
.
getLogger
(
StockOutInvoiceController
.
class
);
private
Logger
logger
=
Logger
.
getLogger
(
StockOutInvoiceController
.
class
);
/*
@RequestMapping(method = RequestMethod.POST)
@RequestMapping
(
method
=
RequestMethod
.
POST
)
@ResponseBody
@ResponseBody
public String create(@RequestBody StockOutInvoice invoice,HttpServletRequest request) {
public
String
create
(
@RequestBody
StockOutInvoice
invoice
)
{
invoice
.
setCreatedBy
(
getCurrentUser
().
getName
());
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);
StockOutInvoice
savedInvoice
=
stockOutInvoiceService
.
save
(
invoice
);
StockOutInvoice
savedInvoice
=
stockOutInvoiceService
.
save
(
invoice
);
return ok("
系统
确认成功", savedInvoice.getId());
return
ok
(
"
信息
确认成功"
,
savedInvoice
.
getId
());
}
}
@RequestMapping
(
value
=
"/deleteBatch"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/deleteBatch"
,
method
=
RequestMethod
.
GET
)
...
@@ -86,30 +66,18 @@ public class StockOutInvoiceController extends AbstractInvoiceController {
...
@@ -86,30 +66,18 @@ public class StockOutInvoiceController extends AbstractInvoiceController {
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
PUT
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
PUT
)
@ResponseBody
@ResponseBody
public String update(@PathVariable Long id, @RequestBody StockOutInvoice invoice,HttpServletRequest request) {
public
String
update
(
@PathVariable
Long
id
,
@RequestBody
StockOutInvoice
invoice
)
{
StockOutInvoice
existingInvoice
=
stockOutInvoiceService
.
findById
(
StockOutInvoice
.
class
,
id
);
StockOutInvoice
existingInvoice
=
stockOutInvoiceService
.
findById
(
StockOutInvoice
.
class
,
id
);
if
(
existingInvoice
==
null
)
{
if
(
existingInvoice
==
null
)
{
return failure("您要更新的
入
库单不存在");
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
.
setForDate
(
invoice
.
getForDate
());
existingInvoice
.
setCode
(
invoice
.
getCode
());
existingInvoice
.
setCode
(
invoice
.
getCode
());
existingInvoice
.
setTotalPrice
(
invoice
.
getTotalPrice
());
existingInvoice
.
setTotalPrice
(
invoice
.
getTotalPrice
());
existingInvoice
.
setUpdatedBy
(
getCurrentUser
().
getName
());
existingInvoice.setUpdatedByUserName(SessionUtil.getCurrentUserName(request));
stockOutInvoiceService
.
update
(
existingInvoice
);
stockOutInvoiceService
.
update
(
existingInvoice
);
return
ok
(
"更新成功"
,
existingInvoice
.
getId
());
return
ok
(
"更新成功"
,
existingInvoice
.
getId
());
}
*/
}
@RequestMapping
(
method
=
RequestMethod
.
GET
)
@RequestMapping
(
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
...
@@ -126,45 +94,4 @@ public class StockOutInvoiceController extends AbstractInvoiceController {
...
@@ -126,45 +94,4 @@ public class StockOutInvoiceController extends AbstractInvoiceController {
return
ok
(
data
,
count
);
return
ok
(
data
,
count
);
}
}
/*@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;
}
StockOutInvoice outInvoice = stockOutInvoiceService.findById(StockOutInvoice.class, id);
updateState(outInvoice, userType, state);
stockOutInvoiceService.update(outInvoice);
}
return ok("提交成功");
}*/
}
}
src/main/java/com/originspark/drp/models/AbstractModel.java
View file @
419b27f1
...
@@ -23,8 +23,8 @@ public abstract class AbstractModel {
...
@@ -23,8 +23,8 @@ public abstract class AbstractModel {
/**
/**
* 维护信息:记录创建日期
* 维护信息:记录创建日期
*/
*/
@Column
(
name
=
"createOn"
,
nullable
=
false
)
@Column
(
name
=
"create
d
On"
,
nullable
=
false
)
private
Date
createOn
;
private
Date
create
d
On
;
/**
/**
* 维护信息:记录创建者
* 维护信息:记录创建者
...
@@ -35,8 +35,8 @@ public abstract class AbstractModel {
...
@@ -35,8 +35,8 @@ public abstract class AbstractModel {
/**
/**
* 维护信息:记录更新日期
* 维护信息:记录更新日期
*/
*/
@Column
(
name
=
"updateOn"
,
nullable
=
false
)
@Column
(
name
=
"update
d
On"
,
nullable
=
false
)
private
Date
updateOn
;
private
Date
update
d
On
;
/**
/**
* 维护信息:记录更新者
* 维护信息:记录更新者
...
@@ -58,12 +58,12 @@ public abstract class AbstractModel {
...
@@ -58,12 +58,12 @@ public abstract class AbstractModel {
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
Date
getCreateOn
()
{
public
Date
getCreate
d
On
()
{
return
createOn
;
return
create
d
On
;
}
}
public
void
setCreate
On
(
Date
create
On
)
{
public
void
setCreate
dOn
(
Date
created
On
)
{
this
.
create
On
=
create
On
;
this
.
create
dOn
=
created
On
;
}
}
public
String
getCreatedBy
()
{
public
String
getCreatedBy
()
{
...
@@ -74,12 +74,12 @@ public abstract class AbstractModel {
...
@@ -74,12 +74,12 @@ public abstract class AbstractModel {
this
.
createdBy
=
createdBy
;
this
.
createdBy
=
createdBy
;
}
}
public
Date
getUpdateOn
()
{
public
Date
getUpdate
d
On
()
{
return
updateOn
;
return
update
d
On
;
}
}
public
void
setUpdate
On
(
Date
update
On
)
{
public
void
setUpdate
dOn
(
Date
updated
On
)
{
this
.
update
On
=
update
On
;
this
.
update
dOn
=
updated
On
;
}
}
public
String
getUpdatedBy
()
{
public
String
getUpdatedBy
()
{
...
@@ -100,17 +100,17 @@ public abstract class AbstractModel {
...
@@ -100,17 +100,17 @@ public abstract class AbstractModel {
@PrePersist
@PrePersist
private
void
prePersist
()
{
private
void
prePersist
()
{
createOn
=
new
Date
();
create
d
On
=
new
Date
();
update
On
=
create
On
;
update
dOn
=
created
On
;
}
}
@PreUpdate
@PreUpdate
private
void
preUpdate
(){
private
void
preUpdate
(){
updateOn
=
new
Date
();
update
d
On
=
new
Date
();
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"id="
+
id
+
", updateOn="
+
updateOn
;
return
"id="
+
id
+
", updateOn="
+
update
d
On
;
}
}
}
}
\ No newline at end of file
src/main/java/com/originspark/drp/models/projects/invoices/StockOutInvoice.java
View file @
419b27f1
...
@@ -24,10 +24,16 @@ public class StockOutInvoice extends AbstractInvoice{
...
@@ -24,10 +24,16 @@ public class StockOutInvoice extends AbstractInvoice{
@OneToMany
(
mappedBy
=
"invoice"
)
@OneToMany
(
mappedBy
=
"invoice"
)
private
List
<
StockOutCost
>
costs
;
private
List
<
StockOutCost
>
costs
;
//TODO 将receiveMan、receiveAddress、receivePhone抽取为trader?
/**
/**
* 联系地址
* 联系地址
*/
*/
private
String
address
;
private
String
receiveAddress
;
/**
* 联系电话
*/
private
String
receivePhone
;
public
List
<
StockOutCost
>
getCosts
()
{
public
List
<
StockOutCost
>
getCosts
()
{
return
costs
;
return
costs
;
...
@@ -37,12 +43,20 @@ public class StockOutInvoice extends AbstractInvoice{
...
@@ -37,12 +43,20 @@ public class StockOutInvoice extends AbstractInvoice{
this
.
costs
=
costs
;
this
.
costs
=
costs
;
}
}
public
String
getAddress
()
{
public
String
getReceiveAddress
()
{
return
address
;
return
receiveAddress
;
}
public
void
setReceiveAddress
(
String
receiveAddress
)
{
this
.
receiveAddress
=
receiveAddress
;
}
public
String
getReceivePhone
()
{
return
receivePhone
;
}
}
public
void
set
Address
(
String
address
)
{
public
void
set
ReceivePhone
(
String
receivePhone
)
{
this
.
address
=
address
;
this
.
receivePhone
=
receivePhone
;
}
}
public
int
getCostCount
(){
public
int
getCostCount
(){
...
...
src/main/resources/sql/users.sql
View file @
419b27f1
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
-- http://www.phpmyadmin.net
-- http://www.phpmyadmin.net
--
--
-- Host: 127.0.0.1
-- Host: 127.0.0.1
-- Generation Time: 2015-03-1
7 07:44:48
-- Generation Time: 2015-03-1
8 05:10:34
-- 服务器版本: 5.6.20
-- 服务器版本: 5.6.20
-- PHP Version: 5.5.15
-- PHP Version: 5.5.15
...
@@ -28,10 +28,11 @@ SET time_zone = "+00:00";
...
@@ -28,10 +28,11 @@ SET time_zone = "+00:00";
CREATE
TABLE
IF
NOT
EXISTS
`users`
(
CREATE
TABLE
IF
NOT
EXISTS
`users`
(
`id`
bigint
(
20
)
NOT
NULL
,
`id`
bigint
(
20
)
NOT
NULL
,
`create_on`
datetime
DEFAULT
NULL
,
`created_by`
varchar
(
10
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
`created_by`
varchar
(
10
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
`update_on`
datetime
DEFAULT
NULL
,
`created_on`
datetime
NOT
NULL
,
`status`
varchar
(
255
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
`updated_by`
varchar
(
10
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
`updated_by`
varchar
(
10
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
`updated_on`
datetime
NOT
NULL
,
`address`
varchar
(
255
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
`address`
varchar
(
255
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
`code`
varchar
(
255
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
`code`
varchar
(
255
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
`email`
varchar
(
255
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
`email`
varchar
(
255
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
...
@@ -39,7 +40,6 @@ CREATE TABLE IF NOT EXISTS `users` (
...
@@ -39,7 +40,6 @@ CREATE TABLE IF NOT EXISTS `users` (
`name`
varchar
(
255
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
`name`
varchar
(
255
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
`password`
varchar
(
255
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
`password`
varchar
(
255
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
`phone`
varchar
(
255
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
`phone`
varchar
(
255
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
`status`
varchar
(
255
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
`type`
varchar
(
255
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
`type`
varchar
(
255
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
`username`
varchar
(
255
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
`username`
varchar
(
255
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_unicode_ci
AUTO_INCREMENT
=
2
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_unicode_ci
AUTO_INCREMENT
=
2
;
...
@@ -48,8 +48,8 @@ CREATE TABLE IF NOT EXISTS `users` (
...
@@ -48,8 +48,8 @@ CREATE TABLE IF NOT EXISTS `users` (
-- 转存表中的数据 `users`
-- 转存表中的数据 `users`
--
--
INSERT
INTO
`users`
(
`id`
,
`create
_on`
,
`created_by`
,
`update_on`
,
`updated_by`
,
`address`
,
`code`
,
`email`
,
`gender`
,
`name`
,
`password`
,
`phone`
,
`status
`
,
`type`
,
`username`
)
VALUES
INSERT
INTO
`users`
(
`id`
,
`create
d_by`
,
`created_on`
,
`status`
,
`updated_by`
,
`updated_on`
,
`address`
,
`code`
,
`email`
,
`gender`
,
`name`
,
`password`
,
`phone
`
,
`type`
,
`username`
)
VALUES
(
1
,
NULL
,
NULL
,
'2015-03-17 14:44:18'
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
'admin'
,
'17a73b924892695ff91e16b35ce100b7c64928e43d5a170a'
,
NULL
,
'ACTIVE'
,
'MANAGER'
,
'admin'
);
(
1
,
NULL
,
'2015-03-18 11:25:34'
,
'ACTIVE'
,
NULL
,
'2015-03-18 12:10:12'
,
''
,
'admin'
,
''
,
'MALE'
,
'admin'
,
'17a73b924892695ff91e16b35ce100b7c64928e43d5a170a'
,
'1324332345'
,
'MANAGER'
,
NULL
);
--
--
-- Indexes for dumped tables
-- Indexes for dumped tables
...
...
src/main/webapp/drp/app/controller/projects/invoices/StockInInvoiceController.js
View file @
419b27f1
...
@@ -234,7 +234,7 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
...
@@ -234,7 +234,7 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
store
.
removeAll
(
false
);
store
.
removeAll
(
false
);
inInvoiceCostWin
.
down
(
'
#addStockInCost_btn
'
).
setDisabled
(
true
);
inInvoiceCostWin
.
down
(
'
#addStockInCost_btn
'
).
setDisabled
(
true
);
inInvoiceCostWin
.
down
(
'
#totalPrice_stockInCost_df
'
).
setValue
(
0
);
inInvoiceCostWin
.
down
(
'
#totalPrice_stockInCost_df
'
).
setValue
(
0
);
inInvoiceCostWin
.
down
(
'
#
systemInfo
_stockInCost_form
'
).
getForm
().
reset
();
inInvoiceCostWin
.
down
(
'
#
header
_stockInCost_form
'
).
getForm
().
reset
();
inInvoiceCostWin
.
down
(
'
#stockInCost_form
'
).
getForm
().
reset
();
inInvoiceCostWin
.
down
(
'
#stockInCost_form
'
).
getForm
().
reset
();
inInvoiceCostWin
.
setTitle
(
"
新增入库单
"
);
inInvoiceCostWin
.
setTitle
(
"
新增入库单
"
);
...
@@ -303,8 +303,7 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
...
@@ -303,8 +303,7 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
currentInvoice
.
set
(
"
forDate
"
,
panel
.
down
(
'
#forDate_stockInInvoice_df
'
).
getValue
());
currentInvoice
.
set
(
"
forDate
"
,
panel
.
down
(
'
#forDate_stockInInvoice_df
'
).
getValue
());
currentInvoice
.
set
(
"
code
"
,
panel
.
down
(
'
#code_stockInInvoice_tf
'
).
getValue
());
currentInvoice
.
set
(
"
code
"
,
panel
.
down
(
'
#code_stockInInvoice_tf
'
).
getValue
());
currentInvoice
.
set
(
"
totalPrice
"
,
totalPrice_stockInCost
);
currentInvoice
.
set
(
"
totalPrice
"
,
totalPrice_stockInCost
);
currentInvoice
.
set
(
"
system
"
,
null
);
currentInvoice
.
save
({
currentInvoice
.
save
({
success
:
function
(
response
,
operation
)
{
success
:
function
(
response
,
operation
)
{
invoiceGrid
.
getStore
().
load
();
invoiceGrid
.
getStore
().
load
();
...
...
src/main/webapp/drp/app/controller/projects/invoices/StockOutInvoiceController.js
View file @
419b27f1
...
@@ -9,84 +9,84 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
...
@@ -9,84 +9,84 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
currentInvoice
:
null
,
currentInvoice
:
null
,
outCostGrid
:
null
,
outCostGrid
:
null
,
outCostForm
:
null
,
outCostForm
:
null
,
outInvoiceCostWin
:
null
,
//costWin默认是未创建的
outInvoiceCostWin
:
null
,
//
costWin默认是未创建的
invoiceCostWin
:
null
,
invoiceCostWin
:
null
,
wareWindow
:
null
,
wareWindow
:
null
,
init
:
function
()
{
init
:
function
()
{
me
=
this
;
me
=
this
;
this
.
control
({
this
.
control
({
'
stockoutinvoiceview
'
:
{
'
stockoutinvoiceview
'
:
{
afterrender
:
function
(
panel
)
{
afterrender
:
function
(
panel
)
{
outInvoiceCostWin
=
false
;
outInvoiceCostWin
=
false
;
invoiceCostWin
=
false
;
invoiceCostWin
=
false
;
currentInvoice
=
null
;
currentInvoice
=
null
;
wareWindow
=
false
;
wareWindow
=
false
;
invoiceGrid
=
panel
.
down
(
'
gridpanel
'
);
invoiceGrid
=
panel
.
down
(
'
gridpanel
'
);
invoiceGrid
.
getStore
().
load
();
}
}
},
},
//stock_in_invoice filter
//
stock_in_invoice filter
'
stockoutinvoiceview > gridpanel
'
:
{
'
stockoutinvoiceview > gridpanel
'
:
{
itemdblclick
:
this
.
showUpdateOutInvoiceForm
itemdblclick
:
this
.
showUpdateOutInvoiceForm
},
},
//stock_in_invoice search
//
stock_in_invoice search
'
stockoutinvoiceview button[action=searchStockOutInvoice]
'
:
{
'
stockoutinvoiceview button[action=searchStockOutInvoice]
'
:
{
click
:
this
.
searchStockOutInvoice
click
:
this
.
searchStockOutInvoice
},
},
//stock_in_invoice add
//
stock_in_invoice add
'
stockoutinvoiceview button[action=showAddOutInvoiceUI]
'
:
{
'
stockoutinvoiceview button[action=showAddOutInvoiceUI]
'
:
{
click
:
this
.
showCreateOutInvoiceForm
click
:
this
.
showCreateOutInvoiceForm
},
},
//stock_in_invoice delete
//
stock_in_invoice delete
'
stockoutinvoiceview button[action=deleteOutInvoice]
'
:
{
'
stockoutinvoiceview button[action=deleteOutInvoice]
'
:
{
click
:
this
.
deleteOutInvoice
click
:
this
.
deleteOutInvoice
},
},
//stock_in_invoice approve-submit
//
stock_in_invoice approve-submit
'
stockoutinvoiceview button[action=approveOutInvoice]
'
:
{
'
stockoutinvoiceview button[action=approveOutInvoice]
'
:
{
click
:
this
.
approveOutInvoice
click
:
this
.
approveOutInvoice
},
},
//stock_in_invoice unapprove-submit
//
stock_in_invoice unapprove-submit
'
stockoutinvoiceview button[action=unapproveOutInvoice]
'
:
{
'
stockoutinvoiceview button[action=unapproveOutInvoice]
'
:
{
click
:
this
.
unapproveOutInvoice
click
:
this
.
unapproveOutInvoice
},
},
//----------------------------------------------------------------
//
----------------------------------------------------------------
'
stockoutcostview
'
:
{
'
stockoutcostview
'
:
{
afterrender
:
function
(
panel
)
{
afterrender
:
function
(
panel
)
{
outCostGrid
=
panel
.
down
(
'
grid
'
);
outCostGrid
=
panel
.
down
(
'
grid
'
);
outCostForm
=
panel
.
down
(
'
#stockOutCost_form
'
);
outCostForm
=
panel
.
down
(
'
#stockOutCost_form
'
);
//设置只能选择、检索,不能增加删除
//
设置只能选择、检索,不能增加删除
},
},
beforehide
:
this
.
updateInvoiceTotalPrice
beforehide
:
this
.
updateInvoiceTotalPrice
},
},
//stock_in_cost add system info
'
stockoutcostview button[action=confirmInvoiceHeader]
'
:
{
'
stockoutcostview button[action=addSystemInfo]
'
:
{
click
:
this
.
confirmInvoiceHeader
click
:
this
.
addSystemInfo
},
},
//stock_in_cost save
//
stock_in_cost save
'
stockoutcostview button[action=saveStockOutCost]
'
:
{
'
stockoutcostview button[action=saveStockOutCost]
'
:
{
click
:
this
.
saveStockOutCost
click
:
this
.
saveStockOutCost
},
},
//stock_in_cost delete
//
stock_in_cost delete
'
stockoutcostview button[action=deleteStockOutCost]
'
:
{
'
stockoutcostview button[action=deleteStockOutCost]
'
:
{
click
:
this
.
deleteStockOutCost
click
:
this
.
deleteStockOutCost
},
},
//
stock_in_cost choose ware
//
stock_in_cost choose ware
'
stockoutcostview button[action=chooseWare]
'
:
{
'
stockoutcostview button[action=chooseWare]
'
:
{
click
:
function
(
btn
){
click
:
function
(
btn
)
{
// 加载弹窗相关的controller
// 加载弹窗相关的controller
if
(
!
wareWindow
)
{
if
(
!
wareWindow
)
{
wareWindow
=
Ext
.
widget
(
'
warewindow
'
);
wareWindow
=
Ext
.
widget
(
'
warewindow
'
);
var
WareControllerName
=
"
drp.app.controller.resources.WareController
"
;
var
WareControllerName
=
"
drp.app.controller.resources.WareController
"
;
if
(
!
Ext
.
ClassManager
.
isCreated
(
WareControllerName
))
{
if
(
!
Ext
.
ClassManager
.
isCreated
(
WareControllerName
))
{
...
@@ -95,31 +95,31 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
...
@@ -95,31 +95,31 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
}
}
}
}
wareWindow
.
show
();
wareWindow
.
show
();
}
}
},
},
//-----------------------------------------------------------
//
-----------------------------------------------------------
'
warewindow
'
:{
'
warewindow
'
:
{
afterrender
:
function
(
panel
)
{
afterrender
:
function
(
panel
)
{
//设置只能选择、检索,不能增加删除
//
设置只能选择、检索,不能增加删除
panel
.
down
(
'
toolbar
'
).
setVisible
(
false
);
panel
.
down
(
'
toolbar
'
).
setVisible
(
false
);
}
}
},
},
'
warewindow gridpanel
'
:
{
'
warewindow gridpanel
'
:
{
itemcontextmenu
:
function
(
view
,
record
,
item
,
index
,
e
){
itemcontextmenu
:
function
(
view
,
record
,
item
,
index
,
e
)
{
// 禁用浏览器自带的右键菜单
// 禁用浏览器自带的右键菜单
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopEvent
();
e
.
stopEvent
();
var
wareName
=
record
.
data
.
name
;
var
wareName
=
record
.
data
.
name
;
Ext
.
create
(
'
Ext.menu.Menu
'
,
{
Ext
.
create
(
'
Ext.menu.Menu
'
,
{
minWidth
:
0
,
minWidth
:
0
,
width
:
62
+
(
wareName
.
length
)
*
13
,
width
:
62
+
(
wareName
.
length
)
*
13
,
items
:
[{
items
:
[{
text
:
'
选择<font color="red">
'
+
wareName
+
'
</font>
'
,
text
:
'
选择<font color="red">
'
+
wareName
+
'
</font>
'
,
icon
:
'
resources/images/icons/ok.png
'
,
icon
:
'
resources/images/icons/ok.png
'
,
listeners
:
{
listeners
:
{
click
:
function
(
item
){
click
:
function
(
item
)
{
wareWindow
.
hide
();
wareWindow
.
hide
();
var
costForm
=
outInvoiceCostWin
.
down
(
'
#stockOutCost_form
'
);
var
costForm
=
outInvoiceCostWin
.
down
(
'
#stockOutCost_form
'
);
costForm
.
down
(
'
#wareName_stockOutCost_tf
'
).
setValue
(
record
.
data
.
name
);
costForm
.
down
(
'
#wareName_stockOutCost_tf
'
).
setValue
(
record
.
data
.
name
);
...
@@ -135,18 +135,18 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
...
@@ -135,18 +135,18 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
});
});
},
},
//出库单-查询
//
出库单-查询
searchStockOutInvoice
:
function
(
btn
){
searchStockOutInvoice
:
function
(
btn
)
{
var
store
=
invoiceGrid
.
getStore
();
var
store
=
invoiceGrid
.
getStore
();
var
form
=
btn
.
up
(
"
form
"
);
var
form
=
btn
.
up
(
"
form
"
);
store
.
filters
.
clear
();
store
.
filters
.
clear
();
store
.
filter
([
{
store
.
filter
([{
property
:
"
startDate
"
,
property
:
"
startDate
"
,
value
:
Ext
.
Date
.
format
(
form
.
down
(
"
#startDate_filter
"
).
getValue
(),
'
Y-m-d
'
)
value
:
Ext
.
Date
.
format
(
form
.
down
(
"
#startDate_filter
"
).
getValue
(),
'
Y-m-d
'
)
},
{
},
{
property
:
"
endDate
"
,
property
:
"
endDate
"
,
value
:
Ext
.
Date
.
format
(
form
.
down
(
"
#endDate_filter
"
).
getValue
(),
'
Y-m-d
'
)
value
:
Ext
.
Date
.
format
(
form
.
down
(
"
#endDate_filter
"
).
getValue
(),
'
Y-m-d
'
)
},
{
},
{
property
:
"
minTotal
"
,
property
:
"
minTotal
"
,
value
:
form
.
down
(
"
#minTotal_filter
"
).
getValue
()
value
:
form
.
down
(
"
#minTotal_filter
"
).
getValue
()
...
@@ -156,7 +156,7 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
...
@@ -156,7 +156,7 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
},
{
},
{
property
:
"
wareName
"
,
property
:
"
wareName
"
,
value
:
form
.
down
(
"
#wareName_filter
"
).
getValue
()
value
:
form
.
down
(
"
#wareName_filter
"
).
getValue
()
},
{
},
{
property
:
"
receiveManName
"
,
property
:
"
receiveManName
"
,
value
:
form
.
down
(
"
#receiveManName_filter
"
).
getValue
()
value
:
form
.
down
(
"
#receiveManName_filter
"
).
getValue
()
},
{
},
{
...
@@ -168,10 +168,10 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
...
@@ -168,10 +168,10 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
},
{
},
{
property
:
"
managerName
"
,
property
:
"
managerName
"
,
value
:
form
.
down
(
"
#managerName_filter
"
).
getValue
()
value
:
form
.
down
(
"
#managerName_filter
"
).
getValue
()
}
]);
}]);
},
},
//入库商品-删除
//
入库商品-删除
deleteStockOutCost
:
function
(
btn
)
{
deleteStockOutCost
:
function
(
btn
)
{
me
.
deleteModel
(
btn
,
outCostGrid
,
"
商品条目
"
);
me
.
deleteModel
(
btn
,
outCostGrid
,
"
商品条目
"
);
var
grid
=
outCostGrid
;
var
grid
=
outCostGrid
;
...
@@ -203,17 +203,17 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
...
@@ -203,17 +203,17 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
}
}
},
},
//入库商品-提交保存
//
入库商品-提交保存
saveStockOutCost
:
function
(
btn
)
{
saveStockOutCost
:
function
(
btn
)
{
var
modelName
=
"
drp.app.model.projects.costs.StockOutCostModel
"
;
var
modelName
=
"
drp.app.model.projects.costs.StockOutCostModel
"
;
var
form
=
btn
.
up
(
"
form
"
).
getForm
();
var
form
=
btn
.
up
(
"
form
"
).
getForm
();
if
(
form
.
isValid
())
{
if
(
form
.
isValid
())
{
var
formBean
=
form
.
getValues
();
var
formBean
=
form
.
getValues
();
var
model
=
Ext
.
create
(
modelName
,
formBean
);
var
model
=
Ext
.
create
(
modelName
,
formBean
);
if
(
formBean
.
id
)
{
if
(
formBean
.
id
)
{
model
.
set
(
"
ware
"
,
null
);
model
.
set
(
"
ware
"
,
null
);
model
.
set
(
"
invoice
"
,
null
);
model
.
set
(
"
invoice
"
,
null
);
}
else
{
}
else
{
model
.
set
(
"
ware
"
,
{
model
.
set
(
"
ware
"
,
{
id
:
formBean
[
'
wareId
'
]
id
:
formBean
[
'
wareId
'
]
});
});
...
@@ -221,8 +221,8 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
...
@@ -221,8 +221,8 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
id
:
currentInvoice
.
data
.
id
id
:
currentInvoice
.
data
.
id
});
});
}
}
if
(
formBean
.
unitPrice
==
""
)
{
if
(
formBean
.
unitPrice
==
""
)
{
model
.
set
(
"
unitPrice
"
,
0
);
model
.
set
(
"
unitPrice
"
,
0
);
}
}
model
.
save
({
model
.
save
({
success
:
function
(
response
,
operation
)
{
success
:
function
(
response
,
operation
)
{
...
@@ -241,47 +241,39 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
...
@@ -241,47 +241,39 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
}
}
},
},
//出库单-新增
//
出库单-新增
showCreateOutInvoiceForm
:
function
()
{
showCreateOutInvoiceForm
:
function
()
{
if
(
!
outInvoiceCostWin
)
{
if
(
!
outInvoiceCostWin
)
{
outInvoiceCostWin
=
Ext
.
widget
(
'
stockoutcostview
'
);
outInvoiceCostWin
=
Ext
.
widget
(
'
stockoutcostview
'
);
}
}
var
store
=
outInvoiceCostWin
.
down
(
"
gridpanel
"
).
getStore
();
var
store
=
outInvoiceCostWin
.
down
(
"
gridpanel
"
).
getStore
();
//在弹出新建出库单的页面之前,需要做三部分工作:清空store、合价设置为0
//
在弹出新建出库单的页面之前,需要做三部分工作:清空store、合价设置为0
currentInvoice
=
null
;
currentInvoice
=
null
;
store
.
removeAll
(
false
);
store
.
removeAll
(
false
);
outInvoiceCostWin
.
down
(
'
#addStockOutCost_btn
'
).
setDisabled
(
true
);
outInvoiceCostWin
.
down
(
'
#addStockOutCost_btn
'
).
setDisabled
(
true
);
outInvoiceCostWin
.
down
(
'
#totalPrice_stockOutCost_df
'
).
setValue
(
0
);
outInvoiceCostWin
.
down
(
'
#totalPrice_stockOutCost_df
'
).
setValue
(
0
);
outInvoiceCostWin
.
down
(
'
#
systemInfo
_stockOutCost_form
'
).
getForm
().
reset
();
outInvoiceCostWin
.
down
(
'
#
header
_stockOutCost_form
'
).
getForm
().
reset
();
outInvoiceCostWin
.
down
(
'
#stockOutCost_form
'
).
getForm
().
reset
();
outInvoiceCostWin
.
down
(
'
#stockOutCost_form
'
).
getForm
().
reset
();
//设置bottom toolbar
var
wareKeeperName
=
outInvoiceCostWin
.
down
(
'
#wareKeeperName_df
'
);
var
materialKeeperName
=
outInvoiceCostWin
.
down
(
'
#materialKeeperName_df
'
);
var
projectManagerName
=
outInvoiceCostWin
.
down
(
'
#projectManagerName_df
'
);
wareKeeperName
.
setValue
(
""
);
materialKeeperName
.
setValue
(
""
);
projectManagerName
.
setValue
(
""
);
outInvoiceCostWin
.
setTitle
(
"
新增出库单
"
);
outInvoiceCostWin
.
setTitle
(
"
新增出库单
"
);
outInvoiceCostWin
.
show
();
outInvoiceCostWin
.
show
();
},
},
showUpdateOutInvoiceForm
:
function
(
grid
,
record
,
item
,
index
)
{
showUpdateOutInvoiceForm
:
function
(
grid
,
record
,
item
,
index
)
{
currentInvoice
=
record
;
//在弹出更新的窗口时,保存选中的invoice
currentInvoice
=
record
;
//
在弹出更新的窗口时,保存选中的invoice
var
invoiceData
=
record
.
data
;
var
invoiceData
=
record
.
data
;
var
costWin
=
null
;
var
costWin
=
null
;
//1.非材料员登陆的,只提供预览
//
1.非材料员登陆的,只提供预览
//2.若是材料员,则pass=true的和已经通过审核的,只提供预览
//
2.若是材料员,则pass=true的和已经通过审核的,只提供预览
if
(
user
.
type
!=
"
MaterialKeeper
"
||
invoiceData
.
pass
||
invoiceData
.
materialKeeperAuditState
==
"
APPROVED
"
)
{
if
(
user
.
type
!=
"
WAREKEEPER
"
)
{
if
(
!
invoiceCostWin
)
{
if
(
!
invoiceCostWin
)
{
invoiceCostWin
=
Ext
.
widget
(
'
stockoutcostshowview
'
);
invoiceCostWin
=
Ext
.
widget
(
'
stockoutcostshowview
'
);
}
}
costWin
=
invoiceCostWin
;
costWin
=
invoiceCostWin
;
invoiceCostWin
.
setTitle
(
"
查看出库单
"
);
invoiceCostWin
.
setTitle
(
"
查看出库单
"
);
}
else
{
}
else
{
if
(
!
outInvoiceCostWin
)
{
if
(
!
outInvoiceCostWin
){
outInvoiceCostWin
=
Ext
.
widget
(
'
stockoutcostview
'
);
outInvoiceCostWin
=
Ext
.
widget
(
'
stockoutcostview
'
);
}
}
costWin
=
outInvoiceCostWin
;
costWin
=
outInvoiceCostWin
;
...
@@ -289,54 +281,47 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
...
@@ -289,54 +281,47 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
costWin
.
down
(
'
#stockOutCost_form
'
).
getForm
().
reset
();
costWin
.
down
(
'
#stockOutCost_form
'
).
getForm
().
reset
();
outInvoiceCostWin
.
setTitle
(
"
更新出库单
"
);
outInvoiceCostWin
.
setTitle
(
"
更新出库单
"
);
}
}
var
store
=
costWin
.
down
(
"
gridpanel
"
).
getStore
();
var
store
=
costWin
.
down
(
"
gridpanel
"
).
getStore
();
store
.
filters
.
clear
();
store
.
filters
.
clear
();
store
.
filter
([{
store
.
filter
([{
property
:
"
invoice
"
,
property
:
"
invoice
"
,
value
:
currentInvoice
.
data
.
id
value
:
currentInvoice
.
data
.
id
}]);
}]);
costWin
.
down
(
'
#systemInfo_stockOutCost_form
'
).
loadRecord
(
record
);
costWin
.
down
(
'
#header_stockOutCost_form
'
).
loadRecord
(
record
);
//设置bottom form
// 设置bottom form
var
managerName
=
costWin
.
down
(
'
#managerName_df
'
);
var
wareKeeperName
=
costWin
.
down
(
'
#wareKeeperName_df
'
);
var
wareKeeperName
=
costWin
.
down
(
'
#wareKeeperName_df
'
);
var
materialKeeperName
=
costWin
.
down
(
'
#materialKeeperName_df
'
);
var
regulatorName
=
costWin
.
down
(
'
#regulatorName_df
'
);
var
projectManagerName
=
costWin
.
down
(
'
#projectManagerName_df
'
);
managerName
.
setValue
(
record
.
data
[
'
manager
'
]);
var
receiveMan
=
costWin
.
down
(
'
#receiveMan_df
'
);
wareKeeperName
.
setValue
(
record
.
data
[
'
wareKeeper
'
]);
regulatorName
.
setValue
(
record
.
data
[
'
regulator
'
]);
wareKeeperName
.
setValue
(
invoiceData
[
'
materialKeeperName
'
]);
materialKeeperName
.
setValue
(
invoiceData
[
'
materialKeeperName
'
]);
projectManagerName
.
setValue
(
invoiceData
[
'
projectManagerName
'
]);
receiveMan
.
setValue
(
invoiceData
[
'
receiveMan
'
]);
costWin
.
show
();
costWin
.
show
();
},
},
//出库单-删除
//
出库单-删除
deleteOutInvoice
:
function
(
btn
)
{
deleteOutInvoice
:
function
(
btn
)
{
me
.
deleteBatchModel
(
btn
,
invoiceGrid
,
"
出库单
"
,
"
/stockOutInvoice
/deleteBatch
"
);
me
.
deleteBatchModel
(
btn
,
invoiceGrid
,
"
出库单
"
,
"
/invoices/out
/deleteBatch
"
);
},
},
//出库单-更新总价
//
出库单-更新总价
updateInvoiceTotalPrice
:
function
(
panel
){
updateInvoiceTotalPrice
:
function
(
panel
)
{
panel
.
down
(
'
#chooseWare_stockOutCost_btn
'
).
setDisabled
(
true
);
panel
.
down
(
'
#chooseWare_stockOutCost_btn
'
).
setDisabled
(
true
);
var
totalPrice_stockOutCost
=
panel
.
down
(
'
#totalPrice_stockOutCost_df
'
).
getValue
();
var
totalPrice_stockOutCost
=
panel
.
down
(
'
#totalPrice_stockOutCost_df
'
).
getValue
();
if
(
!
currentInvoice
)
{
if
(
!
currentInvoice
)
{
return
;
return
;
}
}
if
(
currentInvoice
.
data
.
totalPrice
==
totalPrice_stockOutCost
)
{
if
(
currentInvoice
.
data
.
totalPrice
==
totalPrice_stockOutCost
)
{
return
;
return
;
}
}
currentInvoice
.
set
(
"
forDate
"
,
panel
.
down
(
'
#forDate_stockOutInvoice_df
'
).
getValue
());
currentInvoice
.
set
(
"
forDate
"
,
panel
.
down
(
'
#forDate_stockOutInvoice_df
'
).
getValue
());
currentInvoice
.
set
(
"
code
"
,
panel
.
down
(
'
#code_stockOutInvoice_tf
'
).
getValue
());
currentInvoice
.
set
(
"
code
"
,
panel
.
down
(
'
#code_stockOutInvoice_tf
'
).
getValue
());
currentInvoice
.
set
(
"
totalPrice
"
,
totalPrice_stockOutCost
);
currentInvoice
.
set
(
"
totalPrice
"
,
totalPrice_stockOutCost
);
currentInvoice
.
set
(
"
system
"
,
null
);
currentInvoice
.
set
(
"
materialKeeperAuditState
"
,
null
);
currentInvoice
.
set
(
"
wareKeeperAuditState
"
,
null
);
currentInvoice
.
set
(
"
projectManagerAuditState
"
,
null
);
currentInvoice
.
save
({
currentInvoice
.
save
({
success
:
function
(
response
,
operation
)
{
success
:
function
(
response
,
operation
)
{
invoiceGrid
.
getStore
().
load
();
invoiceGrid
.
getStore
().
load
();
...
@@ -347,113 +332,17 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
...
@@ -347,113 +332,17 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
});
});
},
},
approveOutInvoice
:
function
(
btn
){
confirmInvoiceHeader
:
function
(
btn
)
{
var
state
=
"
APPROVED
"
;
var
records
=
invoiceGrid
.
getSelectionModel
().
getSelection
();
var
ids
=
[];
var
index
=
0
;
for
(
var
i
=
0
,
len
=
records
.
length
;
i
<
len
;
i
++
){
var
record
=
records
[
i
].
data
;
if
(
record
.
pass
){
continue
;
}
if
(
user
.
type
==
"
MaterialKeeper
"
){
if
(
record
.
materialKeeperAuditState
!=
"
APPROVED
"
&&
record
.
costCount
>
0
){
ids
[
index
]
=
record
.
id
;
index
++
;
}
}
else
if
(
user
.
type
==
"
WareKeeper
"
){
if
(
record
.
materialKeeperAuditState
==
"
APPROVED
"
&&
record
.
wareKeeperAuditState
==
"
UNAUDITED
"
&&
record
.
projectManagerAuditState
==
"
UNAUDITED
"
){
ids
[
index
]
=
record
.
id
;
index
++
;
}
}
else
if
(
user
.
type
==
"
ProjectManager
"
){
if
(
record
.
wareKeeperAuditState
==
"
APPROVED
"
&&
record
.
projectManagerAuditState
==
"
UNAUDITED
"
){
ids
[
index
]
=
record
.
id
;
index
++
;
}
}
}
if
(
ids
.
length
==
0
){
Ext
.
Msg
.
alert
(
"
提交退回
"
,
"
该出库单已被提交或者还未添加商品
"
);
return
;
}
var
data
=
new
Object
({
invoiceIds
:
ids
,
userType
:
user
.
type
,
userId
:
user
.
id
,
state
:
state
});
Ext
.
Ajax
.
request
({
url
:
"
stockOutInvoice/updateAuditState
"
,
method
:
"
GET
"
,
params
:
{
data
:
Ext
.
encode
(
data
)
},
success
:
function
(
response
,
operation
){
var
resp
=
Ext
.
decode
(
response
.
responseText
);
Ext
.
Msg
.
alert
(
"
成功!
"
,
resp
.
message
);
invoiceGrid
.
getStore
().
load
();
},
failure
:
function
(
resp
,
operation
)
{
Ext
.
Msg
.
alert
(
"
失败!
"
,
operation
.
request
.
scope
.
reader
.
jsonData
[
"
message
"
]);
}
});
},
unapproveOutInvoice
:
function
(){
//me.submitOutInvoiceToAudit("UNAPPROVED");
var
state
=
"
UNAPPROVED
"
;
var
records
=
invoiceGrid
.
getSelectionModel
().
getSelection
();
var
ids
=
[];
for
(
var
i
=
0
,
len
=
records
.
length
;
i
<
len
;
i
++
){
ids
[
i
]
=
records
[
i
].
data
.
id
;
}
var
data
=
new
Object
({
invoiceIds
:
ids
,
userType
:
user
.
type
,
userId
:
user
.
id
,
state
:
state
});
Ext
.
Ajax
.
request
({
url
:
"
stockOutInvoice/updateAuditState
"
,
method
:
"
GET
"
,
params
:
{
data
:
Ext
.
encode
(
data
)
},
success
:
function
(
response
,
operation
){
var
resp
=
Ext
.
decode
(
response
.
responseText
);
Ext
.
Msg
.
alert
(
"
成功!
"
,
resp
.
message
);
invoiceGrid
.
getStore
().
load
();
},
failure
:
function
(
resp
,
operation
)
{
Ext
.
Msg
.
alert
(
"
失败!
"
,
operation
.
request
.
scope
.
reader
.
jsonData
[
"
message
"
]);
}
});
},
addSystemInfo
:
function
(
btn
){
var
modelName
=
"
drp.app.model.projects.invoices.StockOutInvoiceModel
"
;
var
modelName
=
"
drp.app.model.projects.invoices.StockOutInvoiceModel
"
;
var
form
=
btn
.
up
(
"
form
"
).
getForm
();
var
form
=
btn
.
up
(
"
form
"
).
getForm
();
if
(
form
.
isValid
())
{
if
(
form
.
isValid
())
{
var
formBean
=
form
.
getValues
();
var
formBean
=
form
.
getValues
();
var
model
=
Ext
.
create
(
modelName
,
formBean
);
var
model
=
Ext
.
create
(
modelName
,
formBean
);
model
.
set
(
"
system
"
,
{
id
:
formBean
[
'
system.id
'
]
});
model
.
set
(
"
materialKeeperAuditState
"
,
null
);
model
.
set
(
"
wareKeeperAuditState
"
,
null
);
model
.
set
(
"
projectManagerAuditState
"
,
null
);
model
.
save
({
model
.
save
({
success
:
function
(
response
,
operation
){
success
:
function
(
response
,
operation
)
{
invoiceGrid
.
getStore
().
load
();
invoiceGrid
.
getStore
().
load
();
var
reader
=
operation
.
request
.
scope
.
reader
;
var
reader
=
operation
.
request
.
scope
.
reader
;
currentInvoice
=
Ext
.
create
(
modelName
,{
currentInvoice
=
Ext
.
create
(
modelName
,
{
id
:
reader
.
jsonData
[
"
object
"
]
id
:
reader
.
jsonData
[
"
object
"
]
});
});
btn
.
up
(
"
form
"
).
down
(
'
#id_stockOutInvoice
'
).
setValue
(
reader
.
jsonData
[
"
object
"
]);
btn
.
up
(
"
form
"
).
down
(
'
#id_stockOutInvoice
'
).
setValue
(
reader
.
jsonData
[
"
object
"
]);
...
@@ -467,18 +356,9 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
...
@@ -467,18 +356,9 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
}
}
},
},
models
:
[
"
drp.app.model.projects.invoices.StockOutInvoiceModel
"
,
models
:
[
"
drp.app.model.projects.invoices.StockOutInvoiceModel
"
,
"
drp.app.model.projects.costs.StockOutCostModel
"
,
"
drp.app.model.resources.WareModel
"
],
"
drp.app.model.projects.costs.StockOutCostModel
"
,
stores
:
[
"
drp.app.store.projects.invoices.StockOutInvoiceStore
"
,
"
drp.app.store.projects.costs.StockOutCostStore
"
,
"
drp.app.store.resources.WareStore
"
,
"
drp.app.model.resources.WareModel
"
],
"
drp.app.store.resources.VendorStore
"
,
"
drp.app.store.users.ManagerStore
"
,
"
drp.app.store.users.WareKeeperStore
"
,
"
drp.app.store.users.RegulatorStore
"
],
stores
:
[
"
drp.app.store.projects.invoices.StockOutInvoiceStore
"
,
views
:
[
"
drp.app.view.projects.invoices.StockOutInvoiceView
"
,
"
drp.app.view.projects.costs.StockOutCostView
"
,
"
drp.app.view.projects.costs.StockOutCostShowView
"
,
"
drp.app.store.projects.costs.StockOutCostStore
"
,
"
drp.app.view.resources.WareView
"
,
"
drp.app.view.resources.WareWindow
"
,
"
drp.app.view.resources.WareViewForm
"
]
"
drp.app.store.projects.ProjectDataStore
"
,
"
drp.app.store.resources.WareStore
"
,
"
drp.app.store.resources.VendorStore
"
],
views
:
[
"
drp.app.view.projects.invoices.StockOutInvoiceView
"
,
"
drp.app.view.projects.costs.StockOutCostView
"
,
"
drp.app.view.projects.costs.StockOutCostShowView
"
,
"
drp.app.view.resources.WareView
"
,
"
drp.app.view.resources.WareWindow
"
,
"
drp.app.view.resources.WareViewForm
"
]
});
});
\ No newline at end of file
src/main/webapp/drp/app/model/projects/invoices/StockOutInvoiceModel.js
View file @
419b27f1
Ext
.
define
(
"
drp.app.model.projects.invoices.StockOutInvoiceModel
"
,
{
Ext
.
define
(
"
drp.app.model.projects.invoices.StockOutInvoiceModel
"
,
{
extend
:
"
drp.app.model.projects.invoices.AbstractInvoiceModel
"
,
extend
:
"
drp.app.model.projects.invoices.AbstractInvoiceModel
"
,
fields
:
[{
fields
:
[{
name
:
"
address
"
name
:
"
receiveAddress
"
}
],
},
{
name
:
"
receivePhone
"
}],
proxy
:
{
proxy
:
{
type
:
'
rest
'
,
type
:
'
rest
'
,
url
:
'
invoices/out
'
,
url
:
'
invoices/out
'
,
...
...
src/main/webapp/drp/app/view/projects/costs/StockInCostView.js
View file @
419b27f1
...
@@ -30,7 +30,7 @@ Ext.define('drp.app.view.projects.resources.StockInCostView', {
...
@@ -30,7 +30,7 @@ Ext.define('drp.app.view.projects.resources.StockInCostView', {
height
:
70
,
height
:
70
,
items
:
[{
items
:
[{
xtype
:
'
form
'
,
xtype
:
'
form
'
,
itemId
:
'
systemInfo
_stockInCost_form
'
,
itemId
:
'
header
_stockInCost_form
'
,
items
:
[{
items
:
[{
xtype
:
'
fieldcontainer
'
,
xtype
:
'
fieldcontainer
'
,
layout
:
'
column
'
,
layout
:
'
column
'
,
...
@@ -43,7 +43,7 @@ Ext.define('drp.app.view.projects.resources.StockInCostView', {
...
@@ -43,7 +43,7 @@ Ext.define('drp.app.view.projects.resources.StockInCostView', {
margin
:
'
5 0 0 15
'
,
margin
:
'
5 0 0 15
'
,
width
:
200
,
width
:
200
,
labelWidth
:
60
labelWidth
:
60
},
{
},
{
xtype
:
'
datefield
'
,
xtype
:
'
datefield
'
,
fieldLabel
:
'
日期<font color="red">*</font>
'
,
fieldLabel
:
'
日期<font color="red">*</font>
'
,
margin
:
'
5 0 0 15
'
,
margin
:
'
5 0 0 15
'
,
...
...
src/main/webapp/drp/app/view/projects/costs/StockOutCostShowView.js
View file @
419b27f1
...
@@ -12,7 +12,7 @@ Ext.define('drp.app.view.projects.resources.StockOutCostShowView', {
...
@@ -12,7 +12,7 @@ Ext.define('drp.app.view.projects.resources.StockOutCostShowView', {
resizable
:
false
,
resizable
:
false
,
initComponent
:
function
()
{
initComponent
:
function
()
{
var
me
=
this
;
var
me
=
this
;
Ext
.
applyIf
(
me
,
{
Ext
.
applyIf
(
me
,
{
items
:
[{
//<<<<<<<<<<<<<<<<<<<<入库单-抬头字段
items
:
[{
//<<<<<<<<<<<<<<<<<<<<入库单-抬头字段
...
@@ -22,39 +22,46 @@ Ext.define('drp.app.view.projects.resources.StockOutCostShowView', {
...
@@ -22,39 +22,46 @@ Ext.define('drp.app.view.projects.resources.StockOutCostShowView', {
height
:
40
,
height
:
40
,
items
:
[{
items
:
[{
xtype
:
'
form
'
,
xtype
:
'
form
'
,
itemId
:
'
systemInfo
_stockOutCost_form
'
,
itemId
:
'
header
_stockOutCost_form
'
,
items
:
[{
items
:
[{
xtype
:
'
fieldcontainer
'
,
xtype
:
'
fieldcontainer
'
,
layout
:
'
column
'
,
layout
:
'
column
'
,
items
:
[{
items
:
[{
xtype
:
'
displayfield
'
,
margin
:
'
5 0 0 15
'
,
labelWidth
:
30
,
name
:
'
system.projectName
'
,
width
:
200
,
fieldLabel
:
'
项目
'
},
{
xtype
:
'
displayfield
'
,
margin
:
'
5 0 0 15
'
,
labelWidth
:
30
,
name
:
'
system.name
'
,
width
:
200
,
fieldLabel
:
'
系统
'
},
{
xtype
:
'
displayfield
'
,
xtype
:
'
displayfield
'
,
fieldLabel
:
'
日期
'
,
fieldLabel
:
'
日期
'
,
margin
:
'
5 0 0 15
'
,
margin
:
'
5 0 0 15
'
,
labelWidth
:
40
,
labelWidth
:
40
,
name
:
'
forDate
'
,
name
:
'
forDate
'
,
width
:
20
0
,
width
:
15
0
,
format
:
'
Y-m-d
'
format
:
'
Y-m-d
'
},
{
},
{
xtype
:
'
displayfield
'
,
xtype
:
'
displayfield
'
,
fieldLabel
:
'
编号
'
,
fieldLabel
:
'
编号
'
,
name
:
'
code
'
,
name
:
'
code
'
,
margin
:
'
5 0 0 1
5
'
,
margin
:
'
5 0 0 1
0
'
,
width
:
100
,
width
:
100
,
labelWidth
:
40
labelWidth
:
40
},
{
xtype
:
'
displayfield
'
,
margin
:
'
5 0 0 10
'
,
labelWidth
:
60
,
name
:
'
receiveMan
'
,
width
:
200
,
fieldLabel
:
'
购货单位
'
},
{
xtype
:
'
displayfield
'
,
margin
:
'
5 0 0 10
'
,
labelWidth
:
30
,
name
:
'
receiveAddress
'
,
width
:
180
,
fieldLabel
:
'
地址
'
},
{
xtype
:
'
displayfield
'
,
margin
:
'
5 0 0 10
'
,
labelWidth
:
30
,
name
:
'
receivePhone
'
,
width
:
120
,
fieldLabel
:
'
电话
'
}]
}]
}]
}]
}]
}]
...
@@ -108,26 +115,20 @@ Ext.define('drp.app.view.projects.resources.StockOutCostShowView', {
...
@@ -108,26 +115,20 @@ Ext.define('drp.app.view.projects.resources.StockOutCostShowView', {
flex
:
1
,
flex
:
1
,
margin
:
'
0 0 0 30
'
,
margin
:
'
0 0 0 30
'
,
labelWidth
:
50
,
labelWidth
:
50
,
itemId
:
'
wareKeep
erName_df
'
,
itemId
:
'
manag
erName_df
'
,
fieldLabel
:
'
库管员
'
fieldLabel
:
'
负责人
'
},
{
},
{
xtype
:
'
displayfield
'
,
xtype
:
'
displayfield
'
,
flex
:
1
,
flex
:
1
,
labelWidth
:
50
,
labelWidth
:
50
,
itemId
:
'
materialKeeperName_df
'
,
itemId
:
'
wareKeeperName_df
'
,
fieldLabel
:
'
材料员
'
fieldLabel
:
'
库管员
'
},
{
xtype
:
'
displayfield
'
,
flex
:
1
,
labelWidth
:
60
,
itemId
:
'
projectManagerName_df
'
,
fieldLabel
:
'
项目经理
'
},
{
},
{
xtype
:
'
displayfield
'
,
xtype
:
'
displayfield
'
,
flex
:
1
,
flex
:
1
,
labelWidth
:
60
,
labelWidth
:
60
,
itemId
:
'
re
ceiveMan
_df
'
,
itemId
:
'
re
gulatorName
_df
'
,
fieldLabel
:
'
领物
人
'
fieldLabel
:
'
经手
人
'
}]
}]
}]
}]
});
});
...
...
src/main/webapp/drp/app/view/projects/costs/StockOutCostView.js
View file @
419b27f1
...
@@ -12,7 +12,7 @@ Ext.define('drp.app.view.projects.costs.StockOutCostView', {
...
@@ -12,7 +12,7 @@ Ext.define('drp.app.view.projects.costs.StockOutCostView', {
resizable
:
false
,
resizable
:
false
,
initComponent
:
function
()
{
initComponent
:
function
()
{
var
me
=
this
;
var
me
=
this
;
var
selModel
=
Ext
.
create
(
'
Ext.selection.CheckboxModel
'
,
{
var
selModel
=
Ext
.
create
(
'
Ext.selection.CheckboxModel
'
,
{
listeners
:
{
listeners
:
{
selectionchange
:
function
(
sm
,
selections
)
{
selectionchange
:
function
(
sm
,
selections
)
{
...
@@ -27,10 +27,10 @@ Ext.define('drp.app.view.projects.costs.StockOutCostView', {
...
@@ -27,10 +27,10 @@ Ext.define('drp.app.view.projects.costs.StockOutCostView', {
xtype
:
'
panel
'
,
xtype
:
'
panel
'
,
region
:
'
north
'
,
region
:
'
north
'
,
layout
:
'
fit
'
,
layout
:
'
fit
'
,
height
:
7
0
,
height
:
10
0
,
items
:
[{
items
:
[{
xtype
:
'
form
'
,
xtype
:
'
form
'
,
itemId
:
'
systemInfo
_stockOutCost_form
'
,
itemId
:
'
header
_stockOutCost_form
'
,
items
:
[{
items
:
[{
xtype
:
'
fieldcontainer
'
,
xtype
:
'
fieldcontainer
'
,
layout
:
'
column
'
,
layout
:
'
column
'
,
...
@@ -40,90 +40,6 @@ Ext.define('drp.app.view.projects.costs.StockOutCostView', {
...
@@ -40,90 +40,6 @@ Ext.define('drp.app.view.projects.costs.StockOutCostView', {
hidden
:
true
,
hidden
:
true
,
name
:
'
id
'
name
:
'
id
'
},
{
},
{
xtype
:
'
combobox
'
,
margin
:
'
5 0 0 15
'
,
labelWidth
:
60
,
itemId
:
'
project_stockOutInvoice_cb
'
,
name
:
'
system.projectName
'
,
editable
:
false
,
allowBlank
:
false
,
width
:
300
,
displayField
:
"
name
"
,
valueField
:
"
id
"
,
fieldLabel
:
'
项目<font color="red">*</font>
'
,
store
:
'
drp.app.store.projects.ProjectDataStore
'
,
listeners
:
{
afterrender
:
function
(
combo
){
//显示人员所属项目
var
store
=
combo
.
getStore
();
store
.
filters
.
clear
();
if
(
user
.
type
!=
"
Leader
"
){
Ext
.
apply
(
store
.
proxy
.
extraParams
,
{
userType
:
user
.
type
,
userId
:
user
.
id
});
store
.
load
();
}
},
select
:
function
(
combo
,
records
){
var
project
=
records
[
0
].
data
;
var
stockoutcostview
=
combo
.
up
(
"
stockoutcostview
"
);
//设置该项目下的人员
stockoutcostview
.
down
(
"
#materialKeeperName_df
"
).
setValue
(
project
.
materialKeeper
.
name
);
stockoutcostview
.
down
(
"
#wareKeeperName_df
"
).
setValue
(
project
.
wareKeeper
.
name
);
stockoutcostview
.
down
(
"
#projectManagerName_df
"
).
setValue
(
project
.
projectManager
.
name
);
//根据项目动态加载下属系统
var
_url
=
"
project/
"
+
project
.
id
;
var
system
=
stockoutcostview
.
down
(
"
#systemName_stockOutInvoice_cb
"
);
system
.
getStore
().
getProxy
().
url
=
_url
;
system
.
setValue
(
""
);
system
.
setDisabled
(
false
);
system
.
getStore
().
reload
();
}
}
},
{
xtype
:
'
combobox
'
,
margin
:
'
5 0 0 30
'
,
labelWidth
:
60
,
itemId
:
'
systemName_stockOutInvoice_cb
'
,
name
:
'
system.name
'
,
allowBlank
:
false
,
editable
:
false
,
disabled
:
true
,
width
:
300
,
fieldLabel
:
'
系统<font color="red">*</font>
'
,
valueField
:
'
id
'
,
displayField
:
'
name
'
,
fieldLabel
:
'
系统名称<font color="red">*</font>
'
,
store
:
Ext
.
create
(
'
Ext.data.Store
'
,
{
fields
:
[
'
id
'
,
'
name
'
],
proxy
:
{
type
:
'
ajax
'
,
reader
:
{
type
:
"
json
"
,
root
:
"
data
"
,
successProperty
:
'
success
'
},
writer
:
{
type
:
"
json
"
}
}
}),
listeners
:
{
select
:
function
(
combo
){
combo
.
up
(
'
form
'
).
down
(
'
#systemId_stockOutInvoice_tf
'
).
setValue
(
combo
.
getSubmitValue
());
}
}
},
{
xtype
:
'
textfield
'
,
hidden
:
true
,
itemId
:
'
systemId_stockOutInvoice_tf
'
,
name
:
'
system.id
'
}]
},
{
xtype
:
'
fieldcontainer
'
,
layout
:
'
column
'
,
items
:
[
{
xtype
:
'
datefield
'
,
xtype
:
'
datefield
'
,
fieldLabel
:
'
日期<font color="red">*</font>
'
,
fieldLabel
:
'
日期<font color="red">*</font>
'
,
margin
:
'
5 0 0 15
'
,
margin
:
'
5 0 0 15
'
,
...
@@ -131,35 +47,97 @@ Ext.define('drp.app.view.projects.costs.StockOutCostView', {
...
@@ -131,35 +47,97 @@ Ext.define('drp.app.view.projects.costs.StockOutCostView', {
itemId
:
'
forDate_stockOutInvoice_df
'
,
itemId
:
'
forDate_stockOutInvoice_df
'
,
name
:
'
forDate
'
,
name
:
'
forDate
'
,
editable
:
false
,
editable
:
false
,
allowBlank
:
false
,
width
:
200
,
width
:
200
,
format
:
'
Y-m-d
'
format
:
'
Y-m-d
'
,
listeners
:
{
afterrender
:
function
(
df
)
{
if
(
df
.
getValue
()
==
null
)
{
df
.
setValue
(
new
Date
());
}
}
}
},
{
},
{
xtype
:
'
textfield
'
,
xtype
:
'
textfield
'
,
fieldLabel
:
'
编号
<font color="red">*</font>
'
,
fieldLabel
:
'
编号
'
,
itemId
:
'
code_stockOutInvoice_tf
'
,
itemId
:
'
code_stockOutInvoice_tf
'
,
name
:
'
code
'
,
name
:
'
code
'
,
margin
:
'
5 0 0 15
'
,
margin
:
'
5 0 0 15
'
,
width
:
200
,
width
:
200
,
labelWidth
:
60
labelWidth
:
60
},
{
}]
},
{
xtype
:
'
fieldcontainer
'
,
layout
:
'
column
'
,
items
:
[{
xtype
:
'
textfield
'
,
xtype
:
'
textfield
'
,
fieldLabel
:
'
领物人
<font color="red">*</font>
'
,
fieldLabel
:
'
收货单位
<font color="red">*</font>
'
,
itemId
:
'
receiveMan_stockOutInvoice_tf
'
,
itemId
:
'
receiveMan_stockOutInvoice_tf
'
,
allowBlank
:
false
,
name
:
'
receiveMan
'
,
name
:
'
receiveMan
'
,
margin
:
'
5 0 0 15
'
,
margin
:
'
5 0 0 15
'
,
width
:
200
,
width
:
200
,
labelWidth
:
60
},
{
xtype
:
'
textfield
'
,
fieldLabel
:
'
地址<font color="red">*</font>
'
,
itemId
:
'
receiveAddress_stockOutInvoice_tf
'
,
allowBlank
:
false
,
name
:
'
address
'
,
margin
:
'
5 0 0 15
'
,
width
:
200
,
labelWidth
:
60
},
{
xtype
:
'
textfield
'
,
fieldLabel
:
'
电话
'
,
itemId
:
'
receivePhone_stockOutInvoice_tf
'
,
name
:
'
phone
'
,
margin
:
'
5 0 0 15
'
,
width
:
200
,
labelWidth
:
60
}]
},
{
xtype
:
'
fieldcontainer
'
,
layout
:
'
column
'
,
items
:
[{
xtype
:
'
combobox
'
,
width
:
200
,
labelWidth
:
60
,
labelWidth
:
60
,
listeners
:
{
margin
:
'
5 0 0 15
'
,
change
:
function
(
tf
){
name
:
'
manager
'
,
tf
.
up
(
'
stockoutcostview
'
).
down
(
'
#receiveMan_df
'
).
setValue
(
tf
.
getValue
());
valueField
:
'
name
'
,
}
displayField
:
'
name
'
,
}
allowBlank
:
false
,
store
:
'
drp.app.store.users.ManagerStore
'
,
fieldLabel
:
'
负责人<font color="red">*</font>
'
},
{
xtype
:
'
combobox
'
,
width
:
200
,
labelWidth
:
60
,
margin
:
'
5 0 0 15
'
,
name
:
'
wareKeeper
'
,
valueField
:
'
name
'
,
displayField
:
'
name
'
,
allowBlank
:
false
,
store
:
'
drp.app.store.users.WareKeeperStore
'
,
fieldLabel
:
'
库管员<font color="red">*</font>
'
},
{
xtype
:
'
combobox
'
,
width
:
200
,
labelWidth
:
60
,
margin
:
'
5 0 0 15
'
,
name
:
'
regulator
'
,
valueField
:
'
name
'
,
displayField
:
'
name
'
,
allowBlank
:
false
,
store
:
'
drp.app.store.users.RegulatorStore
'
,
fieldLabel
:
'
经手人
'
},
{
},
{
xtype
:
'
button
'
,
xtype
:
'
button
'
,
margin
:
'
5 0 0 25
'
,
margin
:
'
5 0 0 25
'
,
action
:
'
addSystemInfo
'
,
action
:
'
confirmInvoiceHeader
'
,
icon
:
'
resources/images/icons/ok.png
'
,
icon
:
'
resources/images/icons/ok.png
'
,
text
:
'
确认
所属系统
'
text
:
'
确认
单据头
'
}]
}]
}]
}]
}]
}]
...
@@ -383,41 +361,8 @@ Ext.define('drp.app.view.projects.costs.StockOutCostView', {
...
@@ -383,41 +361,8 @@ Ext.define('drp.app.view.projects.costs.StockOutCostView', {
}]
}]
}]
}]
}]
}]
}],
dockedItems
:
[{
//<<<<<<<<<<<<<<<<<<<<<<<<出库单-汇总人员信息
xtype
:
'
toolbar
'
,
dock
:
'
bottom
'
,
ui
:
'
footer
'
,
items
:
[{
xtype
:
'
displayfield
'
,
flex
:
1
,
margin
:
'
0 0 0 30
'
,
labelWidth
:
50
,
itemId
:
'
wareKeeperName_df
'
,
fieldLabel
:
'
库管员
'
},
{
xtype
:
'
displayfield
'
,
flex
:
1
,
labelWidth
:
50
,
itemId
:
'
materialKeeperName_df
'
,
fieldLabel
:
'
材料员
'
},
{
xtype
:
'
displayfield
'
,
flex
:
1
,
labelWidth
:
60
,
itemId
:
'
projectManagerName_df
'
,
fieldLabel
:
'
项目经理
'
},
{
xtype
:
'
displayfield
'
,
flex
:
1
,
labelWidth
:
60
,
itemId
:
'
receiveMan_df
'
,
fieldLabel
:
'
领物人
'
}]
}]
}]
});
});
me
.
callParent
(
arguments
);
me
.
callParent
(
arguments
);
}
}
});
});
\ No newline at end of file
src/main/webapp/drp/app/view/projects/invoices/StockInInvoiceView.js
View file @
419b27f1
...
@@ -50,6 +50,12 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', {
...
@@ -50,6 +50,12 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', {
fieldLabel
:
'
结束日期
'
,
fieldLabel
:
'
结束日期
'
,
editable
:
false
,
editable
:
false
,
format
:
'
Y-m-d
'
format
:
'
Y-m-d
'
},
{
xtype
:
'
textfield
'
,
margin
:
'
5 0 0 20
'
,
labelWidth
:
60
,
itemId
:
'
receiveManName_filter
'
,
fieldLabel
:
'
领物人
'
}]
}]
},
{
},
{
xtype
:
'
fieldcontainer
'
,
xtype
:
'
fieldcontainer
'
,
...
@@ -80,8 +86,8 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', {
...
@@ -80,8 +86,8 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', {
xtype
:
'
textfield
'
,
xtype
:
'
textfield
'
,
margin
:
'
5 0 0 10
'
,
margin
:
'
5 0 0 10
'
,
labelWidth
:
60
,
labelWidth
:
60
,
itemId
:
'
regulato
rName_filter
'
,
itemId
:
'
manage
rName_filter
'
,
fieldLabel
:
'
经手
人
'
fieldLabel
:
'
负责
人
'
},
{
},
{
xtype
:
'
textfield
'
,
xtype
:
'
textfield
'
,
margin
:
'
5 0 0 20
'
,
margin
:
'
5 0 0 20
'
,
...
@@ -92,8 +98,8 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', {
...
@@ -92,8 +98,8 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', {
xtype
:
'
textfield
'
,
xtype
:
'
textfield
'
,
margin
:
'
5 0 0 20
'
,
margin
:
'
5 0 0 20
'
,
labelWidth
:
60
,
labelWidth
:
60
,
itemId
:
'
manage
rName_filter
'
,
itemId
:
'
regulato
rName_filter
'
,
fieldLabel
:
'
负责
人
'
fieldLabel
:
'
经手
人
'
},
{
},
{
xtype
:
'
button
'
,
xtype
:
'
button
'
,
margin
:
'
5 0 0 25
'
,
margin
:
'
5 0 0 25
'
,
...
...
src/main/webapp/drp/app/view/projects/invoices/StockOutInvoiceView.js
View file @
419b27f1
...
@@ -51,6 +51,12 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
...
@@ -51,6 +51,12 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
fieldLabel
:
'
结束日期
'
,
fieldLabel
:
'
结束日期
'
,
editable
:
false
,
editable
:
false
,
format
:
'
Y-m-d
'
format
:
'
Y-m-d
'
},
{
xtype
:
'
textfield
'
,
margin
:
'
5 0 0 20
'
,
labelWidth
:
60
,
itemId
:
'
receiveManName_filter
'
,
fieldLabel
:
'
购货单位
'
}]
}]
},
{
},
{
xtype
:
'
fieldcontainer
'
,
xtype
:
'
fieldcontainer
'
,
...
@@ -73,12 +79,6 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
...
@@ -73,12 +79,6 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
labelWidth
:
60
,
labelWidth
:
60
,
itemId
:
'
wareName_filter
'
,
itemId
:
'
wareName_filter
'
,
fieldLabel
:
'
产品名称
'
fieldLabel
:
'
产品名称
'
},
{
xtype
:
'
textfield
'
,
margin
:
'
5 0 0 20
'
,
labelWidth
:
60
,
itemId
:
'
receiveManName_filter
'
,
fieldLabel
:
'
领物人
'
}]
}]
},
{
},
{
xtype
:
'
fieldcontainer
'
,
xtype
:
'
fieldcontainer
'
,
...
@@ -87,8 +87,8 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
...
@@ -87,8 +87,8 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
xtype
:
'
textfield
'
,
xtype
:
'
textfield
'
,
margin
:
'
5 0 0 10
'
,
margin
:
'
5 0 0 10
'
,
labelWidth
:
60
,
labelWidth
:
60
,
itemId
:
'
regulato
rName_filter
'
,
itemId
:
'
manage
rName_filter
'
,
fieldLabel
:
'
材料员
'
fieldLabel
:
'
负责人
'
},
{
},
{
xtype
:
'
textfield
'
,
xtype
:
'
textfield
'
,
margin
:
'
5 0 0 20
'
,
margin
:
'
5 0 0 20
'
,
...
@@ -99,8 +99,8 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
...
@@ -99,8 +99,8 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
xtype
:
'
textfield
'
,
xtype
:
'
textfield
'
,
margin
:
'
5 0 0 20
'
,
margin
:
'
5 0 0 20
'
,
labelWidth
:
60
,
labelWidth
:
60
,
itemId
:
'
manage
rName_filter
'
,
itemId
:
'
regulato
rName_filter
'
,
fieldLabel
:
'
项目经理
'
fieldLabel
:
'
经手人
'
},
{
},
{
xtype
:
'
button
'
,
xtype
:
'
button
'
,
margin
:
'
5 0 0 25
'
,
margin
:
'
5 0 0 25
'
,
...
@@ -139,14 +139,14 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
...
@@ -139,14 +139,14 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
dataIndex
:
'
code
'
dataIndex
:
'
code
'
},
{
},
{
xtype
:
'
gridcolumn
'
,
xtype
:
'
gridcolumn
'
,
dataIndex
:
'
system.projectName
'
,
dataIndex
:
'
receiveMan
'
,
flex
:
2
,
flex
:
2
,
text
:
'
项目名称
'
text
:
'
购货单位
'
},
{
},
{
xtype
:
'
gridcolumn
'
,
xtype
:
'
gridcolumn
'
,
dataIndex
:
'
system.name
'
,
dataIndex
:
'
address
'
,
flex
:
2
,
flex
:
2
,
text
:
'
系统名称
'
text
:
'
地址
'
},
{
},
{
xtype
:
'
gridcolumn
'
,
xtype
:
'
gridcolumn
'
,
dataIndex
:
'
totalPrice
'
,
dataIndex
:
'
totalPrice
'
,
...
@@ -154,36 +154,19 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
...
@@ -154,36 +154,19 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
text
:
'
合价
'
text
:
'
合价
'
},
{
},
{
xtype
:
'
gridcolumn
'
,
xtype
:
'
gridcolumn
'
,
dataIndex
:
'
ma
terialKeeperName
'
,
dataIndex
:
'
ma
nager
'
,
flex
:
2
,
flex
:
2
,
text
:
'
材料员
'
,
text
:
'
负责人
'
renderer
:
function
(
value
,
metadata
,
record
)
{
var
materialKeeperAuditState
=
record
.
data
.
materialKeeperAuditState
;
return
me
.
displyAuditState
(
value
,
materialKeeperAuditState
);
}
},
{
},
{
xtype
:
'
gridcolumn
'
,
xtype
:
'
gridcolumn
'
,
dataIndex
:
'
wareKeeper
Name
'
,
dataIndex
:
'
wareKeeper
'
,
flex
:
2
,
flex
:
2
,
text
:
'
库管员
'
,
text
:
'
库管员
'
renderer
:
function
(
value
,
metadata
,
record
)
{
var
wareKeeperAuditState
=
record
.
data
.
wareKeeperAuditState
;
return
me
.
displyAuditState
(
value
,
wareKeeperAuditState
);
}
},
{
},
{
xtype
:
'
gridcolumn
'
,
xtype
:
'
gridcolumn
'
,
dataIndex
:
'
projectManagerName
'
,
dataIndex
:
'
regulatorName
'
,
flex
:
2
,
text
:
'
项目经理
'
,
renderer
:
function
(
value
,
metadata
,
record
)
{
var
projectManagerAuditState
=
record
.
data
.
projectManagerAuditState
;
return
me
.
displyAuditState
(
value
,
projectManagerAuditState
);
}
},
{
xtype
:
'
gridcolumn
'
,
dataIndex
:
'
receiveMan
'
,
flex
:
2
,
flex
:
2
,
text
:
'
领物
人
'
text
:
'
经手
人
'
}],
}],
dockedItems
:
[{
dockedItems
:
[{
xtype
:
'
pagingtoolbar
'
,
xtype
:
'
pagingtoolbar
'
,
...
...
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