Ext.define('saas.view.purchase.purchaseIn.FormPanel', { extend: 'saas.view.core.form.FormPanel', xtype: 'purchase-purchasein-formpanel', controller: 'purchase-purchasein-formpanel', viewModel: 'purchase-purchasein-formpanel', viewName: 'purchase-purchasein-formpanel', caller:'PurchaseIn', //字段属性 _title:'采购验收单', _idField: 'id', _codeField: 'pi_inoutno', _statusField: 'pi_status', _statusCodeField: 'pi_statuscode', _relationColumn: 'pd_piid', _readUrl:basePath+'purchase/prodinout/read/', _saveUrl:basePath+'purchase/prodinout/save', _auditUrl:basePath+'purchase/prodinout/audit', _deleteUrl:basePath+'purchase/prodinout/delete/', _deleteDetailUrl:basePath+'purchase/prodinout/deleteItem/', _baseVastUrl:basePath+'purchase/prodinout/', _turnOutUrl:basePath+'purchase/prodinout/turnProdOut/', initId:0, toolBtns: [{ xtype: 'button', text: '转采购验退单', handler: 'turnOut' }], defaultItems: [{ xtype: 'hidden', name: 'id', bind: '{id}', fieldLabel: 'id', allowBlank: true, columnWidth: 0 }, { xtype : "textfield", name : "pi_inoutno", bind : "{pi_inoutno}", fieldLabel : "验收单号", allowBlank : true, columnWidth : 0.25 },{ 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: 'pu_vendcode', bind: '{pu_vendcode}', fieldLabel: '供应商编号' }, { xtype: 'dbfindtrigger', name: 'pu_vendname', bind: '{pu_vendname}', fieldLabel: '供应商名称' },{ xtype : "datefield", name : "pi_date", bind : "{pi_date}", fieldLabel : "单据日期", allowBlank : false, columnWidth : 0.25 },{ xtype : "textfield", name : "pi_total", bind : "{pi_total}", fieldLabel : "总额", allowBlank : true, readOnly: true, columnWidth : 0.25 }, { xtype : "hidden", name : "pi_puid", bind : "{pi_puid}", fieldLabel : "采购单id", allowBlank : true, columnWidth : 0.25 },{ xtype : "textfield", name : "pi_pucode", bind : "{pi_pucode}", fieldLabel : "采购单号", allowBlank : true, columnWidth : 0.25 }, { name : "detailGridField", xtype : "detailGridField", storeModel:'saas.model.purchase.ProdIODetail', _detnoColumn: 'pd_pdno', columns : [ { text : "序号", dataIndex : "pd_pdno", width : 100, xtype : "numbercolumn", align : 'center', format:'0', summaryType: 'count', summaryRenderer: function(value, summaryData, dataIndex) { return Ext.String.format('合计: {0}条', value); }, }, { text : "id", dataIndex : "id", xtype : "numbercolumn" },{ 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 : "dbfindtrigger" } }, { text : "名称", dataIndex : "pr_detail", ignore:true, renderer: function (v, m, r) { return r.data["product"]?r.data["product"][m.column.dataIndex]:v; } }, { text : "规格", dataIndex : "pr_spec", ignore:true, renderer: function (v, m, r) { return r.data["product"]?r.data["product"][m.column.dataIndex]:v; } }, { text : "数量", dataIndex : "pd_inqty", 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 : "仓库", 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 : "单价", dataIndex : "pd_orderprice", width : 120.0, xtype : "numbercolumn", items : null }, { text : "含税金额", dataIndex : "pd_total", width : 120.0, xtype : "numbercolumn" }, { text : "税率", dataIndex : "pd_taxrate", width : 120.0, xtype : "numbercolumn", items : null }, { text : "未税金额", dataIndex : "pd_nettotal", xtype : "numbercolumn" }, { text : "采购单明细id", dataIndex : "pd_orderid", width : 120.0, hidden:true }, { text : "采购单号", dataIndex : "pd_ordercode", width : 120.0 },{ text : "采购序号", dataIndex : "pd_orderdetno", xtype : "numbercolumn", flex:1 } ] }, { format : "Y-m-d", 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 }] });