Ext.define('saas.view.sale.saleIn.FormPanel', { extend: 'saas.view.core.form.FormPanel', xtype: 'sale-salein-formpanel', controller: 'sale-salein-formpanel', viewModel: 'sale-salein-formpanel', viewName: 'sale-salein-formpanel', caller:'SaleIn', //字段属性 _title:'销售退货单', _idField: 'id', _codeField: 'pi_inoutno', _statusField: 'pi_status', _statusCodeField: 'pi_statuscode', _relationColumn: 'pd_piid', _readUrl:'/api/sale/prodinout/read/', _saveUrl:'/api/sale/prodinout/save', _auditUrl:'/api/sale/prodinout/audit', _unAuditUrl: '/api/sale/prodinout/unAudit', _deleteUrl:'/api/sale/prodinout/delete/', _turnInUrl:'/api/sale/prodinout/turnProdIn/', initId:0, defaultItems: [{ xtype: 'hidden', name: 'id', fieldLabel: 'id' }, { xtype : "textfield", name : "pi_class", fieldLabel : "单据类型", readOnly:true, allowBlank : false, defaultValue:'销售退货单' },{ xtype : "hidden", name : "pi_custid", fieldLabel : "客户ID" },{ xtype : "hidden", name : "pi_custcode", fieldLabel : "客户编号" }, { xtype : "dbfindtrigger", name : "pi_custname", fieldLabel : "客户名称" }, { xtype : "textfield", name : "pi_address", fieldLabel : "交货地址", columnWidth : 0.5 }, { name : "detailGridField", xtype : "detailGridField", detnoColumn: 'pd_pdno', storeModel:'saas.model.sale.ProdIODetail', deleteDetailUrl:'/api/sale/prodinout/deleteDetail/', columns : [ { text : "id", dataIndex : "id", xtype : "numbercolumn", width:0 }, { text : "物料id", dataIndex : "pd_prodid", width :0 }, { text : "物料编号", width : 200.0, dataIndex : "pd_prodcode", 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, width : 150.0, renderer: function (v, m, r) { return r.data["product"]?r.data["product"][m.column.dataIndex]:v; } }, { text : "规格", dataIndex : "pr_spec", ignore:true, width : 150.0, 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', summaryType: 'sum' }, { text : "已转数", dataIndex : "pd_yqty", width : 120.0, xtype : "numbercolumn", format:'0', summaryType: 'sum' }, { text : "仓库", dataIndex : "pd_whname", width : 120.0, 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_sendprice", width : 120.0, editor : { xtype : "numberfield" }, xtype : "numbercolumn", }, { text : "含税金额", dataIndex : "pd_total", width : 120.0, xtype : "numbercolumn" }, { text : "税率", dataIndex : "pd_taxrate", width : 120.0, editor : { xtype : "numberfield" }, xtype : "numbercolumn", items : null }, { text : "未税金额", dataIndex : "pd_nettotal", xtype : "numbercolumn" }, { text : "销售订单明细id", dataIndex : "pd_sdid", width : 120.0, hidden:true }, { text : "销售单号", dataIndex : "pd_ordercode", width : 120.0 },{ text : "销售序号", dataIndex : "pd_orderdetno", xtype : "numbercolumn", flex:1 } ] }, { xtype : "textfield", name : "pi_total", fieldLabel : "总额", readOnly: true }, { xtype : "textfield", name : "pi_recordman", fieldLabel : "录入人", readOnly:true }, { format : "Y-m-d", xtype : "datefield", name : "createTime", fieldLabel : "录入日期", readOnly:true }, { xtype : "textfield", name : "pi_auditman", fieldLabel : "审核人", readOnly:true }, { format : "Y-m-d", xtype : "datefield", name : "pi_auditdate", fieldLabel : "审核日期", readOnly:true }] });