| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303 |
- Ext.define('saas.view.sale.sale.FormPanel', {
- extend: 'saas.view.core.form.FormPanel',
- xtype: 'sale-sale-formpanel',
- controller: 'sale-sale-formpanel',
- viewModel: 'sale-sale-formpanel',
- viewName: 'sale-sale-formpanel',
- caller:'Sale',
-
- //字段属性
- _title:'销售订单',
- _idField: 'id',
- _codeField: 'sa_code',
- _statusField: 'sa_status',
- _statusCodeField: 'sa_statuscode',
-
- _relationColumn: 'sd_puid',
- _readUrl:'/api/sale/sale/read/',
- _saveUrl:'/api/sale/sale/save/',
- _auditUrl:'/api/sale/sale/audit/',
- _unAuditUrl: '/api/sale/sale/unAudit/',
- _deleteUrl:'/api/sale/sale/delete/',
- _turnOutUrl:'/api/sale/sale/turnProdOut/',
- initId:0,
-
- toolBtns: [{
- xtype: 'button',
- text: '转出货单',
- handler: 'turnOut',
- bind: {
- hidden: '{sa_statuscode!="AUDITED"}'
- }
- }],
- defaultItems: [{
- xtype: 'hidden',
- name: 'id',
- fieldLabel: 'id'
- }, {
- xtype : 'hidden',
- name : 'sa_custid',
- fieldLabel : '客户ID'
- }
- , {
- xtype : 'hidden',
- name : 'sa_custcode',
- fieldLabel : '客户编号'
- }, {
- xtype : "dbfindtrigger",
- name : "sa_custname",
- fieldLabel : "客户名称",
- allowBlank : false
- }, {
- xtype : "datefield",
- name : "sa_date",
- fieldLabel : "单据日期",
- allowBlank : false,
- defaultValue: new Date()
- }, {
- xtype : "textfield",
- name : "sa_toplace",
- fieldLabel : "交货地址",
- columnWidth : 0.5
- }, {
- name : "detailGridField",
- xtype : "detailGridField",
- detnoColumn: 'sd_detno',
- storeModel:'saas.model.sale.Saledetail',
- deleteDetailUrl:'/api/sale/sale/deleteDetail/',
- columns : [
- {
- text : "id",
- dataIndex : "id",
- xtype : "numbercolumn",
- width:0
- }, {
- text : "物料id",
- dataIndex : "sd_prodid",
- width : 0
- }, {
- text : "物料编号",
- width : 200.0,
- dataIndex : "sd_prodcode",
- xtype : "",
- items : null,
- allowBlank:false,
- editor : {
- displayField : "display",
- editable : true,
- format : "",
- hideTrigger : false,
- maxLength : 100.0,
- minValue : null,
- positiveNum : false,
- queryMode : "local",
- store : null,
- valueField : "value",
- xtype : "multidbfindtrigger"
- }
- },{
- text: 'model映射需要',
- dataIndex: 'productDTO',
- hidden: true,
- }, {
- text : "名称",
- dataIndex : "pr_detail",
- ignore:true,
- width : 150.0,
- renderer: function (v, m, r) {
- if(!v){
- return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:null;
- }
- return v;
- }
- }, {
- text : "规格",
- dataIndex : "pr_spec",
- ignore:true,
- width : 150.0,
- renderer: function (v, m, r) {
- if(!v){
- return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:null;
- }
- return v;
- }
- }, {
- text : "数量",
- dataIndex : "sd_qty",
- xtype: 'numbercolumn',
- allowBlank:false,
- editor : {
- xtype : "numberfield",
- decimalPrecision: 3,
- minValue:0
- },
- renderer : function(v) {
- var arr = (v + '.').split('.');
- var xr = (new Array(arr[1].length)).fill('0');
- var format = '0.' + xr.join();
- return Ext.util.Format.number(v, format);
- },
- summaryType: 'sum',
- summaryRenderer: function(v) {
- var arr = (v + '.').split('.');
- var xr = (new Array(arr[1].length)).fill('0');
- var format = '0.' + xr.join();
- return Ext.util.Format.number(v, format);
- }
- }, {
- text : "已转数",
- xtype: 'numbercolumn',
- dataIndex : "sd_yqty",
- width : 120.0,
- hidden : true,
- editor : {
- xtype : "numberfield",
- decimalPrecision: 3
- },
- renderer : function(v) {
- var arr = (v + '.').split('.');
- var xr = (new Array(arr[1].length)).fill('0');
- var format = '0.' + xr.join();
- return Ext.util.Format.number(v, format);
- },
- summaryType: 'sum',
- summaryRenderer: function(v) {
- var arr = (v + '.').split('.');
- var xr = (new Array(arr[1].length)).fill('0');
- var format = '0.' + xr.join();
- return Ext.util.Format.number(v, format);
- }
- },
- {
- text : "单价",
- xtype: 'numbercolumn',
- dataIndex : "sd_price",
- width : 120.0,
- editor : {
- xtype : "numberfield",
- decimalPrecision: 3,
- minValue:0
- },
- renderer : function(v) {
- var arr = (v + '.').split('.');
- var xr = (new Array(arr[1].length)).fill('0');
- var format = '0,000.' + xr.join();
- return Ext.util.Format.number(v, format);
- },
- },
- {
- text : "税率",
- xtype: 'numbercolumn',
- dataIndex : "sd_taxrate",
- width : 120.0,
- editor : {
- xtype : "numberfield",
- decimalPrecision: 0,
- minValue: 0,
- maxValue: 100
- },
- },
- {
- text : "含税金额",
- xtype: 'numbercolumn',
- dataIndex : "sd_total",
- width : 120.0,
- renderer : function(v) {
- var arr = (v + '.').split('.');
- var xr = (new Array(arr[1].length)).fill('0');
- var format = '0,000.' + xr.join();
- return Ext.util.Format.number(v, format);
- },
- summaryType: 'sum',
- summaryRenderer: function(v) {
- var arr = (v + '.').split('.');
- var xr = (new Array(arr[1].length)).fill('0');
- var format = '0,000.' + xr.join();
- return Ext.util.Format.number(v, format);
- }
- },
- {
- text : "未税金额",
- xtype: 'numbercolumn',
- dataIndex : "sd_nettotal",
- renderer : function(v) {
- var arr = (v + '.').split('.');
- var xr = (new Array(arr[1].length)).fill('0');
- var format = '0,000.' + xr.join();
- return Ext.util.Format.number(v, format);
- },
- summaryType: 'sum',
- summaryRenderer: function(v) {
- var arr = (v + '.').split('.');
- var xr = (new Array(arr[1].length)).fill('0');
- var format = '0,000.' + xr.join();
- return Ext.util.Format.number(v, format);
- }
- },{
- text : "交货日期",
- dataIndex : "sd_delivery",
- xtype:'datecolumn',
- editor : {
- xtype : "datefield",
- editable : true,
- hideTrigger : false
- }
- },{
- text : "关联采购订单",
- dataIndex : "sd_pucode",
- width : 120.0,
- items : null,
- ignore:true
- },{
- text : "备注",
- dataIndex : "sd_remark",
- width : 250,
- items : null,
- editor : {
- xtype : "textfield"
- },
- }
- ]
- }, {
- xtype : "textfield",
- name : "sa_total",
- fieldLabel : "单据金额",
- readOnly:true
- }, {
- xtype : "textfield",
- name : "sa_remark",
- fieldLabel : "备注",
- columnWidth : 0.75
- }, {
- xtype : 'textfield',
- name : 'sa_sendstatus',
- fieldLabel : '出货状态',
- hidden : true,
- readOnly:true
- }, {
- xtype : "textfield",
- name : "sa_recorder",
- fieldLabel : "录入人",
- readOnly:true
- }, {
- xtype : "datefield",
- name : "sa_recorddate",
- fieldLabel : "录入日期",
- readOnly:true,
- defaultValue: new Date()
- }, {
- xtype : "textfield",
- name : "sa_auditman",
- fieldLabel : "审核人",
- readOnly:true
- }, {
- xtype : "datefield",
- name : "sa_auditdate",
- fieldLabel : "审核日期",
- readOnly:true
- }
- ]
- });
|