|
|
@@ -59,6 +59,50 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
|
|
|
name : "pi_custname",
|
|
|
fieldLabel : "客户名称",
|
|
|
allowBlank:false,
|
|
|
+ setValue:function(value){
|
|
|
+ var me = this,bind, valueBind;
|
|
|
+ var form = me.ownerCt;
|
|
|
+ var c = form.down('[name=pi_address]');
|
|
|
+ if(value&&value!=''){
|
|
|
+ c.setDisabled(false);
|
|
|
+ }else{
|
|
|
+ c.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;
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ columnWidth : 0.5,
|
|
|
+ name : "pi_address",
|
|
|
+ xtype : "remotecombo",
|
|
|
+ fieldLabel : "交货地址",
|
|
|
+ editable:false,
|
|
|
+ allowBlank : false,
|
|
|
+ storeUrl:'/api/document/customer/getAddressCombo',
|
|
|
+ hiddenBtn:true,//true 则会关闭新增按钮功能
|
|
|
}, {
|
|
|
xtype : "datefield",
|
|
|
name : "pi_date",
|
|
|
@@ -66,11 +110,6 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
|
|
|
allowBlank : false,
|
|
|
columnWidth : 0.25,
|
|
|
defaultValue: new Date()
|
|
|
- }, {
|
|
|
- xtype : "textfield",
|
|
|
- name : "pi_address",
|
|
|
- fieldLabel : "交货地址",
|
|
|
- columnWidth : 0.5
|
|
|
}, {
|
|
|
name : "detailGridField",
|
|
|
xtype : "detailGridField",
|