| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209 |
- Ext.define('saas.view.purchase.reconciliation.FormPanel', {
- extend: 'saas.view.core.form.FormPanel',
- xtype: 'purchase-reconciliation-formpanel',
- controller: 'purchase-reconciliation-formpanel',
- viewModel: 'purchase-reconciliation-formpanel',
- viewName: 'purchase-reconciliation-formpanel',
- //字段属性
- _title: '平台对账单',
- _idField: 'id',
- _codeField: 'ac_code',
- _relationColumn: 'pd_puid',
- _readUrl: '/api/money/apcheck/read',
- initId: 0,
- toolBtns: [{
- xtype: 'button',
- text: '确认',
- bind: {
- hidden: '{Hidden}'
- },
- handler: 'agree'
- },{
- cls:'x-formpanel-btn-red',
- xtype: 'button',
- text: '不同意',
- bind: {
- hidden: '{Hidden}'
- },
- handler: 'disagree'
- }],
- initComponent: function () {
- Ext.apply(this, {
- defaultItems: [{
- xtype: 'hidden',
- name: 'id',
- fieldLabel: 'id'
- }, {
- xtype: "textfield",
- name: "ac_vendname",
- fieldLabel: "供应商名称",
- allowBlank: true,
- readOnly:true
- }, {
- xtype: "textfield",
- name: "ac_date",
- fieldLabel: "对账日期",
- allowBlank: true,
- readOnly:true
- }, {
- xtype: "textfield",
- name: "ac_currency",
- fieldLabel: "币别",
- allowBlank: true,
- readOnly:true
- } ,{
- xtype: "numberfield",
- name: "ac_thisamount",
- fieldLabel: "本期应付金额",
- allowBlank: true,
- readOnly:true
- }, {
- xtype: "numberfield",
- name: "ac_thisuncheck",
- fieldLabel: "本期未对账",
- allowBlank: true,
- readOnly:true
- },{
- xtype: "numberfield",
- name: "ac_thispay",
- fieldLabel: "本期已付",
- allowBlank: true,
- readOnly:true
- },{
- xtype: "numberfield",
- name: "ac_thissend",
- fieldLabel: "本期发货",
- allowBlank: true,
- readOnly:true
- },{
- xtype: "numberfield",
- name: "ac_thischeck",
- fieldLabel: "本期已对账",
- allowBlank: true,
- readOnly:true
- },{
- xtype: "numberfield",
- name: "ac_payamont",
- fieldLabel: "应付总额",
- allowBlank: true,
- readOnly:true
- },{
- xtype: "textfield",
- name: "ac_confirmstatus",
- fieldLabel: "确认状态",
- allowBlank: true,
- readOnly:true
- },
- {
- name: "detailGridField",
- xtype: "detailGridField",
- storeModel: 'saas.model.purchase.ApCheckDetail',
- detnoColumn: 'ad_detno',
- editable:false,
- features : [Ext.create('Ext.grid.feature.Grouping',{
- collapsible:false,
- showSummaryRow: false,
- groupHeaderTpl: '采购单号 : {name} (共:{rows.length}条)'
- })],
- allowEmpty: true,
- columns: [{
- text: "id",
- dataIndex: "id",
- xtype: "numbercolumn",
- hidden: true
- },{
- text: "ad_acid",
- dataIndex: "ad_acid",
- xtype: "numbercolumn",
- hidden: true
- },{
- hidden:true,
- text: "采购单号",
- width: 150.0,
- dataIndex: "ad_pucode",
- }, {
- text: "出入库单号",
- width: 120.0,
- dataIndex: "ad_inoutno",
- },{
- text: "物料编号",
- width: 120.0,
- dataIndex: "ad_prodcode",
- ignore: true,
- }, {
- text: "品牌",
- dataIndex: "pr_brand",
- width: 100.0
- }, {
- text: "物料名称",
- dataIndex: "pr_detail",
- width: 150.0
- }, {
- text: "型号",
- dataIndex: "pr_orispeccode",
- width: 200.0
- }, {
- text: "规格",
- dataIndex: "pr_spec",
- width: 200.0
- },{
- text: "数量",
- xtype:'numbercolumn',
- width: 150.0,
- dataIndex: "ad_b2bqty",
- ignore: true
- },{
- text: "含税单价",
- width: 100.0,
- dataIndex: "ad_price",
- xtype:'numbercolumn',
- ignore: true
- },{
- text: "税率%",
- xtype:'numbercolumn',
- width: 100.0,
- dataIndex: "ad_taxrate",
- ignore: true
- },{
- text: "价税合计",
- xtype:'numbercolumn',
- width: 100.0,
- dataIndex: "ad_price",
- renderer:function(v,a,rec,c,d,e,f){
- return saas.util.BaseUtil.numberFormat(rec.get('ad_price') * rec.get('ad_b2bqty'), 2, true);
- }
- }],
- initColumns: function() {
- // 构造序号列
- var me = this,
- columns = me.columns,
- detnoField = me.detnoColumn;
-
- indexColumn = {
- bind: {
- text: "{(configurable && isAdmin) ? ('<div class=\"x-sa sa-setting\" style=\"cursor: pointer;\" title=\"列设置\"></div>') : '序号'}"
- },
- dataIndex : detnoField,
- width : 60,
- xtype : "numbercolumn",
- align : 'center',
- format:'0',
- allowBlank: true,
- };
- if (detnoField) {
- Ext.apply(me, { columns: [indexColumn].concat(columns) });
- }
- }
- }]
- });
- this.callParent();
- },
- listeners: {
- load:function(form){
- form.getViewModel().getData().detail0.detailStore.group('ad_pucode', 'ASC');
- }
- }
- });
|