| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- Ext.define('saas.view.purchase.purchase.FormPanel', {
- extend: 'saas.view.core.form.FormPanel',
- xtype: 'purchase-purchase-formpanel',
- controller: 'purchase-purchase-formpanel',
- viewModel: 'purchase-purchase-formpanel',
- viewName: 'purchase-purchase-formpanel',
- caller:'Purchase',
-
- //字段属性
- _title:'采购单',
- _idField: 'id',
- _codeField: 'pu_code',
- _statusField: 'pu_status',
- _statusCodeField: 'pu_statuscode',
- _relationColumn: 'pd_puid',
- // _readUrl:'/api/purchase/purchase/read/',
- // _saveUrl:'/api/purchase/purchase/save/',
- // _auditUrl:'/api/purchase/purchase/audit/',
- // _unAuditUrl: '/api/purchase/purchase/unAudit/',
- // _deleteUrl:'/api/purchase/purchase/delete/',
- // _turnInUrl:'/api/purchase/purchase/turnProdin/',
- _readUrl:'http://localhost:8800/purchase/read/',
- _saveUrl:'http://localhost:8800/purchase/save',
- _auditUrl:'http://localhost:8800/purchase/audit',
- _unAuditUrl: '/api/purchase/purchase/unAudit/',
- _deleteUrl:'http://localhost:8800/purchase/delete/',
- _turnInUrl:'http://localhost:8800/purchase/turnProdin/',
- initId:0,
-
- toolBtns: [{
- xtype: 'button',
- text: '转采购验收单',
- bind: {
- hidden: '{!id}'
- },
- handler: 'turnIn'
- }],
- defaultItems: [{
- xtype: 'hidden',
- name: 'id',
- fieldLabel: 'id',
- columnWidth: 0
- }, {
- xtype : "hidden",
- name : "pu_vendid",
- fieldLabel : "供应商ID"
- }, {
- xtype : "hidden",
- name : "pu_vendcode",
- fieldLabel : "供应商编号"
- }, {
- xtype : "dbfindtrigger",
- name : "pu_vendname",
- fieldLabel : "供应商名称"
- },{
- xtype : "hidden",
- name : "pu_delivery",
- fieldLabel : "交货日期"
- }, {
- xtype : "hidden",
- name : "pu_buyerid",
- bind : "{pu_buyerid}",
- fieldLabel : "采购员ID"
- }, {
- xtype : "textfield",
- name : "pu_buyercode",
- fieldLabel : "采购员编号",
- hidden:true,
- columnWidth : 0
- }, {
- xtype : "textfield",
- name : "pu_buyername",
- fieldLabel : "采购员名称"
- }, {
- xtype : "textfield",
- name : "pu_shipaddresscode",
- fieldLabel : "交货地址"
- }, {
- xtype : "textfield",
- name : "pu_total",
- fieldLabel : "单据金额"
- }, {
- name : "detailGridField",
- xtype : "detailGridField",
- storeModel:'saas.model.purchase.ProdIODetail',
- detnoColumn: 'pd_detno',
- deleteDetailUrl:'/api/purchase/purchase/deleteDetail/',
- columns : [
- {
- text : "id",
- dataIndex : "id",
- xtype : "numbercolumn"
- },
- {
- text : "物料编号",
- width : 200.0,
- dataIndex : "pd_prodcode",
- xtype : "",
- items : null,
- logic : 'necessaryField',
- 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_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",
- },
- {
- text : "税率",
- editor : {
- xtype : "numberfield"
- },
- dataIndex : "pd_taxrate",
- width : 120.0,
- xtype : "numbercolumn",
- },
- {
- text : "含税金额",
- dataIndex : "pd_total",
- width : 120.0,
- xtype : "numbercolumn"
- },
- {
- text : "未含税金额",
- dataIndex : "pd_taxtotal",
- width : 120.0,
- xtype : "numbercolumn"
- },{
- text : "需求日期",
- dataIndex : "pd_delivery",
- xtype:'datecolumn',
- width : 120.0,
- 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
- }
- ]
- }, {
- 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 : "pu_status",
- bind : "{pu_status}",
- fieldLabel : "单据状态",
- allowBlank : true,
- columnWidth : 0.25
- }, {
- xtype : "hidden",
- readOnly : true,
- editable : false,
- name : "pu_statuscode",
- bind : "{pu_statuscode}",
- fieldLabel : "单据状态码",
- allowBlank : true,
- columnWidth : 0.0
- }]
- });
|