Ext.define('saas.view.stock.appropriationInOut.FormPanel', { extend: 'saas.view.core.form.FormPanel', xtype: 'stock-appropriationinout-formpanel', controller: 'stock-appropriationinout-formpanel', viewModel: 'stock-appropriationinout-formpanel', viewName: 'stock-appropriationinout-formpanel', caller:'AppropriationInOut', //字段属性 _title:'调拨单', _idField: 'id', _codeField: 'pi_inoutno', _statusField: 'pi_status', _statusCodeField: 'pi_statuscode', _relationColumn: 'pd_piid', _readUrl:'/api/storage/prodinout/read/', _saveUrl:'/api/storage/prodinout/save', _auditUrl:'/api/storage/prodinout/audit', _unAuditUrl: '/api/storage/prodinout/unAudit/', _deleteUrl:'/api/storage/prodinout/delete/', // _relationColumn: 'pd_piid', // _readUrl:'http://localhost:9000/prodinout/read/', // _saveUrl:'http://localhost:9000/prodinout/save', // _auditUrl:'http://localhost:9000/prodinout/audit', // _deleteUrl:'http://localhost:9000/prodinout/delete/', initId:0, toolBtns: [], defaultItems: [{ xtype: 'hidden', name: 'id', bind: '{id}', fieldLabel: 'id', allowBlank: true, columnWidth: 0 },{ xtype : "textfield", name : "pi_class", bind : "{pi_class}", fieldLabel : "单据类型", readOnly:true, allowBlank : true, columnWidth : 0.25 }, { xtype : "hidden", name : "pi_vendid", bind : "{pi_vendid}", fieldLabel : "供应商ID", allowBlank : true, columnWidth : 0.0 },{ xtype: 'hidden', name: 'pi_vendcode', bind: '{pi_vendcode}', fieldLabel: '供应商编号' }, { xtype: 'dbfindtrigger', name: 'pi_vendname', bind: '{pi_vendname}', fieldLabel: '供应商名称' },{ xtype : "hidden", name : "pi_custid", bind : "{pi_custid}", fieldLabel : "客户ID", allowBlank : true, columnWidth : 0.0 },{ xtype: 'hidden', name: 'pi_custcode', bind: '{pi_custcode}', fieldLabel: '客户编号' }, { xtype: 'dbfindtrigger', name: 'pi_custname', bind: '{pi_custname}', fieldLabel: '客户名称' },{ xtype : "datefield", name : "pi_date", bind : "{pi_date}", fieldLabel : "单据日期", allowBlank : false, columnWidth : 0.25, defaultValue: new Date() } // ,{ // xtype : "textfield", // name : "pi_total", // bind : "{pi_total}", // fieldLabel : "总额", // allowBlank : true, // readOnly: true, // columnWidth : 0.25 // } , { name : "detailGridField", xtype : "detailGridField", storeModel:'saas.model.purchase.ProdIODetail', // deleteDetailUrl:'http://localhost:9000/prodinout/deleteDetail/', deleteDetailUrl:'/api/storage/prodinout/deleteDetail/', detnoColumn: 'pd_pdno', columns : [ { text : "id", dataIndex : "id", xtype : "numbercolumn", hidden:true },{ text : "物料id", dataIndex : "pd_prodid", xtype : "numbercolumn", hidden:true }, { text : "物料编号", width : 200.0, dataIndex : "pd_prodcode", 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", ignore:true, renderer: function (v, m, r) { return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v; } }, { text : "规格", dataIndex : "pr_spec", ignore:true, renderer: function (v, m, r) { return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v; } }, { text : "数量", dataIndex : "pd_inqty", 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 : "拨出仓库id", dataIndex : "pd_whid", xtype : "numbercolumn", hidden:true }, { text : "拨出仓库编号", dataIndex : "pd_whcode", hidden:true }, { text : "拨出仓库", dataIndex : "pd_whname", width : 120.0, items : null, editor : { displayField : "display", editable : true, format : "", hideTrigger : false, maxLength : 100.0, minValue : null, positiveNum : false, queryMode : "local", store : null, valueField : "value", xtype : "dbfindtrigger" } },{ text : "拨入仓库id", dataIndex : "pd_inwhid", xtype : "numbercolumn", hidden:true }, { text : "拨入仓库编号", dataIndex : "pd_inwhcode", hidden:true }, { text : "拨入仓库", dataIndex : "pd_inwhname", width : 120.0, items : null, 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 : "pd_orderprice", // editor : { // xtype : "numberfield" // }, // width : 120.0, // xtype : "numbercolumn", // items : null // }, // { // text : "含税金额", // dataIndex : "pd_total", // width : 120.0, // xtype : "numbercolumn" // }, { // text : "税率", // dataIndex : "pd_taxrate", // editor : { // xtype : "numberfield" // }, // width : 120.0, // xtype : "numbercolumn", // items : null // }, // { // text : "未税金额", // dataIndex : "pd_nettotal", // xtype : "numbercolumn" // } ] }, { xtype : "datefield", name : "createTime", bind : "{createTime}", fieldLabel : "录入日期", allowBlank : true, columnWidth : 0.25 }, { xtype : "datefield", name : "updateTime", bind : "{updateTime}", fieldLabel : "更新日期", allowBlank : true, columnWidth : 0.25 }, { xtype : "textfield", readOnly : true, editable : false, name : "pi_status", bind : "{pi_status}", fieldLabel : "单据状态", allowBlank : true, columnWidth : 0.25 }, { xtype : "hidden", readOnly : true, editable : false, name : "pi_statuscode", bind : "{pi_statuscode}", fieldLabel : "单据状态码", allowBlank : true, columnWidth : 0.0 }] });