|
|
@@ -23,62 +23,51 @@ Ext.define('saas.view.document.product.FormPanel', {
|
|
|
|
|
|
codeInHeader: false,
|
|
|
|
|
|
-
|
|
|
defaultItems: [{
|
|
|
xtype: 'hidden',
|
|
|
name: 'id',
|
|
|
fieldLabel: 'id',
|
|
|
- allowBlank: true,
|
|
|
- columnWidth: 0.25
|
|
|
+ allowBlank: true
|
|
|
},{
|
|
|
xtype: 'textfield',
|
|
|
name: 'pr_code',
|
|
|
fieldLabel: '物料编号',
|
|
|
- allowBlank: false,
|
|
|
- columnWidth: 0.25
|
|
|
+ allowBlank: false
|
|
|
},{
|
|
|
xtype: 'textfield',
|
|
|
name: 'pr_detail',
|
|
|
fieldLabel: '物料名称',
|
|
|
- allowBlank: false,
|
|
|
- columnWidth: 0.25
|
|
|
+ allowBlank: false
|
|
|
},{
|
|
|
xtype: 'hidden',
|
|
|
name: 'pr_status',
|
|
|
- fieldLabel: '状态',
|
|
|
- allowBlank: true,
|
|
|
- columnWidth: 0.25
|
|
|
+ fieldLabel: '状态'
|
|
|
},{
|
|
|
xtype: 'hidden',
|
|
|
name: 'pr_statuscode',
|
|
|
- fieldLabel: '状态码',
|
|
|
- allowBlank: true,
|
|
|
- columnWidth: 0.25
|
|
|
+ fieldLabel: '状态码'
|
|
|
},{
|
|
|
xtype: 'textfield',
|
|
|
name: 'pr_spec',
|
|
|
fieldLabel: '规格',
|
|
|
- allowBlank: false,
|
|
|
- columnWidth: 0.25
|
|
|
- },{
|
|
|
+ allowBlank: false
|
|
|
+ },{
|
|
|
editable:false,
|
|
|
xtype : "remotecombo",
|
|
|
- storeUrl:'/api/document/productunit/getCombo',
|
|
|
- name : "pr_unit",
|
|
|
- fieldLabel : "单位",
|
|
|
+ storeUrl:'/api/document/producttype/getCombo',
|
|
|
+ name : "pr_kind",
|
|
|
+ fieldLabel : "类型",
|
|
|
allowBlank : false,
|
|
|
- columnWidth : 0.25,
|
|
|
- editable:false,
|
|
|
addHandler:function(b){
|
|
|
var document = Ext.create('saas.view.document.kind.Kind',{});
|
|
|
var form = this.ownerCmp.ownerCt;
|
|
|
this.dialog = form.getController().getView().add({
|
|
|
xtype: 'document-kind-childwin',
|
|
|
bind: {
|
|
|
- title: '新增物料单位'
|
|
|
+ title: '新增物料类型'
|
|
|
},
|
|
|
- dataKind:'productunit',
|
|
|
- belong:document.etc['productunit'],
|
|
|
+ dataKind:'productkind',
|
|
|
+ belong:document.etc['productkind'],
|
|
|
_parent:form,
|
|
|
_combo:this.ownerCmp,
|
|
|
record:null,
|
|
|
@@ -87,37 +76,25 @@ Ext.define('saas.view.document.product.FormPanel', {
|
|
|
this.dialog.show();
|
|
|
}
|
|
|
},{
|
|
|
- xtype : "dbfindtrigger",
|
|
|
- name : "pr_vendcode",
|
|
|
- bind : "{pr_vendcode}",
|
|
|
- fieldLabel : "供应商编号",
|
|
|
- allowBlank : true,
|
|
|
- columnWidth : 0.25,
|
|
|
- }, {
|
|
|
- xtype : "textfield",
|
|
|
- name : "pr_vendname",
|
|
|
- bind : "{pr_vendname}",
|
|
|
- fieldLabel : "供应商名称",
|
|
|
- allowBlank : true,
|
|
|
- columnWidth : 0.25
|
|
|
+ xtype: 'textfield',
|
|
|
+ name: 'pr_orispeccode',
|
|
|
+ fieldLabel: '型号'
|
|
|
},{
|
|
|
editable:false,
|
|
|
xtype : "remotecombo",
|
|
|
- storeUrl:'/api/document/producttype/getCombo',
|
|
|
- name : "pr_kind",
|
|
|
- fieldLabel : "类型",
|
|
|
- allowBlank : false,
|
|
|
- columnWidth : 0.25,
|
|
|
+ storeUrl:'/api/document/productbrand/getCombo',
|
|
|
+ name : "pr_brand",
|
|
|
+ fieldLabel : "品牌",
|
|
|
addHandler:function(b){
|
|
|
var document = Ext.create('saas.view.document.kind.Kind',{});
|
|
|
var form = this.ownerCmp.ownerCt;
|
|
|
this.dialog = form.getController().getView().add({
|
|
|
xtype: 'document-kind-childwin',
|
|
|
bind: {
|
|
|
- title: '新增物料类型'
|
|
|
+ title: '新增物料品牌'
|
|
|
},
|
|
|
- dataKind:'productkind',
|
|
|
- belong:document.etc['productkind'],
|
|
|
+ dataKind:'productbrand',
|
|
|
+ belong:document.etc['productbrand'],
|
|
|
_parent:form,
|
|
|
_combo:this.ownerCmp,
|
|
|
record:null,
|
|
|
@@ -125,30 +102,24 @@ Ext.define('saas.view.document.product.FormPanel', {
|
|
|
});
|
|
|
this.dialog.show();
|
|
|
}
|
|
|
- },{
|
|
|
- xtype: 'textfield',
|
|
|
- name: 'pr_orispeccode',
|
|
|
- fieldLabel: '型号',
|
|
|
- allowBlank: true,
|
|
|
- columnWidth: 0.25
|
|
|
- },{
|
|
|
+ },{
|
|
|
editable:false,
|
|
|
xtype : "remotecombo",
|
|
|
- storeUrl:'/api/document/productbrand/getCombo',
|
|
|
- name : "pr_brand",
|
|
|
- fieldLabel : "物料品牌",
|
|
|
- allowBlank : true,
|
|
|
- columnWidth : 0.25,
|
|
|
+ storeUrl:'/api/document/productunit/getCombo',
|
|
|
+ name : "pr_unit",
|
|
|
+ fieldLabel : "单位",
|
|
|
+ allowBlank : false,
|
|
|
+ editable:false,
|
|
|
addHandler:function(b){
|
|
|
var document = Ext.create('saas.view.document.kind.Kind',{});
|
|
|
var form = this.ownerCmp.ownerCt;
|
|
|
this.dialog = form.getController().getView().add({
|
|
|
xtype: 'document-kind-childwin',
|
|
|
bind: {
|
|
|
- title: '新增物料品牌'
|
|
|
+ title: '新增物料单位'
|
|
|
},
|
|
|
- dataKind:'productbrand',
|
|
|
- belong:document.etc['productbrand'],
|
|
|
+ dataKind:'productunit',
|
|
|
+ belong:document.etc['productunit'],
|
|
|
_parent:form,
|
|
|
_combo:this.ownerCmp,
|
|
|
record:null,
|
|
|
@@ -156,103 +127,200 @@ Ext.define('saas.view.document.product.FormPanel', {
|
|
|
});
|
|
|
this.dialog.show();
|
|
|
}
|
|
|
- },{
|
|
|
- xtype : "hidden",
|
|
|
- name : "pr_vendid",
|
|
|
- bind : "{pr_vendid}",
|
|
|
- fieldLabel : "供应商ID",
|
|
|
- allowBlank : true,
|
|
|
- columnWidth : 0
|
|
|
},{
|
|
|
xtype : "hidden",
|
|
|
name : "pr_whid",
|
|
|
- bind : "{pr_whid}",
|
|
|
- fieldLabel : "仓库ID",
|
|
|
- allowBlank : true,
|
|
|
- columnWidth : 0
|
|
|
+ fieldLabel : "仓库ID"
|
|
|
},{
|
|
|
xtype : "dbfindtrigger",
|
|
|
name : "pr_whcode",
|
|
|
- bind : "{pr_whcode}",
|
|
|
fieldLabel : "仓库编号",
|
|
|
- allowBlank : true,
|
|
|
- columnWidth : 0.25,
|
|
|
}, {
|
|
|
xtype : "textfield",
|
|
|
name : "pr_whname",
|
|
|
fieldLabel : "仓库名称",
|
|
|
allowBlank : true,
|
|
|
columnWidth : 0.25
|
|
|
+ },{
|
|
|
+ xtype : "hidden",
|
|
|
+ name : "pr_vendid",
|
|
|
+ fieldLabel : "供应商ID",
|
|
|
+ columnWidth : 0
|
|
|
+ },{
|
|
|
+ xtype : "dbfindtrigger",
|
|
|
+ name : "pr_vendcode",
|
|
|
+ fieldLabel : "供应商编号"
|
|
|
+ }, {
|
|
|
+ xtype : "textfield",
|
|
|
+ name : "pr_vendname",
|
|
|
+ fieldLabel : "供应商名称"
|
|
|
},{
|
|
|
xtype : "numberfield",
|
|
|
- bind : "{pr_standardprice}",
|
|
|
name : "pr_standardprice",
|
|
|
fieldLabel : "标准单价",
|
|
|
allowBlank : true,
|
|
|
columnWidth : 0.25,
|
|
|
decimalPrecision: 8,
|
|
|
- minValue:0,
|
|
|
- renderer : function(v) {
|
|
|
- var arr = (v + '.').split('.');
|
|
|
- var xr = (new Array(arr[1].length)).fill('0');
|
|
|
- var format = '0.' + xr.join();
|
|
|
- return Ext.util.Format.number(v, format);
|
|
|
- },
|
|
|
+ minValue:0
|
|
|
},{
|
|
|
ignore:true,
|
|
|
readOnly:true,
|
|
|
xtype : "numberfield",
|
|
|
- bind : "{pr_purcprice}",
|
|
|
name : "pr_purcprice",
|
|
|
fieldLabel : "最新采购单价",
|
|
|
allowBlank : true,
|
|
|
columnWidth : 0.25,
|
|
|
decimalPrecision: 8,
|
|
|
- minValue:0,
|
|
|
- renderer : function(v) {
|
|
|
- var arr = (v + '.').split('.');
|
|
|
- var xr = (new Array(arr[1].length)).fill('0');
|
|
|
- var format = '0.' + xr.join();
|
|
|
- return Ext.util.Format.number(v, format);
|
|
|
- },
|
|
|
+ minValue:0
|
|
|
},{
|
|
|
ignore:true,
|
|
|
readOnly:true,
|
|
|
xtype : "numberfield",
|
|
|
name : "pr_saleprice",
|
|
|
fieldLabel : "最新出货单价",
|
|
|
- allowBlank : true,
|
|
|
- columnWidth : 0.25,
|
|
|
decimalPrecision: 8,
|
|
|
- minValue:0,
|
|
|
- renderer : function(v) {
|
|
|
- var arr = (v + '.').split('.');
|
|
|
- var xr = (new Array(arr[1].length)).fill('0');
|
|
|
- var format = '0.' + xr.join();
|
|
|
- return Ext.util.Format.number(v, format);
|
|
|
- },
|
|
|
+ minValue:0
|
|
|
},{
|
|
|
xtype : "numberfield",
|
|
|
name : "pr_zxbzs",
|
|
|
fieldLabel : "最小包装数",
|
|
|
minValue:0,
|
|
|
decimalPrecision: 0,
|
|
|
- allowBlank : true,
|
|
|
- columnWidth : 0.25
|
|
|
+ allowBlank : true
|
|
|
},{
|
|
|
hidden:true,
|
|
|
xtype : "datefield",
|
|
|
name : "createTime",
|
|
|
- fieldLabel : "创建时间",
|
|
|
- allowBlank : true,
|
|
|
- columnWidth : 0.25
|
|
|
+ fieldLabel : "创建时间"
|
|
|
},{
|
|
|
hidden:true,
|
|
|
xtype : "datefield",
|
|
|
name : "updateTime",
|
|
|
- fieldLabel : "更新时间",
|
|
|
- allowBlank : true,
|
|
|
- columnWidth : 0.25
|
|
|
+ fieldLabel : "更新时间"
|
|
|
+ },{
|
|
|
+ xtype : "detailGridField",
|
|
|
+ storeModel:'saas.model.document.ProductDetail',
|
|
|
+ detnoColumn: 'pd_detno',
|
|
|
+ showCount: false,
|
|
|
+ deleteDetailUrl:'/api/document/customer/delete/',
|
|
|
+ columns : [{
|
|
|
+ text : "ID",
|
|
|
+ dataIndex : "id",
|
|
|
+ hidden : true,
|
|
|
+ xtype : "numbercolumn"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text : "物料ID",
|
|
|
+ dataIndex : "pd_prodid",
|
|
|
+ hidden : true,
|
|
|
+ xtype : "numbercolumn"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ allowBlank:false,
|
|
|
+ text : "仓库编号",
|
|
|
+ editor : {
|
|
|
+ displayField : "display",
|
|
|
+ editable : true,
|
|
|
+ format : "",
|
|
|
+ hideTrigger : false,
|
|
|
+ maxLength : 100.0,
|
|
|
+ minValue : null,
|
|
|
+ positiveNum : false,
|
|
|
+ queryMode : "local",
|
|
|
+ store : null,
|
|
|
+ valueField : "value",
|
|
|
+ xtype : "dbfindtrigger"
|
|
|
+ },
|
|
|
+ dataIndex : "pd_whcode",
|
|
|
+ xtype : "",
|
|
|
+ items : null
|
|
|
+ },
|
|
|
+ {
|
|
|
+ allowBlank:true,
|
|
|
+ readOnly:true,
|
|
|
+ editable:false,
|
|
|
+ text : "仓库名称",
|
|
|
+ dataIndex : "pd_whname",
|
|
|
+ xtype : "",
|
|
|
+ },{
|
|
|
+ allowBlank:true,
|
|
|
+ hidden:true,
|
|
|
+ text : "仓库ID",
|
|
|
+ dataIndex : "pd_whid",
|
|
|
+ xtype : "numberfield",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ allowBlank:true,
|
|
|
+ text : "期初数量",
|
|
|
+ dataIndex : "pd_num",
|
|
|
+ xtype: 'numbercolumn',
|
|
|
+ width : 120.0,
|
|
|
+ allowBlank : false,
|
|
|
+ editor : {
|
|
|
+ xtype : "numberfield",
|
|
|
+ decimalPrecision: 0,
|
|
|
+ minValue:0
|
|
|
+ },
|
|
|
+ renderer : function(v) {
|
|
|
+ var arr = (v + '.').split('.');
|
|
|
+ var xr = (new Array(arr[1].length)).fill('0');
|
|
|
+ var format = '0.' + xr.join();
|
|
|
+ return Ext.util.Format.number(v, format);
|
|
|
+ },
|
|
|
+ summaryType: 'sum',
|
|
|
+ summaryRenderer: function(v) {
|
|
|
+ var arr = (v + '.').split('.');
|
|
|
+ var xr = (new Array(arr[1].length)).fill('0');
|
|
|
+ var format = '0.' + xr.join();
|
|
|
+ return Ext.util.Format.number(v, format);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text : "单位成本",
|
|
|
+ dataIndex : "pd_price",
|
|
|
+ allowBlank:false,
|
|
|
+ xtype: 'numbercolumn',
|
|
|
+ width : 120.0,
|
|
|
+ allowBlank : false,
|
|
|
+ editor : {
|
|
|
+ xtype : "numberfield",
|
|
|
+ decimalPrecision: 8,
|
|
|
+ minValue:0
|
|
|
+ },
|
|
|
+ renderer : function(v) {
|
|
|
+ var arr = (v + '.').split('.');
|
|
|
+ var xr = (new Array(arr[1].length)).fill('0');
|
|
|
+ var format = '0.' + xr.join();
|
|
|
+ return Ext.util.Format.number(v, format);
|
|
|
+ },
|
|
|
+ summaryType: 'sum',
|
|
|
+ summaryRenderer: function(v) {
|
|
|
+ var arr = (v + '.').split('.');
|
|
|
+ var xr = (new Array(arr[1].length)).fill('0');
|
|
|
+ var format = '0.' + xr.join();
|
|
|
+ return Ext.util.Format.number(v, format);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text : "期初总价",
|
|
|
+ dataIndex : "pd_amount",
|
|
|
+ xtype: 'numbercolumn',
|
|
|
+ width : 120.0,
|
|
|
+ allowBlank : true,
|
|
|
+ renderer : function(v) {
|
|
|
+ var arr = (v + '.').split('.');
|
|
|
+ var xr = (new Array(arr[1].length)).fill('0');
|
|
|
+ var format = '0.' + xr.join();
|
|
|
+ return Ext.util.Format.number(v, format);
|
|
|
+ },
|
|
|
+ summaryType: 'sum',
|
|
|
+ summaryRenderer: function(v) {
|
|
|
+ var arr = (v + '.').split('.');
|
|
|
+ var xr = (new Array(arr[1].length)).fill('0');
|
|
|
+ var format = '0.' + xr.join();
|
|
|
+ return Ext.util.Format.number(v, format);
|
|
|
+ }
|
|
|
+ }]
|
|
|
}],
|
|
|
|
|
|
defaultButtons:[{
|