From b57b6259d1cbf4abdfc4df44e9c91e21c92cb5d8 Mon Sep 17 00:00:00 2001 From: ddlucky Date: Mon, 13 Mar 2023 16:10:02 +0800 Subject: [PATCH] =?UTF-8?q?20230313-=E7=95=A5=E5=BE=AE=E6=94=B9=E8=BF=9B?= =?UTF-8?q?=E6=8F=90=E5=8D=95=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2=E7=9A=84?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=E5=92=8C=E5=A4=8D=E5=88=B6=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Viewsjs/MsOpSeae/MsOpBillLSEdit.js | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpBillLSEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpBillLSEdit.js index 5e581e82..76f29a06 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpBillLSEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpBillLSEdit.js @@ -1657,10 +1657,10 @@ Ext.extend(Shipping.MsOpBillLSEdit, Ext.Panel, { handler: function (button, event) { var basicForm = this.formEdit.getForm(); this.opStatus = 'add'; - basicForm.findField('AS_ID').setDisabled(false); + //basicForm.findField('AS_ID').setDisabled(false); var field = basicForm.findField('AS_ID'); field.setValue('*'); - basicForm.findField('AS_ID').setDisabled(true); + //basicForm.findField('AS_ID').setDisabled(true); field = basicForm.findField('INPUTBY'); field.setValue(SHOWNAME); for (var j = 0; j < this.storeBodyList.getCount(); j += 1) { @@ -3771,9 +3771,9 @@ this.storeConsignee.on('beforeload', function (store) { //this.formEdit.getForm().findField('NOTIFYPARTYNAME').setValue(this.formcd.getForm().findField('NOTIFYPARTYNAME').getValue()); //this.formEdit.getForm().findField('NOTIFYPARTYADDR1').setValue(this.formcd.getForm().findField('NOTIFYPARTYADDR1').getValue()); //this.formEdit.getForm().findField('SCACCODE').setValue(this.formcd.getForm().findField('SCACCODE').getValue()); - this.formEdit.getForm().findField('AS_ID').setDisabled(false); + //this.formEdit.getForm().findField('AS_ID').setDisabled(false); var data = this.formEdit.getForm().getValues(false, false, false); - this.formEdit.getForm().findField('AS_ID').setDisabled(true); + //this.formEdit.getForm().findField('AS_ID').setDisabled(true); var data2 = this.formcd.getForm().getValues(false, false, false); data.BSNO = this.MainEditRecord.data.BSNO; Object.assign(data, data2); @@ -3809,6 +3809,14 @@ this.storeConsignee.on('beforeload', function (store) { if (this.opStatus == 'add') { var arrNewRecords = this.storeList.insert(0, returnData); this.editRecord = this.storeList.getAt(0); + + //此时应根据returnData.data.AS_ID来决定选中哪行 + for (i = 0; i < this.storeList.getCount(); i += 1) { + var rec = this.storeList.getAt(i).data; + if (rec.AS_ID == returnData.AS_ID) { + this.gridListLS.getSelectionModel().select(i); + } + } } else if (this.opStatus == 'edit') { var editp = Ext.create('MsOpBillModel', returnData); @@ -3822,6 +3830,14 @@ this.storeConsignee.on('beforeload', function (store) { this.editRecord.commit(); this.LoadInit(returnData); + + //此时应根据returnData.data.AS_ID来决定选中哪行 + for (i = 0; i < this.storeList.getCount(); i += 1) { + var rec = this.storeList.getAt(i).data; + if (rec.AS_ID == returnData.AS_ID) { + this.gridListLS.getSelectionModel().select(i); + } + } } if (type == '0') { this.opStatus = 'edit';