Ext.define('saas.view.sale.sale.FormPanel', { extend: 'saas.view.core.form.FormPanel', xtype: 'sale-sale-formpanel', controller: 'sale-sale-formcontroller', viewModel: 'sale-sale-formmodel', caller:'Sale', //字段属性 _title:'销售订单', _idField: 'id', _codeField: 'sa_code', _statusField: 'sa_status', _statusCodeField: 'sa_statuscode', _detnoColumn: 'sd_detno', _relationColumn: 'sd_puid', _readUrl:'', _saveUrl:'', _auditUrl:'', _deleteUrl:'', _deleteDetailUrl:'', _turnInUrl:'', _turnOutUrl:'', initId:0, toolBtns: [{ xtype: 'button', text: '转出货单', handler: 'turnIn' }], defaultItems: [{ xtype: 'hidden', name: 'id', bind: '{id}', fieldLabel: 'id', allowBlank: true, columnWidth: 0 }, { xtype : "textfield", name : "sa_code", bind : "{sa_code}", fieldLabel : "销售单号", allowBlank : true, columnWidth : 0.25 }, { xtype : "hidden", name : "sa_cudid", bind : "{sa_cudid}", fieldLabel : "客户ID", allowBlank : true, columnWidth : 0.0 }, { xtype : "textfield", name : "sa_cucode", bind : "{sa_cucode}", fieldLabel : "客户编号", hidden:true, allowBlank : true, columnWidth : 0, }, { xtype : "dbfindtrigger", name : "sa_cuname", bind : "{sa_cuname}", fieldLabel : "客户名称", allowBlank : true, columnWidth : 0.25 },{ xtype : "datefield", name : "sa_recorddate", bind : "{sa_recorddate}", fieldLabel : "订单日期", allowBlank : false, columnWidth : 0.25 }, { xtype : "textfield", name : "sa_recorder", bind : "{sa_recorder}", fieldLabel : "录入人", allowBlank : true, readOnly:true, columnWidth : 0.0 }, { xtype : "textfield", name : "sa_toplace", bind : "{sa_toplace}", fieldLabel : "交货地址", allowBlank : true, columnWidth : 0.25 }, { xtype : "textfield", name : "sa_total", bind : "{sa_total}", fieldLabel : "单据金额", allowBlank : true, columnWidth : 0.25 }, { xtype : "textfield", name : "sa_remark", bind : "{sa_remark}", fieldLabel : "备注", allowBlank : true, columnWidth : 1 },{ xtype : "textfield", name : "sa_sendstatus", bind : "{sa_sendstatus}", fieldLabel : "出货状态", allowBlank : true, readOnly:true, columnWidth : 0 }, { name : "detailGridField", xtype : "detailGridField", columns : [ { text : "序号", dataIndex : "sd_detno", 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 : "物料编号", width : 200.0, dataIndex : "sd_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 }, { text : "规格", dataIndex : "pr_spec", ignore:true }, { text : "数量", dataIndex : "sd_qty", editor : { xtype : "numberfield" }, width : 120.0, xtype : "numbercolumn", format:'0', items : null, summaryType: 'sum' }, { text : "单价", editor : { xtype : "numberfield" }, format:'0,000.00', dataIndex : "sd_price", width : 120.0, xtype : "numbercolumn", items : null, summaryType: 'sum' }, { text : "税率", editor : { xtype : "numberfield" }, dataIndex : "sd_taxrate", width : 120.0, xtype : "numbercolumn", items : null }, { text : "含税金额", dataIndex : "sd_total", width : 120.0, xtype : "numbercolumn" }, { text : "未税金额", dataIndex : "sd_nettotal", xtype : "numbercolumn" },{ text : "交货日期", dataIndex : "sd_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 : "sd_yqty", editor : { xtype : "numberfield" }, width : 120.0, xtype : "numbercolumn", format:'0', items : null, summaryType: 'sum' }, ] }, { 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 : "sa_status", bind : "{sa_status}", fieldLabel : "单据状态", allowBlank : true, columnWidth : 0.25 }, { xtype : "hidden", readOnly : true, editable : false, name : "sa_statuscode", bind : "{sa_statuscode}", fieldLabel : "单据状态码", allowBlank : true, columnWidth : 0.0 }] });