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/purchase/purchase/read/', _saveUrl:'/api/purchase/purchase/save', _auditUrl:'/api/purchase/purchase/audit', _deleteUrl:'/api/purchase/purchase/delete/', _turnInUrl:'/api/purchase/prodinout/turnProdin/', initId:0, toolBtns: [], defaultItems: [{ xtype: 'hidden', name: 'id', fieldLabel: 'id', columnWidth: 0 }, { xtype : "textfield", name : "ma_code", fieldLabel : "制造单号", columnWidth: 0.2 }, { xtype : "textfield", name : "ma_type", fieldLabel : "类型", columnWidth: 0.2 },{ xtype: 'hidden', name: 'ma_prodid', fieldLabel: '产品id', columnWidth: 0 },{ xtype : "textfield", name : "ma_prodcode", fieldLabel : "产品编号", columnWidth: 0.2 },{ xtype : "textfield", name : "ma_proddetail", fieldLabel : "名称", columnWidth: 0.2 },{ xtype : "textfield", name : "ma_prodspec", fieldLabel : "规格", columnWidth: 0.2 },{ xtype : "textfield", name : "ma_version", fieldLabel : "版本", columnWidth: 0.2 },{ xtype : "textfield", name : "ma_produnit", fieldLabel : "单位", columnWidth: 0.2 }, { xtype : "textfield", name : "ma_qty", fieldLabel : "数量", columnWidth: 0.2 },{ xtype : "hidden", name : "ma_whid", fieldLabel : "仓库id", columnWidth: 0.2 },{ xtype : "textfield", name : "ma_whcode", fieldLabel : "仓库", columnWidth: 0.2 },{ name : "detailGridField", xtype : "detailGridField", storeModel:'saas.model.document.Product', detnoColumn: 'pd_detno', deleteDetailUrl:'/api/purchase/purchase/deleteDetail/', columns : [ { text : "id", dataIndex : "id", xtype : "numbercolumn" }, { text : "mm_prodidid", dataIndex : "mm_prodid", xtype : "numbercolumn" }, { text : "物料编号", width : 200.0, dataIndex : "mm_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 : "dbfindtrigger" } }, { text : "名称", dataIndex : "pr_detail", ignore:true, renderer: function (v, m, r) { return r.data["product"]?r.data["product"][m.column.dataIndex]:''; } }, { text : "规格", dataIndex : "pr_spec", ignore:true, renderer: function (v, m, r) { return r.data["product"]?r.data["product"][m.column.dataIndex]:''; } }, { text : "数量", dataIndex : "pd_qty", editor : { xtype : "numberfield" }, width : 120.0, xtype : "numbercolumn", format:'0', items : null, summaryType: 'sum' }, { text : "已转数", dataIndex : "pd_yqty", editor : { xtype : "numberfield" }, width : 120.0, xtype : "numbercolumn", format:'0', items : null, summaryType: 'sum' }, { text : "单价", editor : { xtype : "numberfield" }, format:'0,000.00', dataIndex : "pd_price", width : 120.0, xtype : "numbercolumn", items : null, summaryType: 'sum' }, { text : "税率", editor : { xtype : "numberfield" }, dataIndex : "pd_taxrate", width : 120.0, xtype : "numbercolumn", items : null }, { text : "含税金额", dataIndex : "pd_total", width : 120.0, xtype : "numbercolumn" }, { text : "未税金额", dataIndex : "pd_taxtotal", xtype : "numbercolumn" },{ text : "需求日期", dataIndex : "pd_delivery", flex : 1.0, xtype:'datecolumn', format : "Y-m-d H:i:s", editor : { xtype : "datefield", editable : true, format : "Y-m-d H:i:s", hideTrigger : false } }, { text : "关联销售单号", dataIndex : "pd_salecode", width : 120.0, flex : 1.0 } ] },{ format : "Y-m-d", xtype : "datefield", name : "createTime", bind : "{createTime}", fieldLabel : "制单日", allowBlank : true, columnWidth : 0.25 },{ xtype : "textfield", name : "ma_recorder", fieldLabel : "制单人", columnWidth: 0.2 },{ xtype : "numberfield", name : "ma_price", fieldLabel : "单位成本", columnWidth: 0.2 },{ xtype : "numberfield", name : "ma_total", 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 }] });