| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328 |
- Ext.define('saas.view.document.customer.FormPanel', {
- extend: 'saas.view.core.form.FormPanel',
- xtype: 'document-customer-formpanel',
- controller: 'document-customer-formpanel',
- viewModel: 'document-customer-formpanel',
-
- caller:'Customer',
- //字段属性
- _title:'客户资料',
- _idField: 'id',
- _codeField: 'cu_code',
- _statusField: 'cu_status',
- _statusCodeField: 'cu_statuscode',
- _readUrl:'/api/document/customer/read/',
- _saveUrl:'/api/document/customer/save',
- _openUrl:'/api/document/customer/open',
- _closeUrl:'/api/document/customer/close',
- _deleteUrl:'/api/document/customer/delete/',
- initId:0,
- defaultItems: [{
- xtype: 'hidden',
- name: 'id',
- fieldLabel: 'id',
- allowBlank: true,
- columnWidth: 0.25
- },{
- xtype: 'textfield',
- name: 'cu_name',
- fieldLabel: '客户名称',
- allowBlank: false,
- columnWidth: 0.25
- },{
- xtype: 'textfield',
- name: 'cu_code',
- fieldLabel: '客户编号',
- allowBlank: true,
- columnWidth: 0.25
- },{
- xtype: 'textfield',
- name: 'cu_status',
- fieldLabel: '状态',
- allowBlank: true,
- columnWidth: 0.25
- },{
- xtype: 'hidden',
- name: 'cu_statuscode',
- fieldLabel: '状态码',
- allowBlank: true,
- columnWidth: 0.25
- },{
- editable:false,
- xtype : "remotecombo",
- storeUrl:'/api/document/customerkind/getCombo',
- name : "cu_type",
- fieldLabel : "客户类型",
- allowBlank : false,
- columnWidth : 0.25,
- hiddenBtn:false,//true 则会关闭新增按钮功能
- addHandler:function(b){
- var document = Ext.create('saas.view.document.kind.Kind',{});
- var form = this.ownerCmp.ownerCt;
- this.dialog = form.getController().getView().add({
- xtype: 'document-kind-childwin',
- bind: {
- title: '新增客户类型'
- },
- dataKind:'customerkind',
- belong:document.etc['customerkind'],
- _parent:form,
- _combo:this.ownerCmp,
- record:null,
- session: true
- });
- this.dialog.show();
- }
- },{
- xtype : "datefield",
- name : "createTime",
- fieldLabel : "创建时间",
- allowBlank : true,
- columnWidth : 0.25
- },{
- xtype : "datefield",
- name : "cu_begindate",
- fieldLabel : "期初日期",
- allowBlank : true,
- columnWidth : 0.25
- },{
- xtype : "numberfield",
- hideTrigger:true,
- name : "cu_beginaramount",
- fieldLabel : "期初应收",
- allowBlank : true,
- columnWidth : 0.25
- },{
- xtype : "numberfield",
- hideTrigger:true,
- name : "cu_beginprerecamount",
- fieldLabel : "期初预收",
- allowBlank : true,
- columnWidth : 0.25
- },{
- xtype : "numberfield",
- hideTrigger:true,
- name : "cu_promisedays",
- fieldLabel : "承付天数",
- allowBlank : true,
- columnWidth : 0.25
- },{
- xtype : "numberfield",
- name : "cu_taxrate",
- fieldLabel : "税率",
- allowBlank : true,
- columnWidth : 0.25
- },{
- // xtype : "numberfield",
- // name : "cu_ta",
- // fieldLabel : "应收款余额",
- // allowBlank : true,
- // readOnly:true,
- // editable:false,
- // columnWidth : 0.25
- },{
- xtype:'textfield',
- name : "cu_uu",
- fieldLabel : "客户UU",
- allowBlank : true,
- columnWidth : 0.25
- },{
- xtype : "datefield",
- name : "updateTime",
- fieldLabel : "更新时间",
- allowBlank : true,
- columnWidth : 0.25
- }, {
- height: 169,
- xtype : "detailGridField",
- detnoColumn: 'cc_detno',
- storeModel:'saas.model.document.customercontact',
- deleteDetailUrl:'/api/document/customer/deletecontact/',
- columns : [
- {
- text : "ID",
- dataIndex : "id",
- width : 0,
- xtype : "numbercolumn"
- },
- {
- text : "关联ID",
- dataIndex : "cc_cuid",
- width : 0,
- xtype : "numbercolumn"
- },
- {
- text : "联系人",
- editor : {
- xtype : "textfield"
- },
- dataIndex : "cc_name",
- width : 120.0,
- xtype : "",
- items : null
- },
- {
- text : "电话",
- editor : {
- xtype : "textfield"
- },
- dataIndex : "cc_tel",
- width : 120.0,
- xtype : "",
- items : null
- },
- {
- text : "微信/QQ",
- editor : {
- xtype : "textfield"
- },
- dataIndex : "cc_qq",
- width : 120.0,
- xtype : "",
- items : null
- },
- {
- text : "邮箱",
- editor : {
- xtype : "textfield"
- },
- dataIndex : "cc_email",
- width : 120.0,
- xtype : "",
- items : null
- },
- {
- editor : {
- displayField : "display",
- editable:false,
- format : "",
- hideTrigger : false,
- maxLength : 100.0,
- minValue : null,
- positiveNum : false,
- queryMode : "local",
- valueField : "value",
- xtype : "combo",
- store:{
- fields: ['display', 'value'],
- data : [
- {"display":"是", "value":'1'},
- {"display":"否", "value":'0'}
- ]
- }
- },
- text : "是否默认联系人",
- width : 200.0,
- dataIndex : "cc_default",
- xtype : "",
- renderer: function (v, m, r) {
- if(v=='0'){
- return '';
- }else if(v=='1'){
- return '是';
- }
- return v;
- }
- }]
- } ,{
- height: 169,
- xtype : "detailGridField",
- detnoColumn: 'ca_detno',
- storeModel:'saas.model.document.customeraddress',
- deleteDetailUrl:'/api/document/customer/deleteaddress/',
- columns : [
- {
- text : "ID",
- dataIndex : "id",
- width : 0,
- xtype : "numbercolumn"
- },
- {
- text : "关联ID",
- dataIndex : "ca_cuid",
- width : 0,
- xtype : "numbercolumn"
- },
- {
- text : "送货地址",
- editor : {
- xtype : "textfield"
- },
- dataIndex : "ca_address",
- width : 120.0,
- xtype : "",
- items : null
- },
- {
- text : "联系人",
- editor : {
- xtype : "textfield"
- },
- dataIndex : "ca_person",
- width : 120.0,
- xtype : "",
- items : null
- },
- {
- text : "联系电话",
- editor : {
- xtype : "textfield"
- },
- dataIndex : "ca_phone",
- width : 120.0,
- xtype : "",
- items : null
- },
- {
- editor : {
- editable:false,
- displayField : "display",
- format : "",
- hideTrigger : false,
- maxLength : 100.0,
- minValue : null,
- positiveNum : false,
- queryMode : "local",
- valueField : "value",
- xtype : "combo",
- store:{
- fields: ['display', 'value'],
- data : [
- {"display":"是", "value":'1'},
- {"display":"否", "value":'0'}
- ]
- },
- listeners:{
- 'change':function(c,newVal,oldVal){
- var grid = c.ownerCt.column.ownerCt.ownerCt;
- var nowId = grid.selModel.lastSelected.id;
- var items = grid.store.data.items
- }
- }
- },
- text : "是否默认地址",
- width : 200.0,
- dataIndex : "ca_default",
- xtype : "",
- renderer: function (v, m, r) {
- if(v=='0'){
- return '';
- }else if(v=='1'){
- return '是';
- }
- return v;
- }
- }]
- }],
- auditTexts: {
- auditCode: 'OPEN',
- auditText: '已开启',
- unAuditCode: 'CLOSE',
- unAuditText: '已关闭',
- auditBtnText: '启用',
- unAuditBtnText: '禁用',
- },
- });
|