Commit 293ad776 authored by reedmi's avatar reedmi

初步完成入库单

parent bf805bbe
...@@ -3,8 +3,6 @@ package com.originspark.drp.controllers.projects.costs; ...@@ -3,8 +3,6 @@ package com.originspark.drp.controllers.projects.costs;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -18,7 +16,6 @@ import com.originspark.drp.controllers.BaseController; ...@@ -18,7 +16,6 @@ import com.originspark.drp.controllers.BaseController;
import com.originspark.drp.models.projects.costs.StockInCost; import com.originspark.drp.models.projects.costs.StockInCost;
import com.originspark.drp.models.projects.invoices.StockInInvoice; import com.originspark.drp.models.projects.invoices.StockInInvoice;
import com.originspark.drp.service.projects.costs.StockInCostService; 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.FilterRequest;
import com.originspark.drp.util.json.JsonUtils; import com.originspark.drp.util.json.JsonUtils;
...@@ -31,7 +28,7 @@ public class StockInCostController extends BaseController{ ...@@ -31,7 +28,7 @@ public class StockInCostController extends BaseController{
@RequestMapping(method = RequestMethod.POST) @RequestMapping(method = RequestMethod.POST)
@ResponseBody @ResponseBody
public String create(@RequestBody StockInCost stockInCost,HttpServletRequest request) { public String create(@RequestBody StockInCost stockInCost) {
StockInInvoice invoiceUI = stockInCost.getInvoice(); StockInInvoice invoiceUI = stockInCost.getInvoice();
if(invoiceUI == null){ if(invoiceUI == null){
...@@ -51,14 +48,14 @@ public class StockInCostController extends BaseController{ ...@@ -51,14 +48,14 @@ public class StockInCostController extends BaseController{
break; break;
} }
} }
if(have) {
if(have){
return failure("抱歉,不能重复添加商品"); return failure("抱歉,不能重复添加商品");
} }
stockInCost.setCreatedBy(SessionUtil.getCurrentUserName(request)); stockInCost.setCreatedBy(getCurrentUser().getName());
stockInCost.setForDate(invoice.getForDate());
service.save(stockInCost); service.save(stockInCost);
return ok("创建成功"); return ok("创建成功");
} }
...@@ -72,19 +69,18 @@ public class StockInCostController extends BaseController{ ...@@ -72,19 +69,18 @@ public class StockInCostController extends BaseController{
@RequestMapping(value = "/{id}", method = RequestMethod.PUT) @RequestMapping(value = "/{id}", method = RequestMethod.PUT)
@ResponseBody @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); StockInCost existingStockInCost = service.findById(StockInCost.class, id);
if (existingStockInCost == null) { if (existingStockInCost == null) {
return failure("您要更新的商品不存在"); return failure("您要更新的记录不存在");
} }
existingStockInCost.setUnitPrice(stockInCost.getUnitPrice()); existingStockInCost.setUnitPrice(stockInCost.getUnitPrice());
existingStockInCost.setQuantity(stockInCost.getQuantity()); existingStockInCost.setQuantity(stockInCost.getQuantity());
existingStockInCost.setUpdatedBy(getCurrentUser().getName());
existingStockInCost.setUpdatedBy(SessionUtil.getCurrentUserName(request));
service.update(existingStockInCost); service.update(existingStockInCost);
return ok("更新成功"); return ok("更新成功");
} }
......
...@@ -16,71 +16,43 @@ import org.springframework.web.bind.annotation.ResponseBody; ...@@ -16,71 +16,43 @@ 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.StockInInvoice; 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.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("stockInInvoice") @RequestMapping("invoices/in")
public class StockInInvoiceController extends AbstractInvoiceController { public class StockInInvoiceController extends AbstractInvoiceController {
private Logger logger = Logger.getLogger(StockInInvoiceController.class); private Logger logger = Logger.getLogger(StockInInvoiceController.class);
/*@RequestMapping(method = RequestMethod.POST) @RequestMapping(method = RequestMethod.POST)
@ResponseBody @ResponseBody
public String create(@RequestBody StockInInvoice invoice,HttpServletRequest request) { public String create(@RequestBody StockInInvoice invoice) {
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);
invoice.setCreatedBy(getCurrentUser().getName());
StockInInvoice savedInvoice = stockInInvoiceService.save(invoice); StockInInvoice savedInvoice = stockInInvoiceService.save(invoice);
logger.info(">添加成功:"+savedInvoice.toString());
return ok("系统确认成功",savedInvoice.getId()); return ok("信息确认成功", savedInvoice.getId());
} }
@RequestMapping(value = "/{id}", method = RequestMethod.PUT) @RequestMapping(value = "/{id}", method = RequestMethod.PUT)
@ResponseBody @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); StockInInvoice existingInvoice = stockInInvoiceService.findById(StockInInvoice.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));
stockInInvoiceService.update(existingInvoice); stockInInvoiceService.update(existingInvoice);
return ok("更新成功",existingInvoice.getId());
}*/ return ok("更新成功", existingInvoice.getId());
}
@RequestMapping(method = RequestMethod.GET) @RequestMapping(method = RequestMethod.GET)
@ResponseBody @ResponseBody
...@@ -100,8 +72,8 @@ public class StockInInvoiceController extends AbstractInvoiceController { ...@@ -100,8 +72,8 @@ public class StockInInvoiceController extends AbstractInvoiceController {
@RequestMapping(value = "/deleteBatch", method = RequestMethod.GET) @RequestMapping(value = "/deleteBatch", method = RequestMethod.GET)
@ResponseBody @ResponseBody
public String deleteBatch(HttpServletRequest request) { public String deleteBatch() {
String data = request.getParameter("data"); String data = request().getParameter("data");
ObjectMapper mapper = new ObjectMapper(); ObjectMapper mapper = new ObjectMapper();
IdsJson json = null; IdsJson json = null;
...@@ -130,46 +102,4 @@ public class StockInInvoiceController extends AbstractInvoiceController { ...@@ -130,46 +102,4 @@ public class StockInInvoiceController extends AbstractInvoiceController {
return ok("删除成功(注释:部分合价不为0的入库单已忽略)"); 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("提交成功");
}*/
} }
...@@ -56,6 +56,11 @@ public abstract class AbstractInvoice extends AbstractModel{ ...@@ -56,6 +56,11 @@ public abstract class AbstractInvoice extends AbstractModel{
*/ */
private String regulator; private String regulator;
/**
* 领用人
*/
private String receiveMan;
public static enum COLUMNS { public static enum COLUMNS {
STARTDATE,ENDDATE,CODE, STARTDATE,ENDDATE,CODE,
MINTOTAL,MAXTOTAL,PROJECT,SYSTEM, MINTOTAL,MAXTOTAL,PROJECT,SYSTEM,
...@@ -122,6 +127,14 @@ public abstract class AbstractInvoice extends AbstractModel{ ...@@ -122,6 +127,14 @@ public abstract class AbstractInvoice extends AbstractModel{
this.totalPrice = totalPrice; this.totalPrice = totalPrice;
} }
public String getReceiveMan() {
return receiveMan;
}
public void setReceiveMan(String receiveMan) {
this.receiveMan = receiveMan;
}
@Override @Override
public String toString() { public String toString() {
return super.toString()+", code="+code+", forDate="+forDate+", totalPrice="+totalPrice; return super.toString()+", code="+code+", forDate="+forDate+", totalPrice="+totalPrice;
......
...@@ -25,9 +25,9 @@ public class StockOutInvoice extends AbstractInvoice{ ...@@ -25,9 +25,9 @@ public class StockOutInvoice extends AbstractInvoice{
private List<StockOutCost> costs; private List<StockOutCost> costs;
/** /**
* 领用人 * 联系地址
*/ */
private String receiveMan; private String address;
public List<StockOutCost> getCosts() { public List<StockOutCost> getCosts() {
return costs; return costs;
...@@ -37,20 +37,15 @@ public class StockOutInvoice extends AbstractInvoice{ ...@@ -37,20 +37,15 @@ public class StockOutInvoice extends AbstractInvoice{
this.costs = costs; this.costs = costs;
} }
public String getReceiveMan() { public String getAddress() {
return receiveMan; return address;
} }
public void setReceiveMan(String receiveMan) { public void setAddress(String address) {
this.receiveMan = receiveMan; this.address = address;
} }
public int getCostCount(){ public int getCostCount(){
return getCosts().size(); return getCosts().size();
} }
@Override
public String toString() {
return "StockInInvoice(出库单) => ["+super.toString()+", receiveMan="+receiveMan+"]";
}
} }
/** /**
* @author Yestin * @author ReedMi
*/ */
Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", { Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
extend : "drp.app.controller.AbstractController", extend : "drp.app.controller.AbstractController",
...@@ -24,20 +24,12 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", { ...@@ -24,20 +24,12 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
currentInvoice = null; currentInvoice = null;
wareWindow= false; wareWindow= false;
invoiceGrid = panel.down('gridpanel'); invoiceGrid = panel.down('gridpanel');
// //只有材料员可以新建删除出库单 invoiceGrid.getStore().load();
// if(user.type != "MaterialKeeper"){
// invoiceGrid.down('#addInInvoice_btn').setVisible(false);
// invoiceGrid.down('#deleteInInvoice_btn').setVisible(false);
// }
// if(user.type == "Leader"){
// invoiceGrid.down('#operationInInvoice_tb').setVisible(false);
// }
} }
}, },
//stock_in_invoice filter //stock_in_invoice filter
'stockininvoiceview > gridpanel' : { 'stockininvoiceview > gridpanel' : {
afterrender : this.buildFiltersByLoginUser,
itemdblclick : this.showUpdateInInvoiceForm itemdblclick : this.showUpdateInInvoiceForm
}, },
...@@ -56,16 +48,6 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", { ...@@ -56,16 +48,6 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
click : this.deleteInInvoice click : this.deleteInInvoice
}, },
//stock_in_invoice approve-submit
'stockininvoiceview button[action=approveInInvoice]' : {
click : this.approveInInvoice
},
//stock_in_invoice unapprove-submit
'stockininvoiceview button[action=unapproveInInvoice]' : {
click : this.unapproveInInvoice
},
//---------------------------------------------------------------- //----------------------------------------------------------------
'stockincostview' : { 'stockincostview' : {
afterrender : function(panel) { afterrender : function(panel) {
...@@ -75,9 +57,9 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", { ...@@ -75,9 +57,9 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
beforehide : this.updateInvoiceTotalPrice beforehide : this.updateInvoiceTotalPrice
}, },
//stock_in_cost add system info //确认单据头信息
'stockincostview button[action=addSystemInfo]' : { 'stockincostview button[action=confirmInvoiceHeader]' : {
click : this.addSystemInfo click : this.confirmInvoiceHeader
}, },
//stock_in_cost save //stock_in_cost save
...@@ -150,12 +132,6 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", { ...@@ -150,12 +132,6 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
}, { }, {
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 : "project",
value : form.down("#projectName_filter").getValue()
}, {
property : "system",
value : form.down("#systemName_filter").getValue()
}, { }, {
property : "minTotal", property : "minTotal",
value : form.down("#minTotal_filter").getValue() value : form.down("#minTotal_filter").getValue()
...@@ -166,50 +142,17 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", { ...@@ -166,50 +142,17 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
property : "wareName", property : "wareName",
value : form.down("#wareName_filter").getValue() value : form.down("#wareName_filter").getValue()
}, { }, {
property : "materialKeeperName", property : "regulatorName",
value : form.down("#materialKeeperName_filter").getValue() value : form.down("#regulatorName_filter").getValue()
}, { }, {
property : "wareKeeperName", property : "wareKeeperName",
value : form.down("#wareKeeperName_filter").getValue() value : form.down("#wareKeeperName_filter").getValue()
}, { }, {
property : "projectManagerName", property : "managerName",
value : form.down("#projetManagerName_filter").getValue() value : form.down("#managerName_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);
},
//入库商品-删除 //入库商品-删除
deleteStockInCost : function(btn) { deleteStockInCost : function(btn) {
inInvoiceController.deleteModel(btn, inCostGrid, "商品条目"); inInvoiceController.deleteModel(btn, inCostGrid, "商品条目");
...@@ -293,13 +236,6 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", { ...@@ -293,13 +236,6 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
inInvoiceCostWin.down('#totalPrice_stockInCost_df').setValue(0); inInvoiceCostWin.down('#totalPrice_stockInCost_df').setValue(0);
inInvoiceCostWin.down('#systemInfo_stockInCost_form').getForm().reset(); inInvoiceCostWin.down('#systemInfo_stockInCost_form').getForm().reset();
inInvoiceCostWin.down('#stockInCost_form').getForm().reset(); inInvoiceCostWin.down('#stockInCost_form').getForm().reset();
//设置bottom toolbar
var wareKeeperName = inInvoiceCostWin.down('#wareKeeperName_df');
var materialKeeperName = inInvoiceCostWin.down('#materialKeeperName_df');
var projectManagerName = inInvoiceCostWin.down('#projectManagerName_df');
wareKeeperName.setValue("");
materialKeeperName.setValue("");
projectManagerName.setValue("");
inInvoiceCostWin.setTitle("新增入库单"); inInvoiceCostWin.setTitle("新增入库单");
inInvoiceCostWin.show(); inInvoiceCostWin.show();
...@@ -312,14 +248,14 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", { ...@@ -312,14 +248,14 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
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('stockincostshowview'); invoiceCostWin = Ext.widget('stockincostshowview');
} }
costWin = invoiceCostWin; costWin = invoiceCostWin;
invoiceCostWin.setTitle("查看入库单"); invoiceCostWin.setTitle("查看入库单");
}else{ } else {
if(!inInvoiceCostWin){ if(!inInvoiceCostWin){
inInvoiceCostWin = Ext.widget('stockincostview'); inInvoiceCostWin = Ext.widget('stockincostview');
} }
...@@ -336,23 +272,21 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", { ...@@ -336,23 +272,21 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
value : currentInvoice.data.id value : currentInvoice.data.id
}]); }]);
costWin.down('#systemInfo_stockInCost_form').loadRecord(record); costWin.down('#stockInCost_form').loadRecord(record);
//设置bottom toolbar
//设置bottom form,包括材料员、库管员、项目经理的名字 var managerName = costWin.down('#managerName_df');
var materialKeeperName = costWin.down('#materialKeeperName_df');
var wareKeeperName = costWin.down('#wareKeeperName_df'); var wareKeeperName = costWin.down('#wareKeeperName_df');
var projectManagerName = costWin.down('#projectManagerName_df'); var regulatorName = costWin.down('#regulatorName_df');
managerName.setValue(record.data['manager']);
materialKeeperName.setValue(invoiceData['materialKeeperName']); wareKeeperName.setValue(record.data['wareKeeper']);
wareKeeperName.setValue(invoiceData['wareKeeperName']); regulatorName.setValue(record.data['regulator']);
projectManagerName.setValue(invoiceData['projectManagerName']);
costWin.show(); costWin.show();
}, },
//入库单-删除 //入库单-删除
deleteInInvoice : function(btn) { deleteInInvoice : function(btn) {
inInvoiceController.deleteBatchModel(btn,invoiceGrid,"入库单","/stockInInvoice/deleteBatch"); inInvoiceController.deleteBatchModel(btn, invoiceGrid, "入库单", "/invoices/in/deleteBatch");
}, },
//入库单-更新总价 //入库单-更新总价
...@@ -381,79 +315,12 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", { ...@@ -381,79 +315,12 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
}); });
}, },
approveInInvoice : 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 : "stockInInvoice/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"]);
}
});
},
unapproveInInvoice : function(){
inInvoiceController.submitInInvoiceToAudit("UNAPPROVED");
},
addSystemInfo : function(btn){
var modelName = "drp.app.model.projects.invoices.StockInInvoiceModel"; var modelName = "drp.app.model.projects.invoices.StockInInvoiceModel";
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.save({ model.save({
success : function(response, operation){ success : function(response, operation){
invoiceGrid.getStore().load(); invoiceGrid.getStore().load();
...@@ -508,9 +375,11 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", { ...@@ -508,9 +375,11 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
"drp.app.model.resources.WareModel"], "drp.app.model.resources.WareModel"],
stores : ["drp.app.store.projects.invoices.StockInInvoiceStore", stores : ["drp.app.store.projects.invoices.StockInInvoiceStore",
"drp.app.store.projects.costs.StockInCostStore", "drp.app.store.projects.costs.StockInCostStore",
"drp.app.store.projects.ProjectDataStore",
"drp.app.store.resources.WareStore", "drp.app.store.resources.WareStore",
"drp.app.store.resources.VendorStore"], "drp.app.store.resources.VendorStore",
"drp.app.store.users.ManagerStore",
"drp.app.store.users.WareKeeperStore",
"drp.app.store.users.RegulatorStore"],
views : ["drp.app.view.projects.invoices.StockInInvoiceView", views : ["drp.app.view.projects.invoices.StockInInvoiceView",
"drp.app.view.projects.costs.StockInCostView", "drp.app.view.projects.costs.StockInCostView",
"drp.app.view.projects.costs.StockInCostShowView", "drp.app.view.projects.costs.StockInCostShowView",
......
...@@ -24,20 +24,11 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", { ...@@ -24,20 +24,11 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
currentInvoice = null; currentInvoice = null;
wareWindow= false; wareWindow= false;
invoiceGrid = panel.down('gridpanel'); 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 //stock_in_invoice filter
'stockoutinvoiceview > gridpanel' : { 'stockoutinvoiceview > gridpanel' : {
afterrender : this.buildFiltersByLoginUser,
itemdblclick : this.showUpdateOutInvoiceForm itemdblclick : this.showUpdateOutInvoiceForm
}, },
...@@ -156,12 +147,6 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", { ...@@ -156,12 +147,6 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
}, { }, {
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 : "project",
value : form.down("#projectName_filter").getValue()
}, {
property : "system",
value : form.down("#systemName_filter").getValue()
}, { }, {
property : "minTotal", property : "minTotal",
value : form.down("#minTotal_filter").getValue() value : form.down("#minTotal_filter").getValue()
...@@ -175,50 +160,17 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", { ...@@ -175,50 +160,17 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
property : "receiveManName", property : "receiveManName",
value : form.down("#receiveManName_filter").getValue() value : form.down("#receiveManName_filter").getValue()
}, { }, {
property : "materialKeeperName", property : "regulatorName",
value : form.down("#materialKeeperName_filter").getValue() value : form.down("#regulatorName_filter").getValue()
}, { }, {
property : "wareKeeperName", property : "wareKeeperName",
value : form.down("#wareKeeperName_filter").getValue() value : form.down("#wareKeeperName_filter").getValue()
}, { }, {
property : "projectManagerName", property : "managerName",
value : form.down("#projetManagerName_filter").getValue() value : form.down("#managerName_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) { deleteStockOutCost : function(btn) {
me.deleteModel(btn, outCostGrid, "商品条目"); me.deleteModel(btn, outCostGrid, "商品条目");
......
...@@ -5,40 +5,16 @@ Ext.define("drp.app.model.projects.invoices.AbstractInvoiceModel", { ...@@ -5,40 +5,16 @@ Ext.define("drp.app.model.projects.invoices.AbstractInvoiceModel", {
}, { }, {
name : "forDate" name : "forDate"
}, { }, {
name : "system" name : 'manager'
}, { }, {
name : "system.id", name : 'wareKeeper'
persist : false
}, { }, {
name : "system.projectName", name : 'regulator'
persist : false
}, { }, {
name : "system.name", name : "receiveMan"
persist : false
}, { }, {
name : "totalPrice", name : "totalPrice",
type : "number" 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", name : "costCount",
type : "int", type : "int",
......
...@@ -2,7 +2,7 @@ Ext.define("drp.app.model.projects.invoices.StockInInvoiceModel", { ...@@ -2,7 +2,7 @@ Ext.define("drp.app.model.projects.invoices.StockInInvoiceModel", {
extend : "drp.app.model.projects.invoices.AbstractInvoiceModel", extend : "drp.app.model.projects.invoices.AbstractInvoiceModel",
proxy : { proxy : {
type : 'rest', type : 'rest',
url : 'stockInInvoice', url : 'invoices/in',
reader : { reader : {
type : "json", type : "json",
root : "data", root : "data",
......
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 : "receiveMan" name : "address"
} ], } ],
proxy : { proxy : {
type : 'rest', type : 'rest',
url : 'stockOutInvoice', url : 'invoices/out',
reader : { reader : {
type : "json", type : "json",
root : "data", root : "data",
......
...@@ -2,7 +2,7 @@ Ext.define("drp.app.store.AbstractStore", { ...@@ -2,7 +2,7 @@ Ext.define("drp.app.store.AbstractStore", {
extend : 'Ext.data.Store', extend : 'Ext.data.Store',
model : 'drp.app.model.AbstractModel', model : 'drp.app.model.AbstractModel',
pageSize : 50, pageSize : 50,
autoLoad : false, // autoLoad : false,
remoteFilter : true, remoteFilter : true,
remoteSort : true remoteSort : true
}); });
\ No newline at end of file
...@@ -22,7 +22,7 @@ Ext.define('drp.app.view.projects.resources.StockInCostShowView', { ...@@ -22,7 +22,7 @@ Ext.define('drp.app.view.projects.resources.StockInCostShowView', {
height: 40, height: 40,
items : [{ items : [{
xtype : 'form', xtype : 'form',
itemId : 'systemInfo_stockInCost_form', itemId : 'stockInCost_form',
items : [{ items : [{
xtype : 'fieldcontainer', xtype : 'fieldcontainer',
layout : 'column', layout : 'column',
...@@ -30,16 +30,9 @@ Ext.define('drp.app.view.projects.resources.StockInCostShowView', { ...@@ -30,16 +30,9 @@ Ext.define('drp.app.view.projects.resources.StockInCostShowView', {
xtype : 'displayfield', xtype : 'displayfield',
margin : '5 0 0 15', margin : '5 0 0 15',
labelWidth: 30, labelWidth: 30,
name : 'system.projectName', name : 'receiveMan',
width : 200, width : 200,
fieldLabel : '项目' fieldLabel : '收到'
}, {
xtype : 'displayfield',
margin : '5 0 0 15',
labelWidth: 30,
name : 'system.name',
width : 200,
fieldLabel : '系统'
}, { }, {
xtype: 'displayfield', xtype: 'displayfield',
fieldLabel: '日期', fieldLabel: '日期',
...@@ -108,25 +101,23 @@ Ext.define('drp.app.view.projects.resources.StockInCostShowView', { ...@@ -108,25 +101,23 @@ Ext.define('drp.app.view.projects.resources.StockInCostShowView', {
flex : 1, flex : 1,
margin : '0 0 0 30', margin : '0 0 0 30',
labelWidth: 50, labelWidth: 50,
itemId : 'wareKeeperName_df', itemId : 'managerName_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', xtype : 'displayfield',
flex : 1, flex : 1,
labelWidth: 60, labelWidth: 60,
itemId : 'projectManagerName_df', itemId : 'regulatorName_df',
fieldLabel : '项目经理' fieldLabel : '经手人'
}] }]
}] }]
}); });
me.callParent(arguments); me.callParent(arguments);
} }
}); });
\ No newline at end of file
...@@ -34,116 +34,89 @@ Ext.define('drp.app.view.projects.resources.StockInCostView', { ...@@ -34,116 +34,89 @@ Ext.define('drp.app.view.projects.resources.StockInCostView', {
items : [{ items : [{
xtype : 'fieldcontainer', xtype : 'fieldcontainer',
layout : 'column', layout : 'column',
items : [{ items : [ {
xtype : 'textfield',//入库单的id xtype: 'textfield',
itemId : 'id_stockInInvoice', fieldLabel: '收到<font color="red">*</font>',
hidden : true, itemId : 'receiveMan_stockInInvoice_tf',
name : 'id' allowBlank: false,
name : 'receiveMan',
margin : '5 0 0 15',
width : 200,
labelWidth: 60
}, { }, {
xtype : 'combobox', xtype: 'datefield',
fieldLabel: '日期<font color="red">*</font>',
margin : '5 0 0 15', margin : '5 0 0 15',
labelWidth: 60, labelWidth: 60,
itemId : 'project_stockInInvoice_cb', itemId : 'forDate_stockInInvoice_df',
name : 'system.projectName', name : 'forDate',
editable : false, editable : false,
allowBlank : false, allowBlank: false,
width : 300, width : 200,
displayField :"name", format : 'Y-m-d',
valueField :"id",
fieldLabel : '项目<font color="red">*</font>',
store : 'drp.app.store.projects.ProjectDataStore',
listeners : { listeners : {
afterrender : function(combo){ afterrender : function(df) {
//显示人员所属项目 if(df.getValue() == null) {
var store = combo.getStore(); df.setValue(new Date());
if(user.type != "Leader"){
Ext.apply(store.proxy.extraParams, {
userType : user.type,
userId : user.id
});
} }
},
select : function(combo,records){
var project = records[0].data;
var stockincostview = combo.up("stockincostview");
//设置该项目下的人员
stockincostview.down("#materialKeeperName_df").setValue(project.materialKeeper.name);
stockincostview.down("#wareKeeperName_df").setValue(project.wareKeeper.name);
stockincostview.down("#projectManagerName_df").setValue(project.projectManager.name);
//根据项目动态加载下属系统
var _url = "project/" + project.id;
var system = stockincostview.down("#systemName_stockInInvoice_cb");
system.getStore().getProxy().url = _url;
system.setValue("");
system.setDisabled(false);
} }
} }
}, { }, {
xtype : 'combobox', xtype: 'textfield',
fieldLabel: '编号',
itemId : 'code_stockInInvoice_tf',
name : 'code',
margin : '5 0 0 15', margin : '5 0 0 15',
labelWidth: 60, width : 200,
itemId : 'systemName_stockInInvoice_cb', labelWidth: 60
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_stockInInvoice_tf').setValue(combo.getSubmitValue());
}
}
}, {
xtype : 'numberfield',
hidden : true,
itemId : 'systemId_stockInInvoice_tf',
name : 'system.id'
}] }]
}, { }, {
xtype : 'fieldcontainer', xtype : 'fieldcontainer',
layout : 'column', layout : 'column',
items : [ { items : [{
xtype: 'datefield', xtype : 'textfield',//入库单的id
fieldLabel: '日期<font color="red">*</font>', itemId : 'id_stockInInvoice',
hidden : true,
name : 'id'
}, {
xtype : 'combobox',
width : 200,
labelWidth: 60,
margin : '5 0 0 15', margin : '5 0 0 15',
name : 'manager',
valueField : 'name',
displayField : 'name',
allowBlank: false,
store : 'drp.app.store.users.ManagerStore',
fieldLabel : '负责人<font color="red">*</font>'
}, {
xtype : 'combobox',
width : 200,
labelWidth: 60, labelWidth: 60,
itemId : 'forDate_stockInInvoice_df', margin : '5 0 0 15',
name : 'forDate', name : 'wareKeeper',
editable : false, valueField : 'name',
width : 300, displayField : 'name',
format : 'Y-m-d' allowBlank: false,
store : 'drp.app.store.users.WareKeeperStore',
fieldLabel : '库管员<font color="red">*</font>'
}, { }, {
xtype: 'textfield', xtype : 'combobox',
fieldLabel: '编号<font color="red">*</font>', width : 200,
itemId : 'code_stockInInvoice_tf', labelWidth: 60,
name : 'code',
margin : '5 0 0 15', margin : '5 0 0 15',
width : 300, name : 'regulator',
labelWidth: 60 valueField : 'name',
displayField : 'name',
allowBlank: false,
store : 'drp.app.store.users.RegulatorStore',
fieldLabel : '经手人'
}, { }, {
xtype : 'button', xtype : 'button',
margin : '5 0 0 65', margin : '5 0 0 65',
action : 'addSystemInfo', action : 'confirmInvoiceHeader',
icon : 'resources/images/icons/ok.png', icon : 'resources/images/icons/ok.png',
text : '确认所属系统' text : '确认单据头'
}] }]
}] }]
}] }]
...@@ -233,7 +206,7 @@ Ext.define('drp.app.view.projects.resources.StockInCostView', { ...@@ -233,7 +206,7 @@ Ext.define('drp.app.view.projects.resources.StockInCostView', {
} }
} }
}] }]
}], }]/*,
listeners : { listeners : {
select : function(grid, record){ select : function(grid, record){
var cost = record.data; var cost = record.data;
...@@ -252,7 +225,7 @@ Ext.define('drp.app.view.projects.resources.StockInCostView', { ...@@ -252,7 +225,7 @@ Ext.define('drp.app.view.projects.resources.StockInCostView', {
inCostForm.down('#wareQuantity_stockInCost_nf').setReadOnly(false); inCostForm.down('#wareQuantity_stockInCost_nf').setReadOnly(false);
inCostForm.down('#wareQuantity_stockInCost_nf').setValue(cost.quantity); inCostForm.down('#wareQuantity_stockInCost_nf').setValue(cost.quantity);
} }
} }*/
}, {//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<入库单-商品添加的form }, {//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<入库单-商品添加的form
xtype : 'panel', xtype : 'panel',
region : 'south', region : 'south',
...@@ -367,35 +340,9 @@ Ext.define('drp.app.view.projects.resources.StockInCostView', { ...@@ -367,35 +340,9 @@ Ext.define('drp.app.view.projects.resources.StockInCostView', {
}] }]
}] }]
}] }]
}],
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 : '项目经理'
}]
}] }]
}); });
me.callParent(arguments); me.callParent(arguments);
} }
}); });
\ No newline at end of file
...@@ -18,27 +18,10 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', { ...@@ -18,27 +18,10 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', {
listeners : { listeners : {
selectionchange : function(sm, selections) { selectionchange : function(sm, selections) {
me.down('#deleteInInvoice_btn').setDisabled(selections.length == 0); 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, { Ext.applyIf(me, {
items : [{ items : [{
...@@ -67,18 +50,6 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', { ...@@ -67,18 +50,6 @@ 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 : 'projectName_filter',
fieldLabel : '项目名称'
}, {
xtype : 'textfield',
margin : '5 0 0 20',
labelWidth: 60,
itemId : 'systemName_filter',
fieldLabel : '系统名称'
}] }]
}, { }, {
xtype : 'fieldcontainer', xtype : 'fieldcontainer',
...@@ -109,8 +80,8 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', { ...@@ -109,8 +80,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 : 'materialKeeperName_filter', itemId : 'regulatorName_filter',
fieldLabel : '材料员' fieldLabel : '经手人'
}, { }, {
xtype : 'textfield', xtype : 'textfield',
margin : '5 0 0 20', margin : '5 0 0 20',
...@@ -121,8 +92,8 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', { ...@@ -121,8 +92,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 : 'projetManagerName_filter', itemId : 'managerName_filter',
fieldLabel : '项目经理' fieldLabel : '负责人'
}, { }, {
xtype : 'button', xtype : 'button',
margin : '5 0 0 25', margin : '5 0 0 25',
...@@ -161,14 +132,9 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', { ...@@ -161,14 +132,9 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', {
dataIndex : 'code' dataIndex : 'code'
}, { }, {
xtype : 'gridcolumn', xtype : 'gridcolumn',
dataIndex : 'system.projectName', dataIndex : 'receiveMan',
flex : 2,
text : '项目名称'
}, {
xtype : 'gridcolumn',
dataIndex : 'system.name',
flex : 2, flex : 2,
text : '系统名称' text : '收到'
}, { }, {
xtype : 'gridcolumn', xtype : 'gridcolumn',
dataIndex : 'totalPrice', dataIndex : 'totalPrice',
...@@ -176,31 +142,19 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', { ...@@ -176,31 +142,19 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', {
text : '合价' text : '合价'
}, { }, {
xtype : 'gridcolumn', xtype : 'gridcolumn',
dataIndex : 'materialKeeperName', dataIndex : 'manager',
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 : 'wareKeeperName', 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, flex : 2,
text : '项目经理', text : '经手人'
renderer : function(value, metadata, record) {
var projectManagerAuditState = record.data.projectManagerAuditState;
return me.displyAuditState(value, projectManagerAuditState);
}
}], }],
dockedItems : [{ dockedItems : [{
xtype : 'pagingtoolbar', xtype : 'pagingtoolbar',
...@@ -224,15 +178,7 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', { ...@@ -224,15 +178,7 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', {
itemId : 'deleteInInvoice_btn', itemId : 'deleteInInvoice_btn',
disabled : true, disabled : true,
text : '删除' text : '删除'
}/*, { }]
itemId : 'submitInInvoice_btn',
disabled : true,
text : '提交审核',
icon : 'resources/images/icons/database_save.png',
menu : {
items : menuItems
}
}*/]
}] }]
}] }]
......
...@@ -23,22 +23,6 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', { ...@@ -23,22 +23,6 @@ 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, { Ext.applyIf(me, {
items : [{ items : [{
...@@ -67,18 +51,6 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', { ...@@ -67,18 +51,6 @@ 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 : 'projectName_filter',
fieldLabel : '项目名称'
}, {
xtype : 'textfield',
margin : '5 0 0 20',
labelWidth: 60,
itemId : 'systemName_filter',
fieldLabel : '系统名称'
}] }]
}, { }, {
xtype : 'fieldcontainer', xtype : 'fieldcontainer',
...@@ -115,7 +87,7 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', { ...@@ -115,7 +87,7 @@ 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 : 'materialKeeperName_filter', itemId : 'regulatorName_filter',
fieldLabel : '材料员' fieldLabel : '材料员'
}, { }, {
xtype : 'textfield', xtype : 'textfield',
...@@ -127,7 +99,7 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', { ...@@ -127,7 +99,7 @@ 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 : 'projetManagerName_filter', itemId : 'managerName_filter',
fieldLabel : '项目经理' fieldLabel : '项目经理'
}, { }, {
xtype : 'button', xtype : 'button',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment