| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324 |
- 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:'/api/purchase/prodinout/read/',
- _saveUrl:'/api/purchase/prodinout/save',
- _auditUrl:'/api/purchase/prodinout/audit',
- _unAuditUrl:'/api/purchase/prodinout/unAudit/',
- _deleteUrl:'/api/purchase/prodinout/delete/',
- _turnOutUrl:'/api/purchase/prodinout/turnProdOut/',
- // _relationColumn: 'pd_piid',
- // _readUrl:'http://localhost:8800/prodinout/read/',
- // _saveUrl:'http://localhost:8800/prodinout/save',
- // _auditUrl:'http://localhost:8800/prodinout/audit',
- // _deleteUrl:'http://localhost:8800/prodinout/delete/',
- // _turnOutUrl:'http://localhost:8800/prodinout/turnProdOut/',
- initId:0,
- toolBtns: [{
- xtype: 'button',
- text: '转采购验退单',
- bind: {
- hidden: '{!id}'
- },
- handler: 'turnOut'
- }],
- defaultItems: [{
- xtype: 'hidden',
- name: 'id',
- bind: '{id}',
- fieldLabel: 'id',
- allowBlank: true,
- columnWidth: 0
- },{
- 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: 'pi_vendcode',
- bind: '{pi_vendcode}',
- fieldLabel: '供应商编号'
- }, {
- xtype: 'dbfindtrigger',
- name: 'pi_vendname',
- bind: '{pi_vendname}',
- fieldLabel: '供应商名称'
- },{
- xtype : "datefield",
- name : "pi_date",
- bind : "{pi_date}",
- fieldLabel : "单据日期",
- allowBlank : false,
- columnWidth : 0.25,
- defaultValue: new Date()
- },{
- 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',
- // deleteDetailUrl:'http://localhost:8800/prodinout/deleteDetail/',
- deleteDetailUrl:'api/purchase/prodinout/deleteDetail/',
- detnoColumn: 'pd_pdno',
- columns : [
- {
- text : "id",
- dataIndex : "id",
- xtype : "numbercolumn",
- hidden:true
- },{
- 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 : "multidbfindtrigger"
- }
- },
- {
- text : "名称",
- dataIndex : "pr_detail",
- ignore:true,
- renderer: function (v, m, r) {
- return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
- }
- },
- {
- text : "规格",
- dataIndex : "pr_spec",
- ignore:true,
- renderer: function (v, m, r) {
- return r.data["productDTO"]?r.data["productDTO"][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",
- width : 120.0,
- xtype : "numbercolumn",
- format:'0',
- items : null,
- summaryType: 'sum'
- },{
- text : "仓库id",
- dataIndex : "pd_whid",
- xtype : "numbercolumn",
- hidden:true
- },
- {
- text : "仓库编号",
- dataIndex : "pd_whcode",
- hidden:true
- },
- // {
- // text : "仓库",
- // dataIndex : "pd_whname",
- // width : 120.0,
- // items : null,
- // editor : {
- // editable:false,
- // xtype : "remotecombo",
- // storeUrl:'/api/document/warehouse/getCombo',
- // name : "wh_name",
- // hiddenBtn:false,//true 则会关闭新增按钮功能
- // addHandler:function(b){
- // var document = Ext.create('saas.view.document.kind.Kind',{});
- // var form =this.ownerCmp.ownerCt.ownerCmp.ownerCt;
- // this.dialog = form.getController().getView().add({
- // xtype: 'document-kind-childwin',
- // bind: {
- // title: '新增供应商类型'
- // },
- // dataKind:'warehouse',
- // belong:document.etc['warehouse'],
- // _parent:form,
- // _combo:this.ownerCmp,
- // record:null,
- // session: true
- // });
- // this.dialog.show();
- // }
- // }
- // },
- {
- 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 : "单价",
- editor : {
- xtype : "numberfield"
- },
- dataIndex : "pd_orderprice",
- width : 120.0,
- xtype : "numbercolumn"
- },
- {
- text : "含税金额",
- dataIndex : "pd_total",
- width : 120.0,
- xtype : "numbercolumn"
- }, {
- text : "税率",
- editor : {
- xtype : "numberfield"
- },
- dataIndex : "pd_taxrate",
- width : 120.0,
- xtype : "numbercolumn"
- },
- {
- 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",
- width : 120.0,
- format: '0000',
- renderer: function(v) {
- return v ? v : null;
- }
- }
- ]
- }, {
- 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
- }]
- });
|