Commit 5764b911 authored by Junshan Wang's avatar Junshan Wang

Merge branch 'custom-for-wangli' of http://182.92.242.253/originstar/drp.git into custom-for-wangli

parents 2096b784 f2a829ce
package com.originspark.drp.controllers.projects.costs;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -52,10 +53,12 @@ public class StockInCostController extends BaseController{
return failure("抱歉,不能重复添加商品");
}
stockInCost.setCreatedBy(getCurrentUser().getName());
stockInCost.setForDate(invoice.getForDate());
stockInCost.setCreatedOn(new Date());
stockInCost.setCreatedBy(getCurrentUser().getName());
stockInCost.setUpdatedOn(new Date());
stockInCost.setUpdatedBy(getCurrentUser().getName());
service.save(stockInCost);
return ok("创建成功");
}
......
......@@ -40,7 +40,7 @@ public class StockOutInvoiceController extends AbstractInvoiceController {
String data = request.getParameter("data");
ObjectMapper mapper = new ObjectMapper();
IdsJson json = null;
try {
json = mapper.readValue(data, IdsJson.class);
} catch (Exception e) {
......
......@@ -18,9 +18,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.originspark.drp.controllers.BaseController;
import com.originspark.drp.models.resources.Vendor;
import com.originspark.drp.util.SessionUtil;
import com.originspark.drp.util.json.IdsJson;
import com.originspark.drp.util.json.FilterRequest;
import com.originspark.drp.util.json.IdsJson;
import com.originspark.drp.util.json.JsonUtils;
@Controller
......
......@@ -126,10 +126,13 @@ public class VendorServiceBean extends BaseDAOSupport<Vendor> implements VendorS
@Override
public boolean have(Vendor vendor) {
String jpql = "from Vendor where name =:name and contactMan =:contactMan";
String jpql = "from Vendor where name =:name and contactMan =:contactMan and phone =:phone and address =:address and note =:note";
TypedQuery<Vendor> query = em.createQuery(jpql, Vendor.class)
.setParameter("name", vendor.getName())
.setParameter("contactMan", vendor.getContactMan());
.setParameter("contactMan", vendor.getContactMan())
.setParameter("phone", vendor.getPhone())
.setParameter("address", vendor.getAddress())
.setParameter("note", vendor.getNote());
List<Vendor> vendors = query.getResultList();
if(vendors.isEmpty()){
......
......@@ -138,13 +138,14 @@ public class WareServiceBean extends BaseDAOSupport<Ware> implements WareService
@Override
public boolean have(Ware ware) {
String jpql = "from Ware where name =:name and model =:model and unit =:unit and brand =:brand and category =:category";
String jpql = "from Ware where name =:name and model =:model and unit =:unit and brand =:brand and category =:category and vendor =:vendor";
TypedQuery<Ware> query = em.createQuery(jpql, Ware.class)
.setParameter("name", ware.getName())
.setParameter("model", ware.getModel())
.setParameter("unit", ware.getUnit())
.setParameter("brand", ware.getBrand())
.setParameter("category", ware.getCategory());
.setParameter("category", ware.getCategory())
.setParameter("vendor", ware.getVendor());
List<Ware> wares = query.getResultList();
if(wares.isEmpty()){
......
......@@ -5,13 +5,13 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
extend : "drp.app.controller.AbstractController",
inInvoiceController : null,
invoiceGrid : null,
currentInvoice : null,
inInvoiceGrid : null,
currentInInvoice : null,
inCostGrid : null,
inCostForm : null,
inInvoiceCostWin : null,//costWin默认是未创建的
invoiceCostWin : null,
wareWindow : null,
inInvoiceCostWin : null,//inInvoiceCostWin默认是未创建的
inInvoiceDetailWin : null,
wareInWin : null,
init : function() {
inInvoiceController = this;
......@@ -20,11 +20,11 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
'stockininvoiceview' : {
afterrender : function(panel) {
inInvoiceCostWin = false;
invoiceCostWin = false;
currentInvoice = null;
wareWindow= false;
invoiceGrid = panel.down('gridpanel');
invoiceGrid.getStore().load();
inInvoiceDetailWin = false;
currentInInvoice = null;
wareInWin= false;
inInvoiceGrid = panel.down('gridpanel');
inInvoiceGrid.getStore().load();
}
},
......@@ -71,26 +71,25 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
'stockincostview button[action=deleteStockInCost]' : {
click : this.deleteStockInCost
},
//stock_in_cost choose ware
'stockincostview button[action=chooseWare]' : {
click : function(btn){
// 加载弹窗相关的controller
if(!wareWindow){
wareWindow = Ext.widget('warewindow');
if(!wareInWin){
wareInWin = Ext.widget('stockinwarewin');
var WareControllerName = "drp.app.controller.resources.WareController";
if (!Ext.ClassManager.isCreated(WareControllerName)) {
var mainController = this.application.getController("drp.base.controller.MainController");
mainController.application.getController(WareControllerName).init();
}
}
wareWindow.show();
wareInWin.show();
}
},
//-----------------------------------------------------------
'warewindow gridpanel' : {
'stockinwarewin gridpanel' : {
itemcontextmenu : function(view, record, item, index, e){
// 禁用浏览器自带的右键菜单
e.preventDefault();
......@@ -105,12 +104,17 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
icon : 'resources/images/icons/ok.png',
listeners : {
click : function(item){
wareWindow.hide();
wareInWin.hide();
var costForm = inInvoiceCostWin.down('#stockInCost_form');
console.log(">>>>>>>>>>>>>>>>>入库单日志.....");
console.log("wareInWin", wareInWin);
console.log("inInvoiceCostWin", inInvoiceCostWin);
console.log("costForm", costForm);
costForm.down('#wareName_stockInCost_tf').setValue(record.data.name);
costForm.down('#wareId_stockInCost_tf').setValue(record.data.id);
costForm.down('#wareModel_stockInCost_tf').setValue(record.data.model);
costForm.down('#wareUnit_stockInCost_tf').setValue(record.data.unit);
console.log("==============================");
}
}
}]
......@@ -123,7 +127,7 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
//入库单-查询
searchStockInInvoice : function(btn){
var store = invoiceGrid.getStore();
var store = inInvoiceGrid.getStore();
var form = btn.up("form");
store.filters.clear();
store.filter([ {
......@@ -200,7 +204,7 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
id : formBean['wareId']
});
model.set("invoice", {
id : currentInvoice.data.id
id : currentInInvoice.data.id
});
}
if(formBean.unitPrice == ""){
......@@ -212,9 +216,9 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
store.filters.clear();
store.filter([{
property : "invoice",
value : currentInvoice.data.id
value : currentInInvoice.data.id
}]);
Ext.Msg.alert("失败!", operation.request.scope.reader.jsonData["message"]);
Ext.Msg.alert("成功!", operation.request.scope.reader.jsonData["message"]);
},
failure : function(response, operation) {
Ext.Msg.alert("失败!", operation.request.scope.reader.jsonData["message"]);
......@@ -230,7 +234,7 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
}
var store = inInvoiceCostWin.down("gridpanel").getStore();
//在弹出新建入库单的页面之前,需要做三部分工作:清空store、合价设置为0
currentInvoice = null;
currentInInvoice = null;
store.removeAll(false);
inInvoiceCostWin.down('#addStockInCost_btn').setDisabled(true);
inInvoiceCostWin.down('#totalPrice_stockInCost_df').setValue(0);
......@@ -242,18 +246,18 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
},
showUpdateInInvoiceForm : function( grid, record, item, index){
currentInvoice = record;//在弹出更新的窗口时,保存选中的invoice
currentInInvoice = record;//在弹出更新的窗口时,保存选中的invoice
var invoiceData = record.data;
var costWin = null;
//1.非材料员登陆的,只提供预览
//2.若是材料员,则pass=true的和已经通过审核的,只提供预览
if(user.type != "WAREKEEPER"){
if(!invoiceCostWin){
invoiceCostWin = Ext.widget('stockincostshowview');
if(!inInvoiceDetailWin){
inInvoiceDetailWin = Ext.widget('stockincostshowview');
}
costWin = invoiceCostWin;
invoiceCostWin.setTitle("查看入库单");
costWin = inInvoiceDetailWin;
inInvoiceDetailWin.setTitle("查看入库单");
} else {
if(!inInvoiceCostWin){
......@@ -269,7 +273,7 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
store.filters.clear();
store.filter([{
property : "invoice",
value : currentInvoice.data.id
value : currentInInvoice.data.id
}]);
costWin.down('#stockInCost_form').loadRecord(record);
......@@ -286,27 +290,27 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
//入库单-删除
deleteInInvoice : function(btn) {
inInvoiceController.deleteBatchModel(btn, invoiceGrid, "入库单", "/invoices/in/deleteBatch");
inInvoiceController.deleteBatchModel(btn, inInvoiceGrid, "入库单", "/invoices/in/deleteBatch");
},
//入库单-更新总价
updateInvoiceTotalPrice : function(panel){
panel.down('#chooseWare_stockInCost_btn').setDisabled(true);
var totalPrice_stockInCost = panel.down('#totalPrice_stockInCost_df').getValue();
if(!currentInvoice){
if(!currentInInvoice){
return;
}
if(currentInvoice.data.totalPrice == totalPrice_stockInCost){
if(currentInInvoice.data.totalPrice == totalPrice_stockInCost){
return;
}
currentInvoice.set("forDate",panel.down('#forDate_stockInInvoice_df').getValue());
currentInvoice.set("code",panel.down('#code_stockInInvoice_tf').getValue());
currentInvoice.set("totalPrice",totalPrice_stockInCost);
currentInvoice.save({
currentInInvoice.set("forDate",panel.down('#forDate_stockInInvoice_df').getValue());
currentInInvoice.set("code",panel.down('#code_stockInInvoice_tf').getValue());
currentInInvoice.set("totalPrice",totalPrice_stockInCost);
currentInInvoice.save({
success : function(response, operation) {
invoiceGrid.getStore().load();
inInvoiceGrid.getStore().load();
},
failure : function(response, operation) {
Ext.Msg.alert("失败!", operation.request.scope.reader.jsonData["message"]);
......@@ -322,9 +326,9 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
var model = Ext.create(modelName, formBean);
model.save({
success : function(response, operation){
invoiceGrid.getStore().load();
inInvoiceGrid.getStore().load();
var reader = operation.request.scope.reader;
currentInvoice = Ext.create(modelName,{
currentInInvoice = Ext.create(modelName,{
id : reader.jsonData["object"]
});
btn.up("form").down('#id_stockInInvoice').setValue(reader.jsonData["object"]);
......@@ -339,7 +343,7 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
},
submitInInvoiceToAudit : function(state){
var records = invoiceGrid.getSelectionModel().getSelection();
var records = inInvoiceGrid.getSelectionModel().getSelection();
var ids = [];
for(var i = 0,len = records.length;i<len;i++){
ids[i] = records[i].data.id;
......@@ -361,7 +365,7 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
success : function(response, operation){
var resp = Ext.decode(response.responseText);
Ext.Msg.alert("成功!", resp.message);
invoiceGrid.getStore().load();
inInvoiceGrid.getStore().load();
},
failure : function(resp, operation) {
Ext.Msg.alert("失败!", operation.request.scope.reader.jsonData["message"]);
......@@ -383,6 +387,6 @@ Ext.define("drp.app.controller.projects.invoices.StockInInvoiceController", {
"drp.app.view.projects.costs.StockInCostView",
"drp.app.view.projects.costs.StockInCostShowView",
"drp.app.view.resources.WareView",
"drp.app.view.resources.WareWindow",
"drp.app.view.resources.StockInWareWin",
"drp.app.view.resources.WareViewForm" ]
});
\ No newline at end of file
......@@ -4,27 +4,27 @@
Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
extend : "drp.app.controller.AbstractController",
me : null,
invoiceGrid : null,
currentInvoice : null,
outInvoiceController : null,
outInvoiceGrid : null,
currentOutInvoice : null,
outCostGrid : null,
outCostForm : null,
outInvoiceCostWin : null,// costWin默认是未创建的
invoiceCostWin : null,
wareWindow : null,
outInvoiceDetailWin : null,
wareOutWin : null,
init : function() {
me = this;
outInvoiceController = this;
this.control({
'stockoutinvoiceview' : {
afterrender : function(panel) {
outInvoiceCostWin = false;
invoiceCostWin = false;
currentInvoice = null;
wareWindow = false;
invoiceGrid = panel.down('gridpanel');
invoiceGrid.getStore().load();
outInvoiceDetailWin = false;
currentOutInvoice = null;
wareOutWin = false;
outInvoiceGrid = panel.down('gridpanel');
outInvoiceGrid.getStore().load();
}
},
......@@ -86,26 +86,26 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
'stockoutcostview button[action=chooseWare]' : {
click : function(btn) {
// 加载弹窗相关的controller
if (!wareWindow) {
wareWindow = Ext.widget('warewindow');
if (!wareOutWin) {
wareOutWin = Ext.widget('stockoutwarewin');
var WareControllerName = "drp.app.controller.resources.WareController";
if (!Ext.ClassManager.isCreated(WareControllerName)) {
var mainController = this.application.getController("drp.base.controller.MainController");
mainController.application.getController(WareControllerName).init();
}
}
wareWindow.show();
wareOutWin.show();
}
},
// -----------------------------------------------------------
'warewindow' : {
'stockoutwarewin' : {
afterrender : function(panel) {
// 设置只能选择、检索,不能增加删除
panel.down('toolbar').setVisible(false);
}
},
'warewindow gridpanel' : {
'stockoutwarewin gridpanel' : {
itemcontextmenu : function(view, record, item, index, e) {
// 禁用浏览器自带的右键菜单
e.preventDefault();
......@@ -120,12 +120,17 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
icon : 'resources/images/icons/ok.png',
listeners : {
click : function(item) {
wareWindow.hide();
wareOutWin.hide();
var costForm = outInvoiceCostWin.down('#stockOutCost_form');
console.log(">>>>>>>>>>>>>>>>>出库单日志.....");
console.log("wareOutWin", wareOutWin);
console.log("outInvoiceCostWin", outInvoiceCostWin);
console.log("costForm", costForm);
costForm.down('#wareName_stockOutCost_tf').setValue(record.data.name);
costForm.down('#wareId_stockOutCost_tf').setValue(record.data.id);
costForm.down('#wareModel_stockOutCost_tf').setValue(record.data.model);
costForm.down('#wareUnit_stockOutCost_tf').setValue(record.data.unit);
console.log("==============================");
}
}
}]
......@@ -138,7 +143,7 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
// 出库单-查询
searchStockOutInvoice : function(btn) {
var store = invoiceGrid.getStore();
var store = outInvoiceGrid.getStore();
var form = btn.up("form");
store.filters.clear();
store.filter([{
......@@ -173,12 +178,12 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
// 入库商品-删除
deleteStockOutCost : function(btn) {
me.deleteModel(btn, outCostGrid, "商品条目");
outInvoiceController.deleteModel(btn, outCostGrid, "商品条目");
var grid = outCostGrid;
var name = "商品条目";
var record = grid.getSelectionModel().getSelection()[0];
if (!record) {
me.showPromptsOnDelete(name);
outInvoiceController.showPromptsOnDelete(name);
return;
} else {
Ext.MessageBox.confirm("标题", "你要删除这个" + name + "吗?", function(btn) {
......@@ -218,7 +223,7 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
id : formBean['wareId']
});
model.set("invoice", {
id : currentInvoice.data.id
id : currentOutInvoice.data.id
});
}
if (formBean.unitPrice == "") {
......@@ -230,9 +235,9 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
store.filters.clear();
store.filter([{
property : "invoice",
value : currentInvoice.data.id
value : currentOutInvoice.data.id
}]);
Ext.Msg.alert("失败!", operation.request.scope.reader.jsonData["message"]);
Ext.Msg.alert("成功!", operation.request.scope.reader.jsonData["message"]);
},
failure : function(response, operation) {
Ext.Msg.alert("失败!", operation.request.scope.reader.jsonData["message"]);
......@@ -248,7 +253,7 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
}
var store = outInvoiceCostWin.down("gridpanel").getStore();
// 在弹出新建出库单的页面之前,需要做三部分工作:清空store、合价设置为0
currentInvoice = null;
currentOutInvoice = null;
store.removeAll(false);
outInvoiceCostWin.down('#addStockOutCost_btn').setDisabled(true);
outInvoiceCostWin.down('#totalPrice_stockOutCost_df').setValue(0);
......@@ -260,18 +265,18 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
},
showUpdateOutInvoiceForm : function(grid, record, item, index) {
currentInvoice = record;// 在弹出更新的窗口时,保存选中的invoice
currentOutInvoice = record;// 在弹出更新的窗口时,保存选中的invoice
var invoiceData = record.data;
var costWin = null;
// 1.非材料员登陆的,只提供预览
// 2.若是材料员,则pass=true的和已经通过审核的,只提供预览
if (user.type != "WAREKEEPER") {
if (!invoiceCostWin) {
invoiceCostWin = Ext.widget('stockoutcostshowview');
if (!outInvoiceDetailWin) {
outInvoiceDetailWin = Ext.widget('stockoutcostshowview');
}
costWin = invoiceCostWin;
invoiceCostWin.setTitle("查看出库单");
costWin = outInvoiceDetailWin;
outInvoiceDetailWin.setTitle("查看出库单");
} else {
if (!outInvoiceCostWin) {
outInvoiceCostWin = Ext.widget('stockoutcostview');
......@@ -286,7 +291,7 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
store.filters.clear();
store.filter([{
property : "invoice",
value : currentInvoice.data.id
value : currentOutInvoice.data.id
}]);
costWin.down('#header_stockOutCost_form').loadRecord(record);
......@@ -304,27 +309,27 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
// 出库单-删除
deleteOutInvoice : function(btn) {
me.deleteBatchModel(btn, invoiceGrid, "出库单", "/invoices/out/deleteBatch");
outInvoiceController.deleteBatchModel(btn, outInvoiceGrid, "出库单", "/invoices/out/deleteBatch");
},
// 出库单-更新总价
updateInvoiceTotalPrice : function(panel) {
panel.down('#chooseWare_stockOutCost_btn').setDisabled(true);
var totalPrice_stockOutCost = panel.down('#totalPrice_stockOutCost_df').getValue();
if (!currentInvoice) {
if (!currentOutInvoice) {
return;
}
if (currentInvoice.data.totalPrice == totalPrice_stockOutCost) {
if (currentOutInvoice.data.totalPrice == totalPrice_stockOutCost) {
return;
}
currentInvoice.set("forDate", panel.down('#forDate_stockOutInvoice_df').getValue());
currentInvoice.set("code", panel.down('#code_stockOutInvoice_tf').getValue());
currentInvoice.set("totalPrice", totalPrice_stockOutCost);
currentOutInvoice.set("forDate", panel.down('#forDate_stockOutInvoice_df').getValue());
currentOutInvoice.set("code", panel.down('#code_stockOutInvoice_tf').getValue());
currentOutInvoice.set("totalPrice", totalPrice_stockOutCost);
currentInvoice.save({
currentOutInvoice.save({
success : function(response, operation) {
invoiceGrid.getStore().load();
outInvoiceGrid.getStore().load();
},
failure : function(response, operation) {
Ext.Msg.alert("失败!", operation.request.scope.reader.jsonData["message"]);
......@@ -340,9 +345,9 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
var model = Ext.create(modelName, formBean);
model.save({
success : function(response, operation) {
invoiceGrid.getStore().load();
outInvoiceGrid.getStore().load();
var reader = operation.request.scope.reader;
currentInvoice = Ext.create(modelName, {
currentOutInvoice = Ext.create(modelName, {
id : reader.jsonData["object"]
});
btn.up("form").down('#id_stockOutInvoice').setValue(reader.jsonData["object"]);
......@@ -360,5 +365,5 @@ Ext.define("drp.app.controller.projects.invoices.StockOutInvoiceController", {
stores : ["drp.app.store.projects.invoices.StockOutInvoiceStore", "drp.app.store.projects.costs.StockOutCostStore", "drp.app.store.resources.WareStore",
"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.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"]
"drp.app.view.resources.WareView", "drp.app.view.resources.StockOutWareWin", "drp.app.view.resources.WareViewForm"]
});
\ No newline at end of file
Ext.define("drp.app.model.resources.VendorModel", {
extend : "drp.app.model.AbstractModel",
fields : [ {
name : "name",// 名称
type : "string"
name : "name"// 名称
}, {
name : "contactMan",// 联系人
type : "string"
name : "contactMan"// 联系人
}, {
name : "address",//地址
type : "string"
name : "address"//地址
}, {
name : "phone",// 联系电话
type : "string"
name : "phone"// 联系电话
}, {
name : "note"// 联系电话
}, {
name : 'countOfWares',// 产品供应数量
type : 'int',
......
......@@ -22,7 +22,7 @@ Ext.define("drp.app.model.resources.WareModel", {
name : "vendor.id",
persist : false
}, {
name : "vendor.name",
name : "vendor.contactMan",
persist : false
}, {
name : 'note'// 备注
......
......@@ -108,7 +108,6 @@ Ext.define('drp.app.view.projects.resources.StockInCostView', {
name : 'regulator',
valueField : 'name',
displayField : 'name',
allowBlank: false,
store : 'drp.app.store.users.RegulatorStore',
fieldLabel : '经手人'
}, {
......@@ -206,7 +205,7 @@ Ext.define('drp.app.view.projects.resources.StockInCostView', {
}
}
}]
}]/*,
}],
listeners : {
select : function(grid, record){
var cost = record.data;
......@@ -225,7 +224,7 @@ Ext.define('drp.app.view.projects.resources.StockInCostView', {
inCostForm.down('#wareQuantity_stockInCost_nf').setReadOnly(false);
inCostForm.down('#wareQuantity_stockInCost_nf').setValue(cost.quantity);
}
}*/
}
}, {//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<入库单-商品添加的form
xtype : 'panel',
region : 'south',
......
......@@ -129,7 +129,6 @@ Ext.define('drp.app.view.projects.costs.StockOutCostView', {
name : 'regulator',
valueField : 'name',
displayField : 'name',
allowBlank: false,
store : 'drp.app.store.users.RegulatorStore',
fieldLabel : '经手人'
}, {
......
......@@ -158,7 +158,7 @@ Ext.define('drp.app.view.projects.invoices.StockInInvoiceView', {
text : '库管员'
}, {
xtype : 'gridcolumn',
dataIndex : 'regulatorName',
dataIndex : 'regulator',
flex : 2,
text : '经手人'
}],
......
......@@ -18,7 +18,6 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
listeners : {
selectionchange : function(sm, selections) {
me.down('#deleteOutInvoice_btn').setDisabled(selections.length == 0);
me.down('#submitOutInvoice_btn').setDisabled(selections.length == 0);
}
}
});
......@@ -164,7 +163,7 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
text : '库管员'
}, {
xtype : 'gridcolumn',
dataIndex : 'regulatorName',
dataIndex : 'regulator',
flex : 2,
text : '经手人'
}],
......@@ -190,15 +189,7 @@ Ext.define('drp.app.view.projects.invoices.StockOutInvoiceView', {
itemId : 'deleteOutInvoice_btn',
disabled : true,
text : '删除'
}/*, {
itemId : 'submitOutInvoice_btn',
disabled : true,
text : '提交审核',
icon : 'resources/images/icons/database_save.png',
menu : {
items : menuItems
}
}*/]
}]
}]
}]
......
Ext.define('drp.app.view.resources.StockInWareWin', {
extend : 'Ext.window.Window',
alias : 'widget.stockinwarewin',
height: 520,
width: 920,
constrain : true,
modal : true,
closeAction : 'hide',
resizable : false,
layout : {
type : 'fit'
},
items : [{
xtype : 'panel',
layout : 'fit',
items :[{
xtype : 'wareview',
title : '',
closable : false
}]
}]
});
\ No newline at end of file
Ext.define('drp.app.view.resources.StockOutWareWin', {
extend : 'Ext.window.Window',
alias : 'widget.stockoutwarewin',
height: 520,
width: 920,
constrain : true,
modal : true,
closeAction : 'hide',
resizable : false,
layout : {
type : 'fit'
},
items : [{
xtype : 'panel',
layout : 'fit',
items :[{
xtype : 'wareview',
title : '',
closable : false
}]
}]
});
\ No newline at end of file
......@@ -83,48 +83,34 @@ Ext.define('drp.app.view.resources.VendorView', {
autoScroll : true,
columns : [{
xtype : 'gridcolumn',
width : 90,
flex : 1,
dataIndex : 'contactMan',
text : '联系人'
}, {
xtype : 'gridcolumn',
width : 130,
flex : 1,
dataIndex : 'phone',
text : '联系电话'
}, {
xtype : 'gridcolumn',
width : 160,
flex : 2,
dataIndex : 'name',
text : '公司名称'
}, {
xtype : 'gridcolumn',
width : 180,
flex : 2,
dataIndex : 'address',
text : '公司地址'
}, {
xtype : 'gridcolumn',
width : 100,
flex : 1,
dataIndex : 'countOfWares',
text : '供应商品数量'
}, {
xtype : 'gridcolumn',
width : 200,
flex : 3,
dataIndex : 'note',
text : '备注'
}, {
xtype : 'gridcolumn',
text : '维护信息',
columns : [{
xtype : 'gridcolumn',
width : 140,
dataIndex : 'createOn',
text : '创建时间'
}, {
xtype : 'gridcolumn',
width : 140,
dataIndex : 'updateOn',
text : '更新时间'
}]
}],
dockedItems : [{
xtype : 'toolbar',
......
......@@ -129,7 +129,7 @@ Ext.define('drp.app.view.resources.WareView', {
}, {
xtype : 'gridcolumn',
width : 100,
dataIndex : 'vendor.name',
dataIndex : 'vendor.contactMan',
text : '供应商'
}, {
xtype : 'gridcolumn',
......
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