|
@@ -47,24 +47,45 @@ Ext.define('saas.view.sale.sale.FormPanel', {
|
|
|
allowBlank : false
|
|
allowBlank : false
|
|
|
}, {
|
|
}, {
|
|
|
name : "sa_toplace",
|
|
name : "sa_toplace",
|
|
|
- xtype : "textfield",
|
|
|
|
|
|
|
+ xtype : "remotecombo",
|
|
|
fieldLabel : "交货地址",
|
|
fieldLabel : "交货地址",
|
|
|
|
|
+ editable:false,
|
|
|
allowBlank : false,
|
|
allowBlank : false,
|
|
|
columnWidth : 0.5,
|
|
columnWidth : 0.5,
|
|
|
- hiddenBtn:false,//true 则会关闭新增按钮功能
|
|
|
|
|
- addHandler:function(b){
|
|
|
|
|
- var form = this.ownerCmp.ownerCt;
|
|
|
|
|
- this.dialog = form.add({
|
|
|
|
|
- xtype: 'document-address-window',
|
|
|
|
|
- bind: {
|
|
|
|
|
- title: '新增交货地址'
|
|
|
|
|
- },
|
|
|
|
|
- _parent:form,
|
|
|
|
|
- _combo:this.ownerCmp,
|
|
|
|
|
- record:null,
|
|
|
|
|
- session: true
|
|
|
|
|
- });
|
|
|
|
|
- this.dialog.show();
|
|
|
|
|
|
|
+ storeUrl:'/api/document/customer/getAddressCombo',
|
|
|
|
|
+ hiddenBtn:true,//true 则会关闭新增按钮功能
|
|
|
|
|
+ setValue:function(value){
|
|
|
|
|
+ var me = this,bind, valueBind;
|
|
|
|
|
+ if(value&&value!=''){
|
|
|
|
|
+ me.setDisabled(false);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ me.setDisabled(true);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (me.hasFocus) {
|
|
|
|
|
+ bind = me.getBind();
|
|
|
|
|
+ valueBind = bind && bind.value;
|
|
|
|
|
+ if (valueBind && valueBind.syncing) {
|
|
|
|
|
+ if ((Ext.isEmpty(value) && Ext.isEmpty(me.value)) || value === me.value) {
|
|
|
|
|
+ return me;
|
|
|
|
|
+ } else if (Ext.isArray(value) && Ext.isArray(me.value) && Ext.Array.equals(value, me.value)) {
|
|
|
|
|
+ return me;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ me.lastSelectedRecords = null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (value != null) {
|
|
|
|
|
+ me.doSetValue(value);
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ me.suspendEvent('select');
|
|
|
|
|
+ me.valueCollection.beginUpdate();
|
|
|
|
|
+ me.pickerSelectionModel.deselectAll();
|
|
|
|
|
+ me.valueCollection.endUpdate();
|
|
|
|
|
+ me.resumeEvent('select');
|
|
|
|
|
+ }
|
|
|
|
|
+ return me;
|
|
|
}
|
|
}
|
|
|
}, {
|
|
}, {
|
|
|
name : "detailGridField",
|
|
name : "detailGridField",
|