| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357 |
- Ext.define('saas.view.stock.make.FormPanel', {
- extend: 'saas.view.core.form.FormPanel',
- xtype: 'stock-make-formpanel',
- controller: 'stock-make-formpanel',
- viewModel: 'stock-make-formpanel',
- viewName: 'stock-make-formpanel',
- caller:'Make',
-
- //字段属性
- _title:'制造单',
- _idField: 'id',
- _codeField: 'ma_code',
- _statusField: 'ma_status',
- _statusCodeField: 'ma_statuscode',
- _relationColumn: 'mm_maid',
- _readUrl:'/api/storage/make/read/',
- _saveUrl:'/api/storage/make/save',
- _auditUrl:'/api/storage/make/audit',
- _unAuditUrl: '/api/storage/make/unAudit/',
- _deleteUrl:'/api/storage/make/delete/',
- _getBomUrl:'/api/document/bom/read/',
- initId:0,
-
- toolBtns: [],
- defaultItems: [{
- xtype: 'hidden',
- name: 'id',
- fieldLabel: 'id',
- columnWidth: 0
- },{
- xtype: 'combobox',
- name: 'ma_type',
- columnWidth: 0.25,
- fieldLabel: '类型',
- queryMode: 'local',
- displayField: 'name',
- valueField: 'value',
- editable:false,
- store: Ext.create('Ext.data.ArrayStore', {
- fields: ['name', 'value'],
- data: [
- ["拆件", "拆件"],
- ["组装", "组装"],
- ]
- })
- },{
- xtype: 'hidden',
- name: 'ma_prodid',
- fieldLabel: '产品id'
- },{
- xtype : "dbfindtrigger",
- editable:false,
- name : "ma_prodcode",
- fieldLabel : "产品编号",
- allowBlank : false,
- columnWidth: 0.25
- },{
- xtype : "textfield",
- name : "ma_proddetail",
- fieldLabel : "名称",
- columnWidth: 0.25
- },{
- xtype : "textfield",
- name : "ma_prodspec",
- fieldLabel : "规格",
- columnWidth: 0.25
- },{
- xtype : "textfield",
- name : "ma_version",
- fieldLabel : "版本",
- columnWidth: 0.25
- },{
- xtype : "textfield",
- name : "ma_produnit",
- fieldLabel : "单位",
- columnWidth: 0.25
- },
- {
- xtype : "numberfield",
- name : "ma_qty",
- fieldLabel : "数量",
- columnWidth: 0.25,
- allowBlank : false,
- minValue:0
- },{
- xtype : "hidden",
- name : "ma_whid",
- fieldLabel : "仓库id"
- },{
- xtype : "hidden",
- name : "ma_whcode",
- fieldLabel : "仓库编号"
- },{
- xtype : "dbfindtrigger",
- name : "ma_whname",
- fieldLabel : "仓库名称",
- allowBlank : false,
- columnWidth: 0.25
- },{
- xtype : "numberfield",
- name : "ma_price",
- fieldLabel : "单位成本",
- decimals:8,
- columnWidth: 0.25
- },{
- xtype : "numberfield",
- name : "ma_total",
- fieldLabel : "总成本",
- decimals:2,
- columnWidth: 0.25
- },
- {
- name : "detailGridField",
- xtype : "detailGridField",
- storeModel:'saas.model.stock.Makematerial',
- detnoColumn: 'mm_detno',
- deleteDetailUrl:'/api/storage/make/deleteDetail/',
- columns : [
- {
- text : "id",
- dataIndex : "id",
- xtype : "numbercolumn",
- hidden:true
- },
- {
- text : "mm_prodidid",
- dataIndex : "mm_prodid",
- xtype : "numbercolumn",
- hidden:true
- },
- {
- text : "物料编号",
- width : 200.0,
- dataIndex : "mm_prodcode",
- allowBlank : false,
- xtype : "",
- items : null,
- editor : {
- displayField : "display",
- editable : true,
- format : "",
- hideTrigger : false,
- maxLength : 100.0,
- minValue : null,
- positiveNum : false,
- queryMode : "local",
- store : null,
- valueField : "value",
- xtype : "multidbfindtrigger"
- }
- },{
- text: 'model映射需要',
- dataIndex: 'productDTO',
- hidden: true,
- },
- {
- text : "名称",
- dataIndex : "pr_detail",
- width : 100.0,
- ignore:true,
- renderer: function (v, m, r) {
- return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
- }
- },
- {
- text : "规格",
- dataIndex : "pr_spec",
- width : 100.0,
- ignore:true,
- renderer: function (v, m, r) {
- return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
- }
- },
- {
- text : "单位",
- dataIndex : "pr_unit",
- width : 100.0,
- ignore:true,
- renderer: function (v, m, r) {
- return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:'';
- }
- },
- {
- text : "需求数量",
- dataIndex : "mm_qty",
- width : 120.0,
- 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 : "mm_oneuseqty",
- width : 120.0,
- editor : {
- xtype : "numberfield",
- decimalPrecision: 8,
- editable:false,
- 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 : "仓库id",
- dataIndex : "mm_whid",
- xtype : "numbercolumn",
- hidden:true
- },
- {
- text : "仓库编号",
- dataIndex : "mm_whcode",
- hidden:true
- },
- {
- text : "仓库",
- dataIndex : "mm_whname",
- width : 120.0,
- items : null,
- allowBlank : false,
- editor : {
- displayField : "display",
- editable : true,
- format : "",
- hideTrigger : false,
- maxLength : 100.0,
- minValue : null,
- positiveNum : false,
- queryMode : "local",
- store : null,
- valueField : "value",
- xtype : "dbfindtrigger"
- }
- },{
- text : "出库单位成本",
- dataIndex : "mm_price",
- width : 120.0,
- editor : {
- xtype : "numberfield",
- decimalPrecision: 8,
- minValue:0
- },
- listeners:{
- edit:'price_change'
- },
- renderer : function(v) {
- var arr = (v + '.').split('.');
- var xr = (new Array(arr[1].length)).fill('0');
- var format = '0,000.' + xr.join();
- return Ext.util.Format.number(v, format);
- }
- }, {
- text : "出库成本",
- dataIndex : "mm_amount",
- width : 120.0,
- editor : {
- xtype : "numberfield",
- decimalPrecision: 2,
- editable : false
- },
- renderer : function(v) {
- var arr = (v + '.').split('.');
- var xr = (new Array(arr[1].length)).fill('0');
- var format = '0,000.' + 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,000.' + xr.join();
- return Ext.util.Format.number(v, format);
- }
- },{
- text : "替代料",
- dataIndex : "mm_repprodcode",
- width : 200.0,
- editor : {
- xtype : "textfield"
- },
-
- }, {
- text : "备注",
- dataIndex : "mm_remark",
- width : 250,
- editor : {
- xtype : "textfield"
- },
- }]
- },{
- xtype : "datefield",
- name : "createTime",
- fieldLabel : "录入日期",
- readOnly:true,
- columnWidth : 0.25
- },{
- xtype : "textfield",
- name : "ma_recorder",
- fieldLabel : "录入人",
- columnWidth: 0.2
- },{
- xtype : "datefield",
- name : "updateTime",
- bind : "{updateTime}",
- fieldLabel : "更新日期",
- allowBlank : true,
- columnWidth : 0.25
- }, {
- xtype : "textfield",
- readOnly : true,
- editable : false,
- name : "ma_status",
- bind : "{ma_status}",
- fieldLabel : "单据状态",
- allowBlank : true,
- columnWidth : 0.25
- }, {
- xtype : "hidden",
- readOnly : true,
- editable : false,
- name : "ma_statuscode",
- bind : "{ma_statuscode}",
- fieldLabel : "单据状态码",
- allowBlank : true,
- columnWidth : 0.0
- }]
- });
|