|
|
@@ -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,35 +76,25 @@ Ext.define('saas.view.document.product.FormPanel', {
|
|
|
this.dialog.show();
|
|
|
}
|
|
|
},{
|
|
|
- xtype : "dbfindtrigger",
|
|
|
- name : "pr_vendcode",
|
|
|
- fieldLabel : "供应商编号",
|
|
|
- allowBlank : true,
|
|
|
- columnWidth : 0.25,
|
|
|
- }, {
|
|
|
- xtype : "textfield",
|
|
|
- name : "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,
|
|
|
@@ -123,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,
|
|
|
@@ -154,103 +127,76 @@ 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 : "更新时间"
|
|
|
}],
|
|
|
|
|
|
defaultButtons:[{
|