|
|
@@ -14,7 +14,7 @@ Ext.define('saas.view.document.customer.panel.FormPanel', {
|
|
|
_statusField: 'cu_status',
|
|
|
_statusCodeField: 'cu_statuscode',
|
|
|
_readUrl:'http://192.168.253.228:9480/customer/read/',
|
|
|
- _saveUrl:'http://192.168.253.228:8800/purchase/save',
|
|
|
+ _saveUrl:'http://192.168.253.228:9480/customer/save',
|
|
|
_auditUrl:'http://192.168.253.228:8800/purchase/audit',
|
|
|
_deleteUrl:'http://192.168.253.228:8800/purchase/delete/',
|
|
|
_deleteDetailUrl:'http://192.168.253.228:8800/purchase/deleteItem/',
|
|
|
@@ -51,20 +51,94 @@ Ext.define('saas.view.document.customer.panel.FormPanel', {
|
|
|
allowBlank: true,
|
|
|
columnWidth: 0.25
|
|
|
},{
|
|
|
- xtype: 'textfield',
|
|
|
- name: 'cu_type',
|
|
|
- fieldLabel: '客户种类',
|
|
|
- allowBlank: true,
|
|
|
- columnWidth: 0.25
|
|
|
+ xtype : "remotecombo",
|
|
|
+ storeUrl:"http://192.168.253.41:9480/customerkind/getCombo",
|
|
|
+ name : "cu_type",
|
|
|
+ fieldLabel : "客户类型",
|
|
|
+ allowBlank : true,
|
|
|
+ queryMode: 'local',
|
|
|
+ displayField: 'display',
|
|
|
+ valueField: 'value',
|
|
|
+ columnWidth : 0.25,
|
|
|
+ etc:{
|
|
|
+ vendorkind:{
|
|
|
+ keyField:'id',
|
|
|
+ dataField:'ck_name',
|
|
|
+ reqUrl:'http://192.168.253.41:9480/customerkind/save',
|
|
|
+ delUrl:'http://192.168.253.41:9480/customerkind/delete'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ addHandler:function(b){
|
|
|
+ var form = this.ownerCmp.ownerCt;
|
|
|
+ this.dialog = form.getController().getView().add({
|
|
|
+ xtype: 'document-kind-childwin',
|
|
|
+ bind: {
|
|
|
+ title: '新增客户类型'
|
|
|
+ },
|
|
|
+ dataKind:'vendorkind',
|
|
|
+ belong:this.ownerCmp.etc['customerkind'],
|
|
|
+ _parent:form,
|
|
|
+ record:null,
|
|
|
+ session: true
|
|
|
+ });
|
|
|
+ this.dialog.show();
|
|
|
+ }
|
|
|
},{
|
|
|
format : "Y-m-d",
|
|
|
xtype : "datefield",
|
|
|
name : "createTime",
|
|
|
- bind : "{createTime}",
|
|
|
fieldLabel : "创建时间",
|
|
|
allowBlank : true,
|
|
|
columnWidth : 0.25
|
|
|
- }, {
|
|
|
+ },{
|
|
|
+ format : "Y-m-d",
|
|
|
+ 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
|
|
|
+ },{
|
|
|
format : "Y-m-d",
|
|
|
xtype : "datefield",
|
|
|
name : "updateTime",
|
|
|
@@ -74,11 +148,12 @@ Ext.define('saas.view.document.customer.panel.FormPanel', {
|
|
|
columnWidth : 0.25
|
|
|
}, {
|
|
|
xtype : "detailGridField",
|
|
|
- _detnoColumn: 'ca_detno',
|
|
|
+ _detnoColumn: 'cc_detno',
|
|
|
+ storeModel:'saas.model.document.customercontact',
|
|
|
columns : [
|
|
|
{
|
|
|
text : "序号",
|
|
|
- dataIndex : "ca_detno",
|
|
|
+ dataIndex : "cc_detno",
|
|
|
width : 100,
|
|
|
xtype : "numbercolumn",
|
|
|
align : 'center',
|
|
|
@@ -87,7 +162,47 @@ Ext.define('saas.view.document.customer.panel.FormPanel', {
|
|
|
summaryRenderer: function(value, summaryData, dataIndex) {
|
|
|
return Ext.String.format('合计: {0}条', value);
|
|
|
},
|
|
|
- },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ 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",
|
|
|
@@ -103,26 +218,110 @@ Ext.define('saas.view.document.customer.panel.FormPanel', {
|
|
|
store:{
|
|
|
fields: ['display', 'value'],
|
|
|
data : [
|
|
|
- {"display":"是", "value":1},
|
|
|
- {"display":"否", "value":0}
|
|
|
+ {"display":"是", "value":'1'},
|
|
|
+ {"display":"否", "value":'0'}
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
- text : "客户地址",
|
|
|
+ text : "是否默认联系人",
|
|
|
width : 200.0,
|
|
|
+ dataIndex : "cc_default",
|
|
|
+ xtype : "",
|
|
|
+ renderer: function (v, m, r) {
|
|
|
+ if(v=='0'){
|
|
|
+ return '';
|
|
|
+ }else if(v=='1'){
|
|
|
+ return '是';
|
|
|
+ }
|
|
|
+ return v;
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ } ,{
|
|
|
+ xtype : "detailGridField",
|
|
|
+ _detnoColumn: 'ca_detno',
|
|
|
+ storeModel:'saas.model.document.customeraddress',
|
|
|
+ columns : [
|
|
|
+ {
|
|
|
+ text : "序号",
|
|
|
+ dataIndex : "ca_detno",
|
|
|
+ width : 100,
|
|
|
+ xtype : "numbercolumn",
|
|
|
+ align : 'center',
|
|
|
+ format:'0',
|
|
|
+ summaryType: 'count',
|
|
|
+ summaryRenderer: function(value, summaryData, dataIndex) {
|
|
|
+ return Ext.String.format('合计: {0}条', value);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text : "送货地址",
|
|
|
+ editor : {
|
|
|
+ xtype : "textfield"
|
|
|
+ },
|
|
|
dataIndex : "ca_address",
|
|
|
+ width : 120.0,
|
|
|
xtype : "",
|
|
|
items : null
|
|
|
- },
|
|
|
+ },
|
|
|
{
|
|
|
- text : "是否默认地址",
|
|
|
+ text : "联系人",
|
|
|
editor : {
|
|
|
- xtype : "combo"
|
|
|
+ xtype : "textfield"
|
|
|
},
|
|
|
- dataIndex : "ca_default",
|
|
|
+ dataIndex : "ca_person",
|
|
|
width : 120.0,
|
|
|
xtype : "",
|
|
|
- items : null
|
|
|
+ items : null
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text : "联系电话",
|
|
|
+ editor : {
|
|
|
+ xtype : "textfield"
|
|
|
+ },
|
|
|
+ dataIndex : "ca_phone",
|
|
|
+ width : 120.0,
|
|
|
+ xtype : "",
|
|
|
+ items : null
|
|
|
+ },
|
|
|
+ {
|
|
|
+ editor : {
|
|
|
+ displayField : "display",
|
|
|
+ editable : true,
|
|
|
+ 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;
|
|
|
+ }
|
|
|
}]
|
|
|
}]
|
|
|
});
|