Best Python code snippet using playwright-python
myGrid.js
Source:myGrid.js  
1define([2    "dojo/_base/declare",3    "dojo/_base/lang",4    "dojo/dom-construct",5    "dojo/Stateful",6    "dstore/Memory",7    "dgrid/OnDemandGrid",8    "dgrid/ColumnSet",9    'dgrid/extensions/DijitRegistry',10    "dgrid/Selection",11    "dgrid/Editor",12    "dgrid/Keyboard",13    "dojo/dom-style",14    "dijit/form/ValidationTextBox",15    "dijit/form/CheckBox",16    "dijit/form/DateTextBox",17    "myApp/widget/helper/NominaGridHelper.js",18    "myApp/widget/EmpleadoValidoWidget.js",19   "dojo/domReady!"20], function (21    declare,22    lang,23    domConstruct,24    Stateful,25    Memory,26    OnDemandGrid,27    ColumnSet,28    DijitRegistry,29    Selection,30    Editor,31    Keyboard,32    domStyle,33    ValidationTextBox,34    CheckBox,35    DateTextBox,36    NominaGridHelper,37    EmpleadoValidoWidget38) {39    return declare([Stateful,OnDemandGrid, ColumnSet, DijitRegistry, Selection, Editor, Keyboard], {40        collection: null,//Al inicio la collection sera null.41        original: null,42        /**43         * La colección original servira para realizar las busquedas 44         * sobre ella sin modificarla.45         * **/46        validCollection: new Memory({47            idProperty: 'identifier'48        }),//Contendra los registros que sean invalidos49        invalidCollection: new Memory({50            idProperty: 'identifier'51        }),//Contendra los registros que sean invalidos52        postscript: function (kwargs) {53            this.inherited(arguments);54            // do your postscript stuff55            // ...56            this.watch("original", function (a, b, c) { debugger; alert("asdf") })57            58        },59        constructor: function (arguments) {60            lang.mixin(this, arguments);61                /**62                La lÃnea anterior permite manipular los objetos que se63                pasan como argumentos en el constructo.64                */65        },66        _originalSetter: function (value) { this.original = value },67        _originalGetter: function () { return this.original },68        _collectionSetter: function (value) { this.collection = value },69        _collectionGetter: function () { return this.collection },70        71        _invalidCollectionSetter: function (value) { this.invalidCollection = value },72        _invalidCollectionGetter: function () { return this.invalidCollection },73        74        _validCollectionSetter: function (value) { this.validCollection = value },75        _validCollectionGetter: function () { return this.validCollection },76       77        validarContenidoDeCeldas: function () {78            /***Se ejecutara este método cuando se de click al boton de emitir***/79                    /**80             * Se enviara todo el grid para poder realizar las81             * validaciones de cada celda.82             * 83             **/84            85            86            var collection = this.get("collection");87            /**El primer foreach lo que hace es ponerle la bandera isValid=true**/88            var store = this.get("store");89            var filter = new collection.Filter();//Se crea un filtro nuevo90            var filtroValido = filter.eq('isValid.bandera', true);91            var filtroInvalido = filter.eq('isValid.bandera', false);92            var validos = collection.filter(filtroValido);93            var invalidos = collection.filter(filtroInvalido);94            //this.set("collection", collection.filter({ NumEmpleado: 1222 }))95            //collection.filter({NumEmpleado:1222})96            this.set('collection', invalidos);97            var context = this;98            domConstruct.empty("panelValidosId");99            domConstruct.empty("panelNoValidosId");100            /**101             * Limpia los hijos de los paneles que corresponden a los102             * valios y a los invalidos.103             * **/104            var context = this;105            106            validos.forEach(lang.hitch(this,function (object) {107                108                this.get("validCollection").put(object);109                110            }));111            this.get("validCollection").forEach(lang.hitch(this, function (object) {112                var valido = new EmpleadoValidoWidget({113                    grid: context,114                    id: "id" + object.NumEmpleado,115                    NumEmpleado: object.NumEmpleado,116                    isValid: object.isValid.bandera117                });118                this.principal.contentPaneValidos.addChild(valido);119            }));120            invalidos.forEach(lang.hitch(this, function (object) {121                this.get("invalidCollection").put(object);122                var noValido = new EmpleadoValidoWidget({123                    NumEmpleado: object.NumEmpleado,124                    error: object.isValid.codError,125                    grid: this126                });127                this.principal.contentPaneInvalidos.addChild(noValido)128                129                130            }));131            132        },133        columnSets://Esta propiedad se encarga de crear las columnSets dentro del grid.134            [135                [136                    [137                        NominaGridHelper.formatoColumn({ field: 'NumEmpleado', label: 'Clave' }),138                        NominaGridHelper.formatoColumn({ field: 'Nombre', label: 'Nombre' }),139                        NominaGridHelper.formatoMontoColumn({ field: 'Antiguedad', label: 'Antigüedad', editor: 'text', editOn: 'dblclick' }),140                    ]141                ],142                [143                    [//Inicio del segundo ColumnSet144                        NominaGridHelper.formatoColumn({ field: 'FechaPago', label: "Fecha", editor: DateTextBox, editOn: 'dblclick', autoSave: true, editorArgs: { style: "width:100px;", constraints: { datePattern: 'yyyy/MM/dd' } } }),145                        NominaGridHelper.formatoColumn({ field: 'FechaInicialPago', label: "Fecha Inicio" }),146                        NominaGridHelper.formatoColumn({ field: 'FechaFinalPago', label: "Fecha Fin" }),147                        NominaGridHelper.formatoColumn({ field: 'NumDiasPagados', label: "Dias Pagados" }),148                        NominaGridHelper.formatoColumn({ field: 'Banco', label: "Banco", }),149                        NominaGridHelper.formatoColumn({ field: 'Clabe', label: "Clabe" }),150                        NominaGridHelper.formatoColumn({ field: 'Monto', label: "Monto", editor: ValidationTextBox, editOn: 'dblclick', autoSave: true, editorArgs: { style: "width:110px", regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})' } })151                        ,152                        NominaGridHelper.formatoMontoColumn({ field: 'Sueldo_Gravado', editor: ValidationTextBox, editOn: 'dblclick', autoSave: true, editorArgs: { style: "width:110px", regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})' }, label: "Gravado" }),// Sueldo Gravado153                        NominaGridHelper.formatoMontoColumn({ field: 'Sueldo_Exento', label: "Exento", editor: ValidationTextBox, editOn: 'dblclick', autoSave: true, editorArgs: { style: "width:110px", regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})' } }),//Sueldo Exento154                        NominaGridHelper.formatoMontoColumn({field: 'Aguinaldo_Gravado',label: "Gravado",editor: ValidationTextBox,editOn: 'dblclick',autoSave: true,editorArgs: {style: "width:110px",regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'}}),//Aguinaldo_Gravado155                        NominaGridHelper.formatoMontoColumn({ field: 'Aguinaldo_Exento', label: "Exento", editor: ValidationTextBox, editOn: 'dblclick', autoSave: true, editorArgs: { style: "width:110px", regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})' } }),//Aguinaldo Exento156                        NominaGridHelper.formatoMontoColumn({ field: 'PTU_Gravado', label: "Gravado", editor: ValidationTextBox, editOn: 'dblclick', autoSave: true, editorArgs: { style: "width:110px", regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})' } }),//PTU Gravado157                        NominaGridHelper.formatoMontoColumn({ field: 'PTU_Exento', label: "Exento", editor: ValidationTextBox, editOn: 'dblclick', autoSave: true, editorArgs: { style: "width:110px", regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})' } }),//PTU_Exento158                        NominaGridHelper.formatoMontoColumn({ field: 'RGMDyH_Gravado', label: "Gravado", editor: ValidationTextBox, editOn: 'dblclick', autoSave: true, editorArgs: { style: "width:110px", regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})' } }),//Reembolso de Gastos Medicos dentales y hospitalarios Gravado.159                        NominaGridHelper.formatoMontoColumn({ field: 'RGMDyH_Exento', label: "Exento", editor: ValidationTextBox, editOn: 'dblclick', autoSave: true, editorArgs: { style: "width:110px", regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})' } }),160                        NominaGridHelper.formatoMontoColumn({161                            field: 'FDA_Gravado',162                            label: "Gravado",163                            editor: ValidationTextBox,164                            editOn: 'dblclick',165                            autoSave: true,166                            editorArgs: {167                                style: "width:110px",168                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'169                            }170                        }),171                        NominaGridHelper.formatoMontoColumn(172                        {173                            field: 'FDA_Exento',174                            label: "Exento",175                            editor: ValidationTextBox,176                            editOn: 'dblclick',177                            autoSave: true,178                            editorArgs: {179                                style: "width:110px",180                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'181                            }182                            }),183                        NominaGridHelper.formatoMontoColumn({184                            field: 'CDA_Gravado',185                            label: "Gravado",186                            editor: ValidationTextBox,187                            editOn: 'dblclick',188                            autoSave: true,189                            editorArgs: {190                                style: "width:110px",191                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'192                            }193                        }),194                        NominaGridHelper.formatoMontoColumn({195                            field: 'CDA_Exento',196                            label: "Exento",197                            editor: ValidationTextBox,198                            editOn: 'dblclick',199                            autoSave: true,200                            editorArgs: {201                                style: "width:110px",202                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'203                            }204                        }),205                        NominaGridHelper.formatoMontoColumn({206                            field: 'CCTPP_Gravado',207                            label: "Gravado",208                            editor: ValidationTextBox,209                            editOn: 'dblclick',210                            autoSave: true,211                            editorArgs: {212                                style: "width:110px",213                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'214                            }215                        }),216                        NominaGridHelper.formatoMontoColumn({217                            field: 'CCTPP_Exento',218                            label: "Exento",219                            editor: ValidationTextBox,220                            editOn: 'dblclick',221                            autoSave: true,222                            editorArgs: {223                                style: "width:110px",224                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'225                            }226                        }),227                        NominaGridHelper.formatoMontoColumn({228                            field: 'PP_Gravado',229                            label: "Gravado",230                            editor: ValidationTextBox,231                            editOn: 'dblclick',232                            autoSave: true,233                            editorArgs: {234                                style: "width:110px",235                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'236                            }237                        }),//Premio de Puntualidad238                        NominaGridHelper.formatoMontoColumn({239                            field: 'PP_Exento',240                            label: "Exento",241                            editor: ValidationTextBox,242                            editOn: 'dblclick',243                            autoSave: true,244                            editorArgs: {245                                style: "width:110px",246                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'247                            }248                        }),//Premio de Puntualidad249                        NominaGridHelper.formatoMontoColumn({250                            field: 'PSV_Gravado',251                            label: "Gravado",252                            editor: ValidationTextBox,253                            editOn: 'dblclick',254                            autoSave: true,255                            editorArgs: {256                                style: "width:110px",257                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'258                            }259                        }),//Prima de Seguro de vida260                        NominaGridHelper.formatoMontoColumn({261                            field: 'PSV_Exento',262                            label: "Exento",263                            editor: ValidationTextBox,264                            editOn: 'dblclick',265                            autoSave: true,266                            editorArgs: {267                                style: "width:110px",268                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'269                            }270                        }),//Prima de Seguro de vida271                        NominaGridHelper.formatoMontoColumn({272                            field: 'SGMM_Gravado',273                            label: "Gravado",274                            editor: ValidationTextBox,275                            editOn: 'dblclick',276                            autoSave: true,277                            editorArgs: {278                                style: "width:110px",279                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'280                            }281                        }),//Seguro de Gastos Médicos Mayores282                        NominaGridHelper.formatoMontoColumn({283                            field: 'SGMM_Exento',284                            label: "Exento",285                            editor: ValidationTextBox,286                            editOn: 'dblclick',287                            autoSave: true,288                            editorArgs: {289                                style: "width:110px",290                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'291                            }292                        }),//Seguro de Gastos Médicos Mayores293                        NominaGridHelper.formatoMontoColumn({294                            field: 'CSPPP_Gravado',295                            label: "Gravado",296                            editor: ValidationTextBox,297                            editOn: 'dblclick',298                            autoSave: true,299                            editorArgs: {300                                style: "width:110px",301                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'302                            }303                        }),//Cuotas Sindicales Pagadas por el patron304                        NominaGridHelper.formatoMontoColumn({305                            field: 'CSPPP_Exento',306                            label: "Exento",307                            editor: ValidationTextBox,308                            editOn: 'dblclick',309                            autoSave: true,310                            editorArgs: {311                                style: "width:110px",312                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'313                            }314                        }),//Cuotas Sindicales Pagadas por el patron315                        NominaGridHelper.formatoMontoColumn({316                            field: 'SPI_Gravado',317                            label: "Gravado",318                            editor: ValidationTextBox,319                            editOn: 'dblclick',320                            autoSave: true,321                            editorArgs: {322                                style: "width:110px",323                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'324                            }325                        }),//Subsidios por incapacidad326                        NominaGridHelper.formatoMontoColumn({327                            field: 'SPI_Exento',328                            label: "Exento",329                            editor: ValidationTextBox,330                            editOn: 'dblclick',331                            autoSave: true,332                            editorArgs: {333                                style: "width:110px",334                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'335                            }336                        }),//Subsidios por incapacidad337                        NominaGridHelper.formatoMontoColumn({338                            field: 'Becas_Gravado',339                            label: "Gravado",340                            editor: ValidationTextBox,341                            editOn: 'dblclick',342                            autoSave: true,343                            editorArgs: {344                                style: "width:110px",345                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'346                            }347                        }),//Becas348                        NominaGridHelper.formatoMontoColumn({349                            field: 'Becas_Exento',350                            label: "Exento",351                            editor: ValidationTextBox,352                            editOn: 'dblclick',353                            autoSave: true,354                            editorArgs: {355                                style: "width:110px",356                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'357                            }358                        }),//Becas359                        NominaGridHelper.formatoMontoColumn({360                            field: 'HE_Gravado',361                            label: "Gravado",362                            editor: ValidationTextBox,363                            editOn: 'dblclick',364                            autoSave: true,365                            editorArgs: {366                                style: "width:110px",367                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'368                            },369                            renderCell: function (object, data, td, options) {370                                concatenarError(object, data, 0, "HE_Gravado");371                                return formatoDivTotal(data, td);372                            },373                            renderHeaderCell: function (node) {374                                return formatoHeader(node, 2, "Gravado", domStyle);//Bandera 2 para deducciones375                            }376                        }),//Horas Extra377                        NominaGridHelper.formatoMontoColumn({378                            field: 'HE_Exento',379                            label: "Exento",380                            editor: ValidationTextBox,381                            editOn: 'dblclick',382                            autoSave: true,383                            editorArgs: {384                                style: "width:110px",385                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'386                            }387                        }),//Horas Extra388                        NominaGridHelper.formatoMontoColumn({389                            field: 'PrimaD_Gravado',390                            label: "Gravado",391                            editor: ValidationTextBox,392                            editOn: 'dblclick',393                            autoSave: true,394                            editorArgs: {395                                style: "width:110px",396                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'397                            }398                        }),//Prima Dominical399                        NominaGridHelper.formatoMontoColumn({400                            field: 'PrimaD_Exento',401                            label: "Exento",402                            editor: ValidationTextBox,403                            editOn: 'dblclick',404                            autoSave: true,405                            editorArgs: {406                                style: "width:110px",407                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'408                            }409                        }),//Prima Dominical410                        NominaGridHelper.formatoMontoColumn({411                            field: 'PrimaV_Gravado',412                            label: "Gravado",413                            editor: ValidationTextBox,414                            editOn: 'dblclick',415                            autoSave: true,416                            editorArgs: {417                                style: "width:110px",418                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'419                            }420                        }),//Prima Vacacional421                        NominaGridHelper.formatoMontoColumn({422                            field: 'PrimaV_Exento',423                            label: "Exento",424                            editor: ValidationTextBox,425                            editOn: 'dblclick',426                            autoSave: true,427                            editorArgs: {428                                style: "width:110px",429                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'430                            }431                        }),//Prima Vacacional432                        NominaGridHelper.formatoMontoColumn({433                            field: 'PrimaA_Gravado',434                            label: "Gravado",435                            editor: ValidationTextBox,436                            editOn: 'dblclick',437                            autoSave: true,438                            editorArgs: {439                                style: "width:110px",440                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'441                            }442                        }),//Prima Antigüead443                        NominaGridHelper.formatoMontoColumn({444                            field: 'PrimaA_Exento',445                            label: "Exento",446                            editor: ValidationTextBox,447                            editOn: 'dblclick',448                            autoSave: true,449                            editorArgs: {450                                style: "width:110px",451                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'452                            }453                        }),//Prima Antigüedad454                        NominaGridHelper.formatoMontoColumn({455                            field: 'PPS_Gravado',456                            label: "Gravado",457                            editor: ValidationTextBox,458                            editOn: 'dblclick',459                            autoSave: true,460                            editorArgs: {461                                style: "width:110px",462                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'463                            }464                        }),//Pagos por Separación465                        NominaGridHelper.formatoMontoColumn({466                            field: 'PPS_Exento',467                            label: "Exento",468                            editor: ValidationTextBox,469                            editOn: 'dblclick',470                            autoSave: true,471                            editorArgs: {472                                style: "width:110px",473                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'474                            }475                        }),//Pagos por Separación476                        NominaGridHelper.formatoMontoColumn({477                            field: 'SDR_Gravado',478                            label: "Gravado",479                            editor: ValidationTextBox,480                            editOn: 'dblclick',481                            autoSave: true,482                            editorArgs: {483                                style: "width:110px",484                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'485                            }486                        }),//Seguro de retiro487                        NominaGridHelper.formatoMontoColumn({488                            field: 'SDR_Exento',489                            label: "Exento",490                            editor: ValidationTextBox,491                            editOn: 'dblclick',492                            autoSave: true,493                            editorArgs: {494                                style: "width:110px",495                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'496                            }497                        }),//Seguro de retiro498                        NominaGridHelper.formatoMontoColumn({499                            field: 'Indeminizaciones_Gravado',500                            label: "Gravado",501                            editor: ValidationTextBox,502                            editOn: 'dblclick',503                            autoSave: true,504                            editorArgs: {505                                style: "width:110px",506                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'507                            }508                        }),//Indeminizaciones509                        NominaGridHelper.formatoMontoColumn({510                            field: 'Indeminizaciones_Exento',511                            label: "Exento",512                            editor: ValidationTextBox,513                            editOn: 'dblclick',514                            autoSave: true,515                            editorArgs: {516                                style: "width:110px",517                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'518                            }519                        }),//Indeminizaciones520                        NominaGridHelper.formatoMontoColumn({521                            field: 'RPF_Gravado',522                            label: "Gravado",523                            editor: ValidationTextBox,524                            editOn: 'dblclick',525                            autoSave: true,526                            editorArgs: {527                                style: "width:110px",528                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'529                            }530                        }),//Reembolso por funeral531                        NominaGridHelper.formatoMontoColumn({532                            field: 'RPF_Exento',533                            label: "Exento",534                            editor: ValidationTextBox,535                            editOn: 'dblclick',536                            autoSave: true,537                            editorArgs: {538                                style: "width:110px",539                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'540                            }541                        }),//Reembolso por funeral542                        NominaGridHelper.formatoMontoColumn({543                            field: 'CDSSPPP_Gravado',544                            label: "Gravado",545                            editor: ValidationTextBox,546                            editOn: 'dblclick',547                            autoSave: true,548                            editorArgs: {549                                style: "width:110px",550                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'551                            }552                        }),//Cuotas de seguridad social pagadas por el patrón553                        NominaGridHelper.formatoMontoColumn({554                            field: 'CDSSPPP_Exento',555                            label: "Exento",556                            editor: ValidationTextBox,557                            editOn: 'dblclick',558                            autoSave: true,559                            editorArgs: {560                                style: "width:110px",561                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'562                            }563                        }),//Cuotas de seguridad social pagadas por el patrón564                        NominaGridHelper.formatoMontoColumn({565                            field: 'Comisiones_Gravado',566                            label: "Gravado",567                            editor: ValidationTextBox,568                            editOn: 'dblclick',569                            autoSave: true,570                            editorArgs: {571                                style: "width:110px",572                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'573                            }574                        }),//Comisiones575                        NominaGridHelper.formatoMontoColumn({576                            field: 'Comisiones_Exento',577                            label: "Exento",578                            editor: ValidationTextBox,579                            editOn: 'dblclick',580                            autoSave: true,581                            editorArgs: {582                                style: "width:110px",583                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'584                            }585                        }),//Comisiones586                        NominaGridHelper.formatoMontoColumn({587                            field: 'ValesD_Gravado',588                            label: "Gravado",589                            editor: ValidationTextBox,590                            editOn: 'dblclick',591                            autoSave: true,592                            editorArgs: {593                                style: "width:110px",594                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'595                            }596                        }),//Vales de Despensa597                        NominaGridHelper.formatoMontoColumn({598                            field: 'ValesD_Exento',599                            label: "Exento",600                            editor: ValidationTextBox,601                            editOn: 'dblclick',602                            autoSave: true,603                            editorArgs: {604                                style: "width:110px",605                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'606                            }607                        }),//Vales de Despensa608                        NominaGridHelper.formatoMontoColumn({609                            field: 'ValesR_Gravado',610                            label: "Gravado",611                            editor: ValidationTextBox,612                            editOn: 'dblclick',613                            autoSave: true,614                            editorArgs: {615                                style: "width:110px",616                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'617                            }618                        }),//Vales de restaurante619                        NominaGridHelper.formatoMontoColumn({620                            field: 'ValesR_Exento',621                            label: "Exento",622                            editor: ValidationTextBox,623                            editOn: 'dblclick',624                            autoSave: true,625                            editorArgs: {626                                style: "width:110px",627                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'628                            }629                        }),//Vales de restaurante630                        NominaGridHelper.formatoMontoColumn({631                            field: 'ValesG_Gravado',632                            label: "Gravado",633                            editor: ValidationTextBox,634                            editOn: 'dblclick',635                            autoSave: true,636                            editorArgs: {637                                style: "width:110px",638                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'639                            }640                        }),//Vales de gasolina641                        NominaGridHelper.formatoMontoColumn({642                            field: 'ValesG_Exento',643                            label: "Exento",644                            editor: ValidationTextBox,645                            editOn: 'dblclick',646                            autoSave: true,647                            editorArgs: {648                                style: "width:110px",649                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'650                            }651                        }),//Vales de gasolina652                        NominaGridHelper.formatoMontoColumn({653                            field: 'ValesRopa_Gravado',654                            label: "Gravado",655                            editor: ValidationTextBox,656                            editOn: 'dblclick',657                            autoSave: true,658                            editorArgs: {659                                style: "width:110px",660                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'661                            }662                        }),//Vales de ropa663                        NominaGridHelper.formatoMontoColumn({664                            field: 'ValesRopa_Exento',665                            label: "Exento",666                            editor: ValidationTextBox,667                            editOn: 'dblclick',668                            autoSave: true,669                            editorArgs: {670                                style: "width:110px",671                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'672                            }673                        }),//Vales de ropa674                        NominaGridHelper.formatoMontoColumn({675                            field: 'AyudaRenta_Gravado',676                            label: "Gravado",677                            editor: ValidationTextBox,678                            editOn: 'dblclick',679                            autoSave: true,680                            editorArgs: {681                                style: "width:110px",682                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'683                            }684                        }),//Ayuda para renta685                        NominaGridHelper.formatoMontoColumn({686                            field: 'AyudaRenta_Exento',687                            label: "Exento",688                            editor: ValidationTextBox,689                            editOn: 'dblclick',690                            autoSave: true,691                            editorArgs: {692                                style: "width:110px",693                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'694                            }695                        }),//Ayuda para renta696                        NominaGridHelper.formatoMontoColumn({697                            field: 'AyudaEscolar_Gravado',698                            label: "Gravado",699                            editor: ValidationTextBox,700                            editOn: 'dblclick',701                            autoSave: true,702                            editorArgs: {703                                style: "width:110px",704                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'705                            }706                        }),//Ayuda para Articulos escolares707                        NominaGridHelper.formatoMontoColumn({708                            field: 'AyudaEscolar_Exento',709                            label: "Exento",710                            editor: ValidationTextBox,711                            editOn: 'dblclick',712                            autoSave: true,713                            editorArgs: {714                                style: "width:110px",715                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'716                            }717                        }),//Ayuda para Articulos escolares718                        NominaGridHelper.formatoMontoColumn({719                            field: 'AyudaAnteojos_Gravado',720                            label: "Gravado",721                            editor: ValidationTextBox,722                            editOn: 'dblclick',723                            autoSave: true,724                            editorArgs: {725                                style: "width:110px",726                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'727                            }728                        }),//Ayuda para Anteojos729                        NominaGridHelper.formatoMontoColumn({730                            field: 'AyudaAnteojos_Exento',731                            label: "Exento",732                            editor: ValidationTextBox,733                            editOn: 'dblclick',734                            autoSave: true,735                            editorArgs: {736                                style: "width:110px",737                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'738                            }739                        }),//Ayuda para Anteojos740                        NominaGridHelper.formatoMontoColumn({741                            field: 'AyudaTransporte_Gravado',742                            label: "Gravado",743                            editor: ValidationTextBox,744                            editOn: 'dblclick',745                            autoSave: true,746                            editorArgs: {747                                style: "width:110px",748                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'749                            }750                        }),//Ayuda para Transporte751                        NominaGridHelper.formatoMontoColumn({752                            field: 'AyudaTransporte_Exento',753                            label: "Exento",754                            editor: ValidationTextBox,755                            editOn: 'dblclick',756                            autoSave: true,757                            editorArgs: {758                                style: "width:110px",759                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'760                            }761                        }),//Ayuda para Transporte762                        NominaGridHelper.formatoMontoColumn({763                            field: 'AyudaGF_Gravado',764                            label: "Gravado",765                            editor: ValidationTextBox,766                            editOn: 'dblclick',767                            autoSave: true,768                            editorArgs: {769                                style: "width:110px",770                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'771                            }772                        }),//Ayuda para Gastos de funeral773                        NominaGridHelper.formatoMontoColumn({774                            field: 'AyudaGF_Exento',775                            label: "Exento",776                            editor: ValidationTextBox,777                            editOn: 'dblclick',778                            autoSave: true,779                            editorArgs: {780                                style: "width:110px",781                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'782                            }783                        }),//Ayuda para Gasto de funeral784                        NominaGridHelper.formatoMontoColumn({785                            field: 'OIPS_Gravado',786                            label: "Gravado",787                            editor: ValidationTextBox,788                            editOn: 'dblclick',789                            autoSave: true,790                            editorArgs: {791                                style: "width:110px",792                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'793                            }794                        }),//Otros ingresos por salario795                        NominaGridHelper.formatoMontoColumn({796                            field: 'OIPS_Exento',797                            label: "Exento",798                            editor: ValidationTextBox,799                            editOn: 'dblclick',800                            autoSave: true,801                            editorArgs: {802                                style: "width:110px",803                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'804                            }805                        }),//Otros ingresos por salario 806                        NominaGridHelper.formatoMontoColumn({807                            field: 'JPHDR_Gravado',808                            label: "Gravado",809                            editor: ValidationTextBox,810                            editOn: 'dblclick',811                            autoSave: true,812                            editorArgs: {813                                style: "width:110px",814                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'815                            }816                        }),//Jubilaciones, pensiones o haberes de retiro817                        NominaGridHelper.formatoMontoColumn({818                            field: 'JPHDR_Exento',819                            label: "Exento",820                            editor: ValidationTextBox,821                            editOn: 'dblclick',822                            autoSave: true,823                            editorArgs: {824                                style: "width:110px",825                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'826                            }827                        }),//Jubilaciones, pensiones o haberes de retiro828                        NominaGridHelper.formatoMontoColumn({829                            field: 'JPHDRParciales_Gravado',830                            label: "Gravado",831                            editor: ValidationTextBox,832                            editOn: 'dblclick',833                            autoSave: true,834                            editorArgs: {835                                style: "width:110px",836                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'837                            }838                        }),//Jubilaciones, pensiones o haberes de retiro parciales839                        NominaGridHelper.formatoMontoColumn({840                            field: 'JPHDRParciales_Exento',841                            label: "Exento",842                            editor: ValidationTextBox,843                            editOn: 'dblclick',844                            autoSave: true,845                            editorArgs: {846                                style: "width:110px",847                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'848                            }849                        }),//Jubilaciones, pensiones o haberes de retiro parciales850                        NominaGridHelper.formatoMontoColumn({851                            field: 'IEAOTV_Gravado',852                            label: "Gravado",853                            editor: ValidationTextBox,854                            editOn: 'dblclick',855                            autoSave: true,856                            editorArgs: {857                                style: "width:110px",858                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'859                            }860                        }),//Ingresos en acciones o tÃtulos valor que representan bienes861                        NominaGridHelper.formatoMontoColumn({862                            field: 'IEAOTV_Exento',863                            label: "Exento",864                            editor: ValidationTextBox,865                            editOn: 'dblclick',866                            autoSave: true,867                            editorArgs: {868                                style: "width:110px",869                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'870                            }871                        }),//Ingresos en acciones o tÃtulos valor que representan bienes872                        NominaGridHelper.formatoColumn({873                            field: 'IAAS_Gravado',874                            label: "Gravado",875                            editor: ValidationTextBox,876                            editOn: 'dblclick',877                            autoSave: true,878                            editorArgs: {879                                style: "width:110px",880                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'881                            }882                        }),//Ingresos asimilados a salarios883                        NominaGridHelper.formatoMontoColumn({884                            field: 'IAAS_Exento',885                            label: "Exento",886                            editor: ValidationTextBox,887                            editOn: 'dblclick',888                            autoSave: true,889                            editorArgs: {890                                style: "width:110px",891                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'892                            }893                        }),//Ingresos asimilados a salarios894                        NominaGridHelper.formatoMontoColumn({895                            field: 'Alimentacion_Gravado',896                            label: "Gravado",897                            editor: ValidationTextBox,898                            editOn: 'dblclick',899                            autoSave: true,900                            editorArgs: {901                                style: "width:110px",902                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'903                            }904                        }),//Alimentacion905                        NominaGridHelper.formatoMontoColumn({906                            field: 'Alimentacion_Exento',907                            label: "Exento",908                            editor: ValidationTextBox,909                            editOn: 'dblclick',910                            autoSave: true,911                            editorArgs: {912                                style: "width:110px",913                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'914                            }915                        }),//Alimentacion916                        NominaGridHelper.formatoMontoColumn({917                            field: 'Habitacion_Gravado',918                            label: "Gravado",919                            editor: ValidationTextBox,920                            editOn: 'dblclick',921                            autoSave: true,922                            editorArgs: {923                                style: "width:110px",924                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'925                            }926                        }),//Habitacion927                        NominaGridHelper.formatoMontoColumn({928                            field: 'Habitacion_Exento',929                            label: "Exento",930                            editor: ValidationTextBox,931                            editOn: 'dblclick',932                            autoSave: true,933                            editorArgs: {934                                style: "width:110px",935                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'936                            }937                        }),//Habitacion938                        NominaGridHelper.formatoMontoColumn({939                            field: 'PAsistecia_Gravado',940                            label: "Gravado",941                            editor: ValidationTextBox,942                            editOn: 'dblclick',943                            autoSave: true,944                            editorArgs: {945                                style: "width:110px",946                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'947                            }948                        }),//Premios por asistencia949                        NominaGridHelper.formatoMontoColumn({950                            field: 'PAsistecia_Exento',951                            label: "Exento",952                            editor: ValidationTextBox,953                            editOn: 'dblclick',954                            autoSave: true,955                            editorArgs: {956                                style: "width:110px",957                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'958                            }959                        }),//Premios por asistencia960                        {961                            field: 'TotalPercepcionesGravado',962                            label: "Gravado",963                            autoSave:true,964                            set: function (object) {965                                console.log(object);966                                return a(object);967                            },968                            renderHeaderCell : function (node) {969                                var div = document.createElement('div');970                                div.innerHTML = "Gravado";971                                domStyle.set(div, "text-align", "center");972                                domStyle.set(div, "background-color", "#5A748F");973                                domStyle.set(div, "width", "100%");974                                domStyle.set(div, "height", "100%");975                                domStyle.set(div, "color", "white");976                                domStyle.set(div, "font-weight", "bold");977                                domStyle.set(div, "font-family", "Geneva, Arial, Helvetica, sans-serif");978                                domStyle.set(div, "padding-top", "20px");979                                return div;980                            }981                        },//Total982                        {983                            field: 'TotalPercepcionesExento',984                            label: "Exento",985                            autoSave: true,986                            set: function (object) {987                                return getTotalPercepcionesExento(object);988                            },989                            renderHeaderCell : function (node) {990                                var div = document.createElement('div');991                                div.innerHTML = "Exento";992                                domStyle.set(div, "text-align", "center");993                                domStyle.set(div, "background-color", "#5A748F");994                                domStyle.set(div, "width", "100%");995                                domStyle.set(div, "height", "100%");996                                domStyle.set(div, "color", "white");997                                domStyle.set(div, "font-weight", "bold");998                                domStyle.set(div, "font-family", "Geneva, Arial, Helvetica, sans-serif");999                                domStyle.set(div, "padding-top", "20px");1000                                return div;1001                            }1002                        },//Total1003                        NominaGridHelper.formatoMontoColumn({1004                            field: 'ImporteSeguridadSocial',1005                            label: 'Seguridad Social',1006                            editor: ValidationTextBox,1007                            editOn: 'dblclick',1008                            autoSave: true,1009                            editorArgs: {1010                                style: "width:110px",1011                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1012                            }1013                        }),//ImporteSeguridadSocial1014                        NominaGridHelper.formatoMontoColumn({1015                            field: 'ImporteISR',1016                            label: 'ISR',1017                            editor: ValidationTextBox,1018                            editOn: 'dblclick',1019                            autoSave: true,1020                            editorArgs: {1021                                style: "width:110px",1022                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1023                            }1024                        }),//ImporteISR1025                        NominaGridHelper.formatoMontoColumn({1026                            field: 'ImporteARCEAV',1027                            label: 'Aportaciones a Retiro, CesantÃa en Edad Avanzada y Vejez',1028                            editor: ValidationTextBox,1029                            editOn: 'dblclick',1030                            autoSave: true,1031                            editorArgs: {1032                                style: "width:110px",1033                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1034                            }1035                        }),//Aportaciones a retiro, cesantÃa en edad avanzada y vejez1036                        NominaGridHelper.formatoMontoColumn({1037                            field: 'ImporteOtros',1038                            label: 'Otros',1039                            editor: ValidationTextBox,1040                            editOn: 'dblclick',1041                            autoSave: true,1042                            editorArgs: {1043                                style: "width:110px",1044                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1045                            }1046                        }),//Otros1047                        NominaGridHelper.formatoMontoColumn({1048                            field: 'ImporteDPI',1049                            label: 'Descuento por Incapacidad',1050                            editor: ValidationTextBox,1051                            editOn: 'dblclick',1052                            autoSave: true,1053                            editorArgs: {1054                                style: "width:110px",1055                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1056                            }1057                        }),//Importe Descuento por incapacidad1058                        NominaGridHelper.formatoMontoColumn({1059                            field: 'ImportePA',1060                            label: 'Pensión Alimenticia',1061                            editor: ValidationTextBox,1062                            editOn: 'dblclick',1063                            autoSave: true,1064                            editorArgs: {1065                                style: "width:110px",1066                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1067                            }1068                        }),//Importe pensión alimenticia1069                        NominaGridHelper.formatoMontoColumn({1070                            field: 'ImporteRenta',1071                            label: 'Renta',1072                            editor: ValidationTextBox,1073                            editOn: 'dblclick',1074                            autoSave: true,1075                            editorArgs: {1076                                style: "width:110px",1077                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1078                            }1079                        }),//ImporteRenta1080                        NominaGridHelper.formatoMontoColumn({1081                            field: 'ImportePPFNDLVPLT',1082                            label: 'Préstamos Provenientes del Fondo Nacional de la Vivienda para los Trabajadores',1083                            editor: ValidationTextBox,1084                            editOn: 'dblclick',1085                            autoSave: true,1086                            editorArgs: {1087                                style: "width:110px",1088                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1089                            }1090                        }),//Importe Préstamos provenientes del Fondo nacional de la vivienda para los trabajadores1091                        NominaGridHelper.formatoMontoColumn({1092                            field: 'ImportePPCDV',1093                            label: 'Pago por Crédito de Vivienda',1094                            editor: ValidationTextBox,1095                            editOn: 'dblclick',1096                            autoSave: true,1097                            editorArgs: {1098                                style: "width:110px",1099                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1100                            }1101                        }),//Importe Pago Por Credito De Vivienda1102                        NominaGridHelper.formatoMontoColumn({1103                            field: 'ImporteINFONACOT',1104                            label: 'Pago de Abonos INFONACOT',1105                            editor: ValidationTextBox,1106                            editOn: 'dblclick',1107                            autoSave: true,1108                            editorArgs: {1109                                style: "width:110px",1110                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1111                            }1112                        }),//Importe de Pago de abonos INFONACOT1113                        NominaGridHelper.formatoMontoColumn({1114                            field: 'ImporteADS',1115                            label: 'Anticipo de Salarios',1116                            editor: ValidationTextBox,1117                            editOn: 'dblclick',1118                            autoSave: true,1119                            editorArgs: {1120                                style: "width:110px",1121                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1122                            }1123                        }),//Importe anticipo de Salarios1124                        NominaGridHelper.formatoMontoColumn({1125                            field: 'ImportePHCEAT',1126                            label: 'Pagos Hechos con Exceso al Trabajador',1127                            editor: ValidationTextBox,1128                            editOn: 'dblclick',1129                            autoSave: true,1130                            editorArgs: {1131                                style: "width:110px",1132                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1133                            }1134                        }),//Pagos Hechos con Exceso al Trabajador importe1135                        NominaGridHelper.formatoMontoColumn({1136                            field: 'ImporteErrores',1137                            label: 'ERRORES',1138                            editor: ValidationTextBox,1139                            editOn: 'dblclick',1140                            autoSave: true,1141                            editorArgs: {1142                                style: "width:110px",1143                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1144                            }1145                        }),//Importe Errores1146                        NominaGridHelper.formatoMontoColumn({1147                            field: 'ImportePerdidas',1148                            label: 'Pérdidas',1149                            editor: ValidationTextBox,1150                            editOn: 'dblclick',1151                            autoSave: true,1152                            editorArgs: {1153                                style: "width:110px",1154                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1155                            }1156                        }),//Importe Perdidas1157                        NominaGridHelper.formatoMontoColumn({1158                            field: 'ImporteAverias',1159                            label: 'AverÃas',1160                            editor: ValidationTextBox,1161                            editOn: 'dblclick',1162                            autoSave: true,1163                            editorArgs: {1164                                style: "width:110px",1165                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1166                            }1167                        }),//Importe AverÃas1168                        NominaGridHelper.formatoMontoColumn({1169                            field: 'ImporteAdquisicionArticulos',1170                            label: 'Adquisición de ArtÃculos',1171                            editor: ValidationTextBox,1172                            editOn: 'dblclick',1173                            autoSave: true,1174                            editorArgs: {1175                                style: "width:110px",1176                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1177                            }1178                        }),//Importe Adquisición de articulos1179                        NominaGridHelper.formatoMontoColumn({1180                            field: 'ImporteCuotasConstitucion',1181                            label: 'Cuotas para la Constitución y Fomento de Sociedades Cooperativas y de Cajas de Ahorro',1182                            editor: ValidationTextBox,1183                            editOn: 'dblclick',1184                            autoSave: true,1185                            editorArgs: {1186                                style: "width:110px",1187                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1188                            }1189                        }),//Cuotas para la constitución y fomento de sociedades cooperativas y de cajas de ahorro1190                        NominaGridHelper.formatoMontoColumn({1191                            field: 'ImporteCuotasSindicales',1192                            label: 'Cuotas Sindicales',1193                            editor: ValidationTextBox,1194                            editOn: 'dblclick',1195                            autoSave: true,1196                            editorArgs: {1197                                style: "width:110px",1198                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1199                            }1200                        }),//Importe Cuotas Sindicales1201                        NominaGridHelper.formatoMontoColumn({1202                            field: 'ImporteAusencia',1203                            label: 'Ausencia',1204                            editor: ValidationTextBox,1205                            editOn: 'dblclick',1206                            autoSave: true,1207                            editorArgs: {1208                                style: "width:110px",1209                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1210                            }1211                        }),//Importe Ausencia1212                        NominaGridHelper.formatoMontoColumn({1213                            field: 'ImporteObreroP',1214                            label: 'Cuotas Obrero Patronales',1215                            editor: ValidationTextBox,1216                            editOn: 'dblclick',1217                            autoSave: true,1218                            editorArgs: {1219                                style: "width:110px",1220                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1221                            }1222                        }),//Importe cutoas obrero patronales1223                        NominaGridHelper.formatoMontoColumn({1224                            field: 'ImporteImpuestosL',1225                            label: 'Impuestos Locales',1226                            editor: ValidationTextBox,1227                            editOn: 'dblclick',1228                            autoSave: true,1229                            editorArgs: {1230                                style: "width:110px",1231                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1232                            }1233                        }),//Importe impuestos locales1234                        NominaGridHelper.formatoMontoColumn({1235                            field: 'ImporteAportacionesV',1236                            label: 'Aportaciones Voluntarias',1237                            editor: ValidationTextBox,1238                            editOn: 'dblclick',1239                            autoSave: true,1240                            editorArgs: {1241                                style: "width:110px",1242                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1243                            }1244                        }),//Importe aportaciones voluntarias1245                        {1246                            field: 'TotalDeducciones',1247                            label: "Deducciones", colSpan: 2,1248                            autoSave: true,1249                            set: function (object) {1250                                return getTotalDeducciones(object);1251                            }1252                        },//Total Deducciones1253                        1254                        NominaGridHelper.formatoColumn({1255                            field: 'RiesgoTrabajoDias',1256                            label: "Dias"1257                        }),//Riesgo de trabajo dias1258                        NominaGridHelper.formatoColumn({1259                            field: 'RiesgoTrabajoDescuento',1260                            label: "Descuento"1261                        }),//Riesgo de trabajo Descuento1262                        NominaGridHelper.formatoColumn({1263                            field: 'RiesgoEnfermedadDias',1264                            label: "Dias"1265                        }),//Riesgo Enfermedades en General dias.1266                        NominaGridHelper.formatoColumn({1267                            field: 'RiesgoEnfermedadDescuento',1268                            label: "Descuento"1269                        }),//Riesgo Enferemedades en General Descuento.1270                        NominaGridHelper.formatoColumn({1271                            field: 'MaternidadDias',1272                            label: "Dias"1273                        }),//Maternidad dias.1274                        NominaGridHelper.formatoColumn({1275                            field: 'MaternidadDescuento',1276                            label: "Descuento"1277                        }),//Maternidad Descuento.1278                        NominaGridHelper.formatoColumn({1279                            field: 'TotalIncapacidadesDias',1280                            label: "DÃas"1281                        }),//Total de las incapacidades Dias1282                        NominaGridHelper.formatoColumn({1283                            field: 'TotalIncapacidadesDescuento',1284                            label: "Descuento"1285                        }),//Total de las incapacidades Descuento1286                        NominaGridHelper.formatoColumn({1287                            field: 'HorasExD_Dias',1288                            label: "Dias"1289                        }),//HorasExtraDobles dias.1290                        NominaGridHelper.formatoColumn({1291                            field: 'HorasExD_Horas',1292                            label: "Horas"1293                        }),//Horas Extra Dobles horas.1294                        NominaGridHelper.formatoColumn({1295                            field: 'HorasExD_Importe',1296                            label: "Importe"1297                        }),//Horas Extras Dobles importe1298                        NominaGridHelper.formatoColumn({1299                            field: 'HorasExT_Dias',1300                            label: "Dias"1301                        }),//HorasExtra Triples dias.1302                        NominaGridHelper.formatoColumn({1303                            field: 'HorasExT_Horas',1304                            label: "Horas"1305                        }),//Horas Extra Triples horas.1306                        NominaGridHelper.formatoColumn({1307                            field: 'HorasExT_Importe',1308                            label: "Importe"1309                        }),//Horas Extras Triples importe1310                        NominaGridHelper.formatoColumn({1311                            field: 'HorasExS_Dias',1312                            label: "Dias"1313                        }),//Horas Extra Simples dias.1314                        NominaGridHelper.formatoColumn({1315                            field: 'HorasExS_Horas',1316                            label: "Horas"1317                        }),//Horas Extra Simples horas.1318                        NominaGridHelper.formatoColumn({1319                            field: 'HorasExS_Importe',1320                            label: "Importe"1321                        }),//Horas Extras Simples importe1322                        NominaGridHelper.formatoColumn({1323                            field: 'TotalHE',1324                            label: "Total Horas Extra"1325                        }),//Total Horas Extra1326                        NominaGridHelper.formatoColumn({//Reintegro de ISR pagado en exeso1327                            field: 'Reintegro_ISR',1328                            label: 'Reintegro de ISR pagado en exceso (siempre que no haya sido enterado al SAT).',1329                            editor: ValidationTextBox,1330                            editOn: 'dblclick',1331                            autoSave: true,1332                            editorArgs: {1333                                style: "width:110px",1334                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1335                            }1336                        }),1337                        NominaGridHelper.formatoColumn({//Subsidio para el empleo efectivamente entregado1338                            field: 'SubsidioEmpleoEfecEntregado',1339                            label: 'Subsidio para el Empleo Efectivamente Entregado',1340                            editor: ValidationTextBox,1341                            editOn: 'dblclick',1342                            autoSave: true,1343                            editorArgs: {1344                                style: "width:110px",1345                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1346                            }1347                        }),1348                        NominaGridHelper.formatoColumn({//Viáticos (entregados al trabajador).1349                            field: 'ViaticosEntregadosTrabajador',1350                            label: 'Viáticos (Entregados al trabajador).',1351                            editor: ValidationTextBox,1352                            editOn: 'dblclick',1353                            autoSave: true,1354                            editorArgs: {1355                                style: "width:110px",1356                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1357                            }1358                        }),1359                        NominaGridHelper.formatoColumn({//Aplicación de saldo a favor por compensación anual.1360                            field: 'AplicacionSaldoAFavorCompensacionAnual',1361                            label: 'Aplicación de Saldo a Favor por Compensación Anual  Importe',1362                            editor: ValidationTextBox,1363                            editOn: 'dblclick',1364                            autoSave: true,1365                            editorArgs: {1366                                style: "width:110px",1367                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1368                            }1369                        }),1370                        NominaGridHelper.formatoColumn({//Pagos distintos a los listados y que no deben considerarse como ingreso por sueldos, salarios o ingresos asimilados..1371                            field: 'PagosDistintosALosListados',1372                            label: 'Pagos Distintos a los Listados y que no Deben Considerarse como Ingreso por Sueldos, Salarios o Ingresos Asimilados.',1373                            editor: ValidationTextBox,1374                            editOn: 'dblclick',1375                            autoSave: true,1376                            editorArgs: {1377                                style: "width:110px",1378                                regExp: '(^[0-9]+)|(^[0-9]+\.[0-9]{1,3})'1379                            }1380                        })/*1381                        {1382                            field: 'checkRegistro',1383                            label: 'isValid',1384                            editor: CheckBox,1385                            renderHeaderCell: function (node) {1386                                return formatoHeader(node, 2, "valido<br/>", domStyle);//Bandera 2 para deducciones1387                            },1388                            editorArgs: {1389                                value: "checked"1390                            }1391                        }*/1392                    ],1393                    [1394                        NominaGridHelper.formatoColumn({ field: 'totalGAB', label: 'Total', colSpan: 7 }),1395                        NominaGridHelper.formatoColumn({ field: 'sueldoH', label: 'Sueldo', colSpan: 2 }),1396                        NominaGridHelper.formatoColumn({ field: 'aguinaldoH', label: 'Aguinaldo', colSpan: 2 }),1397                        NominaGridHelper.formatoColumn({ field: 'PTUH', label: 'PTU', colSpan: 2 }),1398                        NominaGridHelper.formatoColumn({ field: 'RDGMDYHH', label: 'Reembolso de Gastos Médicos Dentales y Hospitalarios', colSpan: 2 }),1399                        NominaGridHelper.formatoColumn({ field: 'FONDODEAHORROH', label: 'Fondo de ahorro', colSpan: 2 }),1400                        NominaGridHelper.formatoColumn({ field: 'CAJADEAHORROH', label: 'Caja de ahorro', colSpan: 2 }),1401                        NominaGridHelper.formatoColumn({ field: 'CONTRIBUCIONESACARGODELTRABAJADORPAGADASPORELPATRON', label: 'Contribuciones a cargo del trabajador pagadas por el patrón', colSpan: 2 }),1402                        NominaGridHelper.formatoColumn({ field: 'PREMIOPUNTURALIDADH', label: 'Premio puntualidad', colSpan: 2 }),1403                        NominaGridHelper.formatoColumn({ field: 'PRIMADESEGURODEVIDAH', label: 'Prima de seguro de vida', colSpan: 2 }),1404                        NominaGridHelper.formatoColumn({ field: 'SEGURODEGASTOSMEDICOSMAYORESH', label: 'Seguro de gastos médicos mayores', colSpan: 2 }),1405                        NominaGridHelper.formatoColumn({ field: 'CUOTASSINDICALESPAGADASPORELPATRONH', label: 'Cuotas sindicales pagadas por el patrón', colSpan: 2 }),1406                        NominaGridHelper.formatoColumn({ field: 'SUBSIDIOSPORINCAPACIDADH', label: 'Subsidios por incapacidad', colSpan: 2 }),1407                        NominaGridHelper.formatoColumn({ field: 'BECASH', label: 'Becas', colSpan: 2 }),1408                        NominaGridHelper.formatoColumn({ field: 'HORASEXTRAH', label: 'Horas extra', colSpan: 2 }),1409                        NominaGridHelper.formatoColumn({ field: 'PRIMADOMINICALH', label: 'Prima dominical', colSpan: 2 }),1410                        NominaGridHelper.formatoColumn({ field: 'PRIMAVACACIONALH', label: 'Prima vacacional', colSpan: 2 }),1411                        NominaGridHelper.formatoColumn({ field: 'PRIMAANTIGUEDADH', label: 'Prima antigüedad', colSpan: 2 }),1412                        NominaGridHelper.formatoColumn({ field: 'PAGOSPORSEPARACIONH', label: 'Pagos por separación', colSpan: 2 }),1413                        NominaGridHelper.formatoColumn({ field: 'SEGURODERETIROH', label: 'Seguro de retiro', colSpan: 2 }),1414                        NominaGridHelper.formatoColumn({ field: 'INDEMINIZACIONESH', label: 'Indeminizaciones', colSpan: 2 }),1415                        NominaGridHelper.formatoColumn({ field: 'REEMBOLSOPORFUNERALH', label: 'Reembolso por funeral', colSpan: 2 }), 1416                        NominaGridHelper.formatoColumn({ field: 'CUOTASDESEGURIDADSOCIALPAGADDASPORELPATRONH', label: 'Cuotas de seguridad social pagadas por el patrón', colSpan: 2 }),1417                        NominaGridHelper.formatoColumn({ field: 'ComisioenesH', label: 'Comisiones', colSpan: 2 }),1418                        NominaGridHelper.formatoColumn({ field: 'VALESDEDESPENSAH', label: 'Vales de despensa', colSpan: 2 }),1419                        NominaGridHelper.formatoColumn({ field: 'VALESDERESTAURANTEH', label: 'Vales de restaurante', colSpan: 2 }),1420                        NominaGridHelper.formatoColumn({ field: 'VALESDEGASOLINAH', label: 'Vales de gasolina', colSpan: 2 }),1421                        NominaGridHelper.formatoColumn({ field: 'VALESROPAH', label: 'Vales de ropa', colSpan: 2 }),1422                        NominaGridHelper.formatoColumn({ field: 'AYUDAPARARENTAH', label: 'Ayuda para renta', colSpan: 2 }),1423                        NominaGridHelper.formatoColumn({ field: 'AYUDAPARAARTICULOSESCOLARESH', label: 'Ayuda para artÃculos escolares', colSpan: 2 }),1424                        NominaGridHelper.formatoColumn({ field: 'ANTEOJOSH', label: 'Ayuda para anteojos', colSpan: 2 }),1425                        NominaGridHelper.formatoColumn({ field: 'TRANSPORTEH', label: 'Ayuda para transporte', colSpan: 2 }),1426                        NominaGridHelper.formatoColumn({ field: 'AYUDAPARAGASTOSDEFUNERALH', label: 'Ayuda para gastos de funeral', colSpan: 2 }),1427                        NominaGridHelper.formatoColumn({ field: 'OTROSINGRESOSPORSALARIOSH', label: 'Otros ingresos por salarios', colSpan: 2 }),1428                        NominaGridHelper.formatoColumn({ field: 'JUBILACIONESPENSIONESOHABERESDERETIROH', label: 'Jubilaciones, pensiones o haberes de retiro', colSpan: 2 }),1429                        NominaGridHelper.formatoColumn({ field: 'JUBILACIONESPENSIONESOHABERESDERETIROENPARCIALIDADESH', label: 'Jubilaciones, pensiones o haberes de retiro en parcialidades', colSpan: 2 }),1430                        NominaGridHelper.formatoColumn({ field: 'INGRESOSENACCIONESOTITULOSH', label: 'Ingresos en Acciones o TÃtulos Valor que Representen Bienes', colSpan: 2 }),1431                        NominaGridHelper.formatoColumn({ field: 'INGRESOSASIMILADOSASALARIOSH', label: 'Ingresos Asimilados a Salarios', colSpan: 2 }),1432                        NominaGridHelper.formatoColumn({ field: 'ALIMENTACIONH', label: 'Alimentación', colSpan: 2 }),1433                        NominaGridHelper.formatoColumn({ field: 'HABITACIONH', label: 'Habitación', colSpan: 2 }),1434                        NominaGridHelper.formatoColumn({ field: 'PREMIOSPORASISTENCIAH', label: 'Premios por asistencia', colSpan: 2 }),1435                        NominaGridHelper.formatoColumn({ field: 'TOTALPERCEPCIONESH', label: 'Total Percepciones', colSpan: 2 }),1436                        NominaGridHelper.formatoColumn({ field: 'ImporteSeguridadSocialH', label: 'Importe', colSpan: 1 }),1437                        NominaGridHelper.formatoColumn({ field: 'ISRH', label: 'Importe', colSpan: 1 }),1438                        NominaGridHelper.formatoColumn({ field: 'APORTACIONESARETIROEDADAVANZADA', label: 'Importe', colSpan: 1 }),1439                        NominaGridHelper.formatoColumn({ field: 'ISRH', label: 'Importe', colSpan: 1 }),1440                        NominaGridHelper.formatoColumn({ field: 'APORTACIONESARETIROEDADAVANZADA', label: 'Importe', colSpan: 1 }),1441                        NominaGridHelper.formatoColumn({ field: 'APORTACIONESARETIROEDADAVANZADA', label: 'Importe', colSpan: 1 }),1442                        NominaGridHelper.formatoColumn({ field: 'ISRH', label: 'Importe', colSpan: 1 }),1443                        NominaGridHelper.formatoColumn({ field: 'APORTACIONESARETIROEDADAVANZADA', label: 'Importe', colSpan: 1 }),1444                        NominaGridHelper.formatoColumn({ field: 'APORTACIONESARETIROEDADAVANZADA', label: 'Importe', colSpan: 1 }),1445                        NominaGridHelper.formatoColumn({ field: 'ISRH', label: 'Importe', colSpan: 1 }),1446                        NominaGridHelper.formatoColumn({ field: 'APORTACIONESARETIROEDADAVANZADA', label: 'Importe', colSpan: 1 }),1447                        NominaGridHelper.formatoColumn({ field: 'ImporteSeguridadSocialH', label: 'Importe', colSpan: 1 }),1448                        NominaGridHelper.formatoColumn({ field: 'ISRH', label: 'Importe', colSpan: 1 }),1449                        NominaGridHelper.formatoColumn({ field: 'APORTACIONESARETIROEDADAVANZADA', label: 'Importe', colSpan: 1 }),1450                        NominaGridHelper.formatoColumn({ field: 'ISRH', label: 'Importe', colSpan: 1 }),1451                        NominaGridHelper.formatoColumn({ field: 'APORTACIONESARETIROEDADAVANZADA', label: 'Importe', colSpan: 1 }),1452                        NominaGridHelper.formatoColumn({ field: 'APORTACIONESARETIROEDADAVANZADA', label: 'Importe', colSpan: 1 }),1453                        NominaGridHelper.formatoColumn({ field: 'ISRH', label: 'Importe', colSpan: 1 }),1454                        NominaGridHelper.formatoColumn({ field: 'APORTACIONESARETIROEDADAVANZADA', label: 'Importe', colSpan: 1 }),1455                        NominaGridHelper.formatoColumn({ field: 'APORTACIONESARETIROEDADAVANZADA', label: 'Importe', colSpan: 1 }),1456                        NominaGridHelper.formatoColumn({ field: 'ISRH', label: 'Importe', colSpan: 1 }),1457                        NominaGridHelper.formatoColumn({ field: 'APORTACIONESARETIROEDADAVANZADA', label: 'Importe', colSpan: 1 }),1458                        NominaGridHelper.formatoColumn({ field: 'APORTACIONESARETIROEDADAVANZADA', label: 'Total', colSpan: 2 }),1459                        NominaGridHelper.formatoColumn({ field: 'RIESGODETRABAJOH', label: 'Riesgo de trabajo', colSpan: 2 }),1460                        NominaGridHelper.formatoColumn({ field: 'RIESGOENFERMEDADESENGENERALH', label: 'Riesgo enfermedades en general', colSpan: 2 }),1461                        NominaGridHelper.formatoColumn({ field: 'MATERNIDADH', label: 'Maternidad', colSpan: 2 }),1462                        NominaGridHelper.formatoColumn({ field: 'TOTALINCAPACIDADESH', label: 'Total incapacidades', colSpan: 2 }),1463                        NominaGridHelper.formatoColumn({ field: 'HORASEXTRADOBLESH', label: 'Horas extra dobles', colSpan: 3 }),1464                        NominaGridHelper.formatoColumn({ field: 'HORASEXTRATRIPLESH', label: 'Horas extra triples', colSpan: 3 }),1465                        NominaGridHelper.formatoColumn({ field: 'HORASEXTRASIMPLESH', label: 'Horas extra simples', colSpan: 3 }),1466                        NominaGridHelper.formatoColumn({ field: 'IMPORTEHHH', label: 'Importe', colSpan: 1 }),1467                        NominaGridHelper.formatoColumn({ field: 'IMPORTEHHH', label: 'Importe', colSpan: 1 }),1468                        NominaGridHelper.formatoColumn({ field: 'IMPORTEHHH', label: 'Importe', colSpan: 1 }),1469                        NominaGridHelper.formatoColumn({ field: 'IMPORTEHHH', label: 'Importe', colSpan: 1 }),1470                        NominaGridHelper.formatoColumn({ field: 'IMPORTEHHH', label: 'Importe', colSpan: 1 }),1471                        NominaGridHelper.formatoColumn({ field: 'IMPORTEHHH', label: 'Importe', colSpan: 1 })1472                    ]1473                ]//Fin del Segundo ColumnSet1474            ]1475    });...Invest.py
Source:Invest.py  
...15        self.page2.wait_for_timeout(5000)16        self.page2.frame(name="fraInterface").click("text=ååè³è¨éå
¥")17        self.page2.wait_for_timeout(2000)18        # 輸å
¥éªç¨®ç·¨ç¢¼19        self.page2.frame(name="fraInterface").dblclick("input[name=\"RiskCode\"]")20        self.page2.frame(name="fraInterface").fill("input[name=\"RiskCode\"]", product["productId"])21        self.page2.frame(name="fraInterface").select_option("select[name=\"codeselect\"]",product["productId"])22        self.page2.frame(name="fraInterface").press("input[name=\"RiskCode\"]", "Enter")23        # Click text=é²å
¥ååéå
¥ç«é¢24        self.page2.frame(name="fraInterface").click("input[name=\"back\"]")25        self.page2.wait_for_timeout(2000)26        # (ç±æ¤èéå§ä¿®æ¹)27        if(product["productId"]=="NIFA0802" or product["productId"]=="NIFA0801"):28            self.page2.frame(name="fraInterface").click("input[name=\"Prem\"]")29            self.page2.frame(name="fraInterface").fill("input[name=\"Prem\"]", product["price"])30            # å¹´é給ä»éå§å¹´é½¡31            self.page2.frame(name="fraInterface").click("input[name=\"GetYear\"]")32            self.page2.frame(name="fraInterface").fill("input[name=\"GetYear\"]", "45")33            # å¹´éçµ¦ä»æ¹å¼34            self.page2.frame(name="fraInterface").dblclick("input[name=\"GetIntv\"]")35            self.page2.frame(name="fraInterface").fill("input[name=\"GetIntv\"]", "0")36            # çµ¦ä»æ¹å¼37            self.page2.frame(name="fraInterface").select_option("select[name=\"codeselect\"]",value='0')38            self.page2.frame(name="fraInterface").press("input[name=\"GetIntv\"]", "Enter")39            # å¹£å¥40            # CurrencyCode41            self.page2.frame(name="fraInterface").dblclick("input[name=\"CurrencyCode\"]")42            self.page2.frame(name="fraInterface").fill("input[name=\"CurrencyCode\"]", product["CurrencyCode"])43            # 鏿幣å¥44            self.page2.frame(name="fraInterface").select_option("select[name=\"codeselect\"]",product["CurrencyCode"])45            self.page2.frame(name="fraInterface").press("input[name=\"CurrencyCode\"]", "Enter")46            # ä¿å47            self.page2.frame(name="fraInterface").click("text=ä¿ å")48            # self.page2.wait_for_timeout(100000)49            50             # é¸æææ¨çï¼åºå®é¸E00251            if(product["investTarget1"] != product["investTarget2"]):52                self.page2.frame(name="fraInterface").dblclick("input[name=\"InvestPlanRate1\"]")53                self.page2.frame(name="fraInterface").select_option("select[name=\"codeselect\"]",product["investTarget1"])54                self.page2.frame(name="fraInterface").press("input[name=\"InvestPlanRate1\"]", "Enter")55                # 輸å
¥æè³è¶´æ¸56                self.page2.frame(name="fraInterface").fill("input[name=\"InvestPlanRate5\"]", product["InvestPlanRate"])57                # 輸å
¥æ¯ææ£é¤é åº58                self.page2.frame(name="fraInterface").fill("#InvestPlanRate7r0", "1")59                60                # å¢å ä¸æ¬61                self.page2.frame(name="fraInterface").click("input[name=\"InvestPlanRateaddOne\"]")62                # ç¬¬äºæ¬æè³æ¨ç63                self.page2.frame(name="fraInterface").dblclick("#InvestPlanRate1r1")64                self.page2.frame(name="fraInterface").select_option("select[name=\"codeselect\"]",product["investTarget2"])65                self.page2.frame(name="fraInterface").press("#InvestPlanRate1r1", "Enter")66                # æè³è¶´æ¸67                self.page2.frame(name="fraInterface").fill("#InvestPlanRate5r1", product["InvestPlanRate"])68                # 輸å
¥æ¯ææ£é¤é åº69                self.page2.frame(name="fraInterface").fill("#InvestPlanRate7r1", "2")70                # æ·»å 71                self.page2.frame(name="fraInterface").click("input[name=\"submitFormButton\"]")72                # ä¸ä¸æ¥73                self.page2.frame(name="fraInterface").click("#riskbutton1")74            elif(product["investTarget1"] == product["investTarget2"]):75                self.page2.frame(name="fraInterface").dblclick("input[name=\"InvestPlanRate1\"]")76                self.page2.frame(name="fraInterface").select_option("select[name=\"codeselect\"]",product["investTarget1"])77                self.page2.frame(name="fraInterface").press("input[name=\"InvestPlanRate1\"]", "Enter")78                # 輸å
¥æè³è¶´æ¸79                self.page2.frame(name="fraInterface").fill("input[name=\"InvestPlanRate5\"]", "100")80                # 輸å
¥æ¯ææ£é¤é åº81                self.page2.frame(name="fraInterface").fill("#InvestPlanRate7r0", "1")82                # # å¢å ä¸æ¬83                # self.page2.frame(name="fraInterface").click("input[name=\"InvestPlanRateaddOne\"]")84                # # ç¬¬äºæ¬æè³æ¨ç85                # self.page2.frame(name="fraInterface").dblclick("#InvestPlanRate1r1")86                # self.page2.frame(name="fraInterface").select_option("select[name=\"codeselect\"]",product["investTarget2"])87                # self.page2.frame(name="fraInterface").press("#InvestPlanRate1r1", "Enter")88                # # æè³è¶´æ¸89                # self.page2.frame(name="fraInterface").fill("#InvestPlanRate5r1", product["InvestPlanRate"])90                # # 輸å
¥æ¯ææ£é¤é åº91                # self.page2.frame(name="fraInterface").fill("#InvestPlanRate7r1", "2")92                # æ·»å 93                self.page2.frame(name="fraInterface").click("input[name=\"submitFormButton\"]")94                # ä¸ä¸æ¥95                self.page2.frame(name="fraInterface").click("#riskbutton1")96        # elif(product["productId"]!="NIFA0802"):97        else:98            # 輸å
¥ä¿é¡  Amnt99            self.page2.frame(name="fraInterface").click("#Amnt")100            self.page2.frame(name="fraInterface").fill("#Amnt", product["price"])101            # 鏿åå¥ PolType ç²ä¹å102            self.page2.frame(name="fraInterface").dblclick("input[name=\"PolType\"]")103            self.page2.frame(name="fraInterface").fill("input[name=\"PolType\"]", product["PolType"])104            self.page2.frame(name="fraInterface").select_option("select[name=\"codeselect\"]",product["PolType"])105            self.page2.frame(name="fraInterface").press("input[name=\"PolType\"]", "Enter")106            ## åå¹´ç¹³107            if (product["PayIntv"]=="6"):108                # è¶
é¡å®æ class datagrid-editable-input109                self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[2]/td[4]")110                # æ¤èelementçºé¸ætdç第ä¸åæ¡ï¼è¥è¦é¸æå¾æ¹çç¹³å¥åéææelement[3]111                element=self.page2.frame(name="fraInterface").query_selector_all("input.datagrid-editable-input")112                element[2].fill(product["price2"])113                # éè·³åºå»éæå
¶ä»æ¬ä½ï¼è§£é¤é該æ»å輸å
¥æ¡éå®å¾ï¼åè¡å°è¼¸å
¥æ¡ç¬¬ä¸æ¬ä½è¼¸å
¥å¼114                self.page2.frame(name="fraInterface").dblclick("#Amnt")115                # ç®æ¨ä¿è²»  class datagrid-editable-input116                self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[1]/td[4]")117                element=self.page2.frame(name="fraInterface").query_selector_all("input.datagrid-editable-input")118                element[2].fill(product["price1"])119                # ç¹³å¥  combo-text validatebox-text120                self.page2.frame(name="fraInterface").dblclick("#Amnt")121                # ç¬¬ä¸æ¬ç¹³å¥122                self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[1]/td[4]")123                # 黿䏿鏿¡124                self.page2.frame(name="fraInterface").click("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[1]/td[5]/div/table/tbody/tr/td/span/span/span")125                # å¼·å¶é»æåå¹´ç¹³126                self.page2.frame(name="fraInterface").dispatch_event("//html/body/div[2]/div/div[3]","click")127                # ç¬¬äºæ¬ç¹³å¥128                self.page2.frame(name="fraInterface").dblclick("#Amnt")129                self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[2]/td[5]")130                # å¼·å¶é»æåå¹´ç¹³131                self.page2.frame(name="fraInterface").dispatch_event("//html/body/div[3]/div/div[3]","click")132                # self.page2.frame(name="fraInterface").fill("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[2]/td[5]/div/table/tbody/tr/td/span/input[1]",product["PayIntv"])133                # self.page2.frame(name="fraInterface").press("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[2]/td[5]/div/table/tbody/tr/td/span/input[1]", "Enter")134                # ä¿å135                self.page2.frame(name="fraInterface").click("text=ä¿ å")136                print("å年繳繳å¥é¸ææå")137            ## å¹´ç¹³138            elif (product["PayIntv"]=="12"):139                # è¶
é¡å®æ class datagrid-editable-input140                # /html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[2]/td[4]141                self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[2]/td[4]")142                # æ¤èelementçºé¸ætdç第ä¸åæ¡ï¼è¥è¦é¸æå¾æ¹çç¹³å¥åéææelement[3]143                element=self.page2.frame(name="fraInterface").query_selector_all("input.datagrid-editable-input")144                element[2].fill(product["price2"])145                # éè·³åºå»éæå
¶ä»æ¬ä½ï¼è§£é¤é該æ»å輸å
¥æ¡éå®å¾ï¼åè¡å°è¼¸å
¥æ¡ç¬¬ä¸æ¬ä½è¼¸å
¥å¼146                self.page2.frame(name="fraInterface").dblclick("#Amnt")147                # ç®æ¨ä¿è²»  class datagrid-editable-input148                self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[1]/td[4]")149                element=self.page2.frame(name="fraInterface").query_selector_all("input.datagrid-editable-input")150                element[2].fill(product["price1"])151                # ç¹³å¥  combo-text validatebox-text152                self.page2.frame(name="fraInterface").dblclick("#Amnt")153                # ç¬¬ä¸æ¬ç¹³å¥154                # /html/body/div[2]/div/div[5]155                self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[1]/td[4]")156                # 黿䏿鏿¡157                self.page2.frame(name="fraInterface").click("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[1]/td[5]/div/table/tbody/tr/td/span/span/span")158                # å¼·å¶é»æå¹´ç¹³159                self.page2.frame(name="fraInterface").dispatch_event("//html/body/div[2]/div/div[5]","click")160                # ç¬¬äºæ¬ç¹³å¥161                self.page2.frame(name="fraInterface").dblclick("#Amnt")162                self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[2]/td[5]")163                # å¼·å¶é»æå¹´ç¹³164                self.page2.frame(name="fraInterface").dispatch_event("//html/body/div[3]/div/div[5]","click")165                # ä¿å166                self.page2.frame(name="fraInterface").click("text=ä¿ å")167                print("年繳繳å¥é¸ææå")168            ## æç¹³169            elif (product["PayIntv"]=="1"):170                # è¶
é¡å®æ class datagrid-editable-input171                # /html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[2]/td[4]172                self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[2]/td[4]")173                # æ¤èelementçºé¸ætdç第ä¸åæ¡ï¼è¥è¦é¸æå¾æ¹çç¹³å¥åéææelement[3]174                element=self.page2.frame(name="fraInterface").query_selector_all("input.datagrid-editable-input")175                element[2].fill(product["price2"])176                # éè·³åºå»éæå
¶ä»æ¬ä½ï¼è§£é¤é該æ»å輸å
¥æ¡éå®å¾ï¼åè¡å°è¼¸å
¥æ¡ç¬¬ä¸æ¬ä½è¼¸å
¥å¼177                self.page2.frame(name="fraInterface").dblclick("#Amnt")178                # ç®æ¨ä¿è²»  class datagrid-editable-input179                self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[1]/td[4]")180                element=self.page2.frame(name="fraInterface").query_selector_all("input.datagrid-editable-input")181                element[2].fill(product["price1"])182                # ç¹³å¥  combo-text validatebox-text183                self.page2.frame(name="fraInterface").dblclick("#Amnt")184                # ç¬¬ä¸æ¬ç¹³å¥185                # /html/body/div[2]/div/div[5]186                self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[1]/td[4]")187                # 黿䏿鏿¡188                self.page2.frame(name="fraInterface").click("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[1]/td[5]/div/table/tbody/tr/td/span/span/span")189                # å¼·å¶é»ææç¹³190                self.page2.frame(name="fraInterface").dispatch_event("//html/body/div[2]/div/div[1]","click")191                # ç¬¬äºæ¬ç¹³å¥192                self.page2.frame(name="fraInterface").dblclick("#Amnt")193                self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[2]/td[5]")194                # å¼·å¶é»ææç¹³195                self.page2.frame(name="fraInterface").dispatch_event("//html/body/div[3]/div/div[1]","click")196                # ä¿å197                self.page2.frame(name="fraInterface").click("text=ä¿ å")198                print("æç¹³ç¹³å¥é¸ææå")199            ## å£ç¹³200            elif (product["PayIntv"]=="3"):201                # è¶
é¡å®æ class datagrid-editable-input202                # /html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[2]/td[4]203                self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[2]/td[4]")204                # æ¤èelementçºé¸ætdç第ä¸åæ¡ï¼è¥è¦é¸æå¾æ¹çç¹³å¥åéææelement[3]205                element=self.page2.frame(name="fraInterface").query_selector_all("input.datagrid-editable-input")206                element[2].fill(product["price2"])207                # éè·³åºå»éæå
¶ä»æ¬ä½ï¼è§£é¤é該æ»å輸å
¥æ¡éå®å¾ï¼åè¡å°è¼¸å
¥æ¡ç¬¬ä¸æ¬ä½è¼¸å
¥å¼208                self.page2.frame(name="fraInterface").dblclick("#Amnt")209                # ç®æ¨ä¿è²»  class datagrid-editable-input210                self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[1]/td[4]")211                element=self.page2.frame(name="fraInterface").query_selector_all("input.datagrid-editable-input")212                element[2].fill(product["price1"])213                # ç¹³å¥  combo-text validatebox-text214                self.page2.frame(name="fraInterface").dblclick("#Amnt")215                # ç¬¬ä¸æ¬ç¹³å¥216                # /html/body/div[2]/div/div[5]217                self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[1]/td[4]")218                # 黿䏿鏿¡219                self.page2.frame(name="fraInterface").click("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[1]/td[5]/div/table/tbody/tr/td/span/span/span")220                # å¼·å¶é»æå£ç¹³221                self.page2.frame(name="fraInterface").dispatch_event("//html/body/div[2]/div/div[2]","click")222                # ç¬¬äºæ¬ç¹³å¥223                self.page2.frame(name="fraInterface").dblclick("#Amnt")224                self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[2]/td[5]")225                # å¼·å¶é»æå£ç¹³226                self.page2.frame(name="fraInterface").dispatch_event("//html/body/div[3]/div/div[2]","click")227                # ä¿å228                self.page2.frame(name="fraInterface").click("text=ä¿ å")229                print("å£ç¹³ç¹³å¥é¸ææå")230            #  èºç¹³231            elif(product["PayIntv"]=="0"):232                # ç¬¬ä¸æä¿è²»è²¬ä»»(ä¿è²»)233                self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[2]/td[4]")234                # æ¤èelementçºé¸ætdç第ä¸åæ¡ï¼è¥è¦é¸æå¾æ¹çç¹³å¥åéææelement[3]235                element=self.page2.frame(name="fraInterface").query_selector_all("input.datagrid-editable-input")236                element[2].fill(product["price1"])237                self.page2.frame(name="fraInterface").dblclick("#Amnt")238                # ç¬¬äºæ¬ç¹³å¥239                self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[2]/td[5]")240                # å¼·å¶é»æèºç¹³241                self.page2.frame(name="fraInterface").dispatch_event("//html/body/div[2]/div/div[1]","click")242                # ä¿å243                self.page2.frame(name="fraInterface").click("text=ä¿ å")244                # éè·³åºå»éæå
¶ä»æ¬ä½ï¼è§£é¤é該æ»å輸å
¥æ¡éå®å¾ï¼åè¡å°è¼¸å
¥æ¡ç¬¬ä¸æ¬ä½è¼¸å
¥å¼245                self.page2.frame(name="fraInterface").dblclick("#Amnt")246                print("èºç¹³ç¹³å¥é¸ææå")247            # ç¡ç¹³å¥248            elif(product["PayIntv"]=="4"):249                # ç¬¬ä¸æä¿è²»è²¬ä»»(ä¿è²»)250                self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[1]/td[4]")251                # æ¤èelementçºé¸ætdç第ä¸åæ¡ï¼è¥è¦é¸æå¾æ¹çç¹³å¥åéææelement[3]252                element=self.page2.frame(name="fraInterface").query_selector_all("input.datagrid-editable-input")253                element[2].fill(product["price1"])254                # éè·³åºå»éæå
¶ä»æ¬ä½ï¼è§£é¤é該æ»å輸å
¥æ¡éå®å¾ï¼åè¡å°è¼¸å
¥æ¡ç¬¬ä¸æ¬ä½è¼¸å
¥å¼255                self.page2.frame(name="fraInterface").dblclick("#Amnt")256                self.page2.frame(name="fraInterface").click("text=ä¿ å")257                print("ç¡ç¹³å¥é¸ææå")258        259            print("ç¹³å¥å¤æ·å·²è·³åº")260            # 鏿éè¡261            self.page2.frame(name="fraInterface").dblclick("#GetBankCode")262            self.page2.frame(name="fraInterface").select_option("select[name=\"codeselect\"]",value="8220015")263            self.page2.frame(name="fraInterface").press("#GetBankCode", "Enter")264            # 輸å
¥å¸³è265            self.page2.frame(name="fraInterface").fill("#GetBankAccNo", "123456789012")266            # ä¿ å267            self.page2.frame(name="fraInterface").click(":nth-match(:text('ä¿ å'), 2)")268            # é¸æææ¨çï¼åºå®é¸E002269            if(product["investTarget1"] != product["investTarget2"]):270                self.page2.frame(name="fraInterface").dblclick("input[name=\"InvestPlanRate1\"]")271                self.page2.frame(name="fraInterface").select_option("select[name=\"codeselect\"]",product["investTarget1"])272                self.page2.frame(name="fraInterface").press("input[name=\"InvestPlanRate1\"]", "Enter")273                # 輸å
¥æè³è¶´æ¸274                self.page2.frame(name="fraInterface").fill("input[name=\"InvestPlanRate5\"]", product["InvestPlanRate"])275                # 輸å
¥æ¯ææ£é¤é åº276                self.page2.frame(name="fraInterface").fill("#InvestPlanRate7r0", "1")277                278                # å¢å ä¸æ¬279                self.page2.frame(name="fraInterface").click("input[name=\"InvestPlanRateaddOne\"]")280                # ç¬¬äºæ¬æè³æ¨ç281                self.page2.frame(name="fraInterface").dblclick("#InvestPlanRate1r1")282                self.page2.frame(name="fraInterface").select_option("select[name=\"codeselect\"]",product["investTarget2"])283                self.page2.frame(name="fraInterface").press("#InvestPlanRate1r1", "Enter")284                # æè³è¶´æ¸285                self.page2.frame(name="fraInterface").fill("#InvestPlanRate5r1", product["InvestPlanRate"])286                # 輸å
¥æ¯ææ£é¤é åº287                self.page2.frame(name="fraInterface").fill("#InvestPlanRate7r1", "2")288                # æ·»å 289                self.page2.frame(name="fraInterface").click("input[name=\"submitFormButton\"]")290                # ä¸ä¸æ¥291                self.page2.frame(name="fraInterface").click("#riskbutton1")292            elif(product["investTarget1"] == product["investTarget2"]):293                self.page2.frame(name="fraInterface").dblclick("input[name=\"InvestPlanRate1\"]")294                self.page2.frame(name="fraInterface").select_option("select[name=\"codeselect\"]",product["investTarget1"])295                self.page2.frame(name="fraInterface").press("input[name=\"InvestPlanRate1\"]", "Enter")296                # 輸å
¥æè³è¶´æ¸297                self.page2.frame(name="fraInterface").fill("input[name=\"InvestPlanRate5\"]", "100")298                # 輸å
¥æ¯ææ£é¤é åº299                self.page2.frame(name="fraInterface").fill("#InvestPlanRate7r0", "1")300                # # å¢å ä¸æ¬301                # self.page2.frame(name="fraInterface").click("input[name=\"InvestPlanRateaddOne\"]")302                # # ç¬¬äºæ¬æè³æ¨ç303                # self.page2.frame(name="fraInterface").dblclick("#InvestPlanRate1r1")304                # self.page2.frame(name="fraInterface").select_option("select[name=\"codeselect\"]",product["investTarget2"])305                # self.page2.frame(name="fraInterface").press("#InvestPlanRate1r1", "Enter")306                # # æè³è¶´æ¸307                # self.page2.frame(name="fraInterface").fill("#InvestPlanRate5r1", product["InvestPlanRate"])308                # # 輸å
¥æ¯ææ£é¤é åº309                # self.page2.frame(name="fraInterface").fill("#InvestPlanRate7r1", "2")310                # æ·»å 311                self.page2.frame(name="fraInterface").click("input[name=\"submitFormButton\"]")312                # ä¸ä¸æ¥313                self.page2.frame(name="fraInterface").click("#riskbutton1")314    def Invest_BenefitPeople(self, BenefitInfo):315        # time.sleep(2)316        # print("é²å
¥èªå·±çæè³æ¹æ³")317        self.page2.screenshot(path="åçäººè³æéå
¥2.png")318        self.page2.touchscreen.tap(100,100)319        # self.page2.screenshot(path="åçäººè³æéå
¥.png")320        self.page2.once("dialog", lambda dialog: dialog.accept())321        with self.page2.expect_popup() as popup_info:322            self.page2.frame(name="fraInterface").click("#LBnfButton")323        self.page6 = popup_info.value324        self.page6.set_viewport_size({"width": 1920, "height": 1080})325        326        # # åç人é¡å¥327        # BnfType 身æ
åç人328        self.page6.touchscreen.tap(100,100)329        self.page6.frame(name="fraInterface").fill("#BnfType", BenefitInfo["BnfType1"])330        self.page6.frame(name="fraInterface").dblclick("#BnfType")331        self.page6.wait_for_timeout(3000)332        self.page6.frame(name="fraInterface").click("option[value=\"1\"]")333        self.page6.wait_for_timeout(2000)334        # # æ³å® check335        # isSameLaw336        self.page6.frame(name="fraInterface").check("#isSameLaw")337        # # åç人é ä½338        # BnfGrade 第ä¸é ä½339        self.page6.frame(name="fraInterface").dblclick("#BnfGrade")340        self.page6.frame(name="fraInterface").fill("#BnfGrade", BenefitInfo["BnfGrade"])341        self.page6.frame(name="fraInterface").select_option("select[name=\"codeselect\"]",BenefitInfo["BnfGrade"])342        self.page6.wait_for_timeout(3000)343        self.page6.frame(name="fraInterface").press("#BnfGrade", "Enter")344        # 100%345        self.page6.frame(name="fraInterface").fill("#BnfLot", BenefitInfo["BnfLot"])       346        # ä¿å347        self.page6.frame(name="fraInterface").click("#save")348        self.page6.once("dialog", lambda dialog: dialog.dismiss())349        self.page6.frame(name="fraInterface").click("text=è¿å")350    def Invest_ImportInfo(self):351        self.page2.touchscreen.tap(100,100)352        # self.page2.screenshot(path="éè¦äºé 
åç¥æ¸.png")353        self.page2.once("dialog", lambda dialog: dialog.accept())...dgrid_viewmodels.py
Source:dgrid_viewmodels.py  
1# -*- coding: utf-8 -*-2from __future__ import unicode_literals3from ..model import *4from nextgisweb.resource.model import Resource5federal_districts_dgrid_viewmodel = [6    {7        'data-property': 'id',8        'grid-property': 'id',9        'id': True,10        'label': 'ÐденÑиÑикаÑоÑ',11        'cell-prop': {12        }13    },14    {15        'data-property': 'name',16        'grid-property': 'name',17        'label': 'Ðаименование',18        'cell-prop': {19            'editor': 'text',20            'editOn': 'dblclick',21            'autoSave': True22        }23    },24    {25        'data-property': 'short_name',26        'grid-property': 'short_name',27        'label': 'ÐÑаÑкое название',28        'cell-prop': {29            'editor': 'text',30            'editOn': 'dblclick',31            'autoSave': True32        }33    }34]35regions_dgrid_viewmodel = [36    {37        'data-property': 'id',38        'grid-property': 'id',39        'id': True,40        'label': 'ÐденÑиÑикаÑоÑ',41        'cell-prop': {42        }43    },44    {45        'data-property': 'name',46        'grid-property': 'name',47        'label': 'Ðаименование',48        'cell-prop': {49            'editor': 'text',50            'editOn': 'dblclick',51            'autoSave': True52        }53    },54    {55        'data-property': 'short_name',56        'grid-property': 'short_name',57        'label': 'ÐÑаÑкое название',58        'cell-prop': {59            'editor': 'text',60            'editOn': 'dblclick',61            'autoSave': True62        }63    },64    {65        'data-property': 'region_code',66        'grid-property': 'region_code',67        'label': 'Ðод Ñегиона',68        'cell-prop': {69            'editor': 'number',70            'editOn': 'dblclick',71            'autoSave': True72        }73    },74    {75        'data-property': 'federal_dist',76        'grid-property': 'federal_dist',77        'relation': {78            'id': 'id',79            'label': 'name',80            'relation-field': Region.federal_dist,81            'sort-field': FederalDistrict.name,82            'type': FederalDistrict83        },84        'label': 'ФедеÑалÑнÑй окÑÑг',85        'cell-prop': {86            'editor': 'widget=>RelationSelect',87            'editOn': 'dblclick',88            'editorArgs': '[data]',89            'autoSave': True90        }91    }92]93districts_dgrid_viewmodel = [94    {95        'data-property': 'id',96        'grid-property': 'id',97        'id': True,98        'label': 'ÐденÑиÑикаÑоÑ',99        'cell-prop': {100        }101    },102    {103        'data-property': 'name',104        'grid-property': 'name',105        'label': 'Ðаименование',106        'cell-prop': {107            'editor': 'text',108            'editOn': 'dblclick',109            'autoSave': True110        }111    },112    {113        'data-property': 'short_name',114        'grid-property': 'short_name',115        'label': 'ÐÑаÑкое название',116        'cell-prop': {117            'editor': 'text',118            'editOn': 'dblclick',119            'autoSave': True120        }121    },122    {123        'data-property': 'region',124        'grid-property': 'region',125        'relation': {126            'id': 'id',127            'label': 'name',128            'relation-field': District.region,129            'sort-field': Region.name,130            'type': Region131        },132        'label': 'Регион',133        'cell-prop': {134            'editor': 'widget=>RelationSelect',135            'editOn': 'dblclick',136            'editorArgs': '[data]',137            'autoSave': True138        }139    }140]141projects_dgrid_viewmodel = [142    {143        'data-property': 'id',144        'grid-property': 'id',145        'id': True,146        'label': 'ÐденÑиÑикаÑоÑ',147        'cell-prop': {148        }149    },150    {151        'data-property': 'name',152        'grid-property': 'name',153        'label': 'Ðаименование',154        'cell-prop': {155            'editor': 'text',156            'editOn': 'dblclick',157            'autoSave': True158        }159    },160    {161        'data-property': 'short_name',162        'grid-property': 'short_name',163        'label': 'ÐÑаÑкое название',164        'cell-prop': {165            'editor': 'text',166            'editOn': 'dblclick',167            'autoSave': True168        }169    },170    {171        'data-property': 'description',172        'grid-property': 'description',173        'label': 'ÐпиÑание',174        'cell-prop': {175            'editor': 'text',176            'editOn': 'dblclick',177            'autoSave': True178        }179    },180    {181        'data-property': 'keyname',182        'grid-property': 'keyname',183        'label': 'ÐлÑÑ',184        'cell-prop': {185            'editor': 'text',186            'editOn': 'dblclick',187            'autoSave': True188        }189    },190    {191        'data-property': 'root_resource',192        'grid-property': 'root_resource',193        'relation': {194            'id': 'id',195            'label': 'display_name',196            'relation-field': Project.root_resource,197            'sort-field': Resource.display_name,198            'type': Resource199        },200        'label': 'ÐбÑÐµÐºÑ ÑÑÑоиÑелÑÑÑва',201        'cell-prop': {202            'editor': 'widget=>BuildingObjectsRelationSelect',203            'editorArgs': 'object=>{url: \'/compulink/reporting/resources/child\'}=end',204            'editOn': 'dblclick',205            'autoSave': True206        }207    }208]209construct_objects_dgrid_viewmodel = [210    {211        'data-property': 'resource_id',212        'grid-property': 'id',213        'id': True,214        'label': 'ÐденÑиÑикаÑоÑ',215        'cell-prop': {216        }217    },218    {219        'data-property': 'name',220        'grid-property': 'name',221        'label': 'Ðаименование',222        'cell-prop': {223            'editor': 'text',224            'editOn': 'dblclick',225            'autoSave': True226        }227    },228    {229        'data-property': 'start_build_date',230        'grid-property': 'start_build_date',231        'label': 'ÐаÑало СÐР',232        'cell-prop': {233            'editor': 'widget=>DateTextBox',234            'editorArgs': 'object=>{selector:\'date\', constraints: {datePattern: \'dd.MM.yyyy\'}}=end',235            'editOn': 'dblclick',236            'autoSave': True237        }238    },239    {240        'data-property': 'end_build_date',241        'grid-property': 'end_build_date',242        'label': 'ÐконÑание СÐР',243        'cell-prop': {244            'editor': 'widget=>DateTextBox',245            'editorArgs': 'object=>{selector:\'date\', constraints: {datePattern: \'dd.MM.yyyy\'}}=end',246            'editOn': 'dblclick',247            'autoSave': True248        }249    },250    {251        'data-property': 'start_deliver_date',252        'grid-property': 'start_deliver_date',253        'label': 'ÐаÑало ÑдаÑи заказÑÐ¸ÐºÑ Ð² ÑкÑплÑаÑаÑиÑ',254        'cell-prop': {255            'editor': 'widget=>DateTextBox',256            'editorArgs': 'object=>{selector:\'date\', constraints: {datePattern: \'dd.MM.yyyy\'}}=end',257            'editOn': 'dblclick',258            'autoSave': True259        }260    },261    {262        'data-property': 'end_deliver_date',263        'grid-property': 'end_deliver_date',264        'label': 'ÐконÑание ÑдаÑи заказÑÐ¸ÐºÑ Ð² ÑкÑплÑаÑаÑиÑ',265        'cell-prop': {266            'editor': 'widget=>DateTextBox',267            'editorArgs': 'object=>{selector:\'date\', constraints: {datePattern: \'dd.MM.yyyy\'}}=end',268            'editOn': 'dblclick',269            'autoSave': True270        }271    },272    {273        'data-property': 'cabling_plan',274        'grid-property': 'cabling_plan',275        'label': 'ÐÐ»Ð°Ð½Ð¾Ð²Ð°Ñ Ð¿ÑоÑÑженноÑÑÑ (км)',276        'cell-prop': {277            'editor': 'number',278            'editOn': 'dblclick',279            'autoSave': True280        }281    },282    {283        'data-property': 'fosc_plan',284        'grid-property': 'fosc_plan',285        'label': 'ÐолиÑеÑÑво мÑÑÑ (ÑÑ)',286        'cell-prop': {287            'editor': 'number',288            'editOn': 'dblclick',289            'autoSave': True290        }291    },292    {293        'data-property': 'cross_plan',294        'grid-property': 'cross_plan',295        'label': 'ÐолиÑеÑÑво кÑоÑÑов (ÑÑ)',296        'cell-prop': {297            'editor': 'number',298            'editOn': 'dblclick',299            'autoSave': True300        }301    },302    {303        'data-property': 'spec_trans_plan',304        'grid-property': 'spec_trans_plan',305        'label': 'ÐолиÑеÑÑво ÑпеÑпеÑеÑ
одов (ÑÑ)',306        'cell-prop': {307            'editor': 'number',308            'editOn': 'dblclick',309            'autoSave': True310        }311    },312    {313        'data-property': 'access_point_plan',314        'grid-property': 'access_point_plan',315        'label': 'ÐолиÑеÑÑво ÑоÑек доÑÑÑпа (ÑÑ)',316        'cell-prop': {317            'editor': 'number',318            'editOn': 'dblclick',319            'autoSave': True320        }321    },322    # {323    #     'data-property': 'region',324    #     'grid-property': 'region',325    #     'relation': {326    #         'id': 'id',327    #         'label': 'name',328    #         'relation-field': ConstructObject.region,329    #         'sort-field': Region.name,330    #         'type': Region331    #     },332    #     'label': 'СÑбÑÐµÐºÑ Ð Ð¤',333    #     'cell-prop': {334    #         'editor': 'widget=>RelationSelect',335    #         'editOn': 'dblclick',336    #         'editorArgs': '[data]',337    #         'autoSave': True338    #     }339    # },340    {341        'complex': True,342        'label': 'ÐеÑÑоположение',343        'grid-property': 'region_complex',344        'sort-field': ConstructObject.region,345        'value': lambda reg, dist: (reg.name if reg else '') +346                                   (', ' + dist.name if dist else ''),347        'fields': [348            {349                'relation': True,350                'data-property': 'region',351                'id': 'id',352                'label': 'name',353                'relation-field': ConstructObject.region,354                'sort-field': Region.name,355                'type': Region356            },357            {358                'relation': True,359                'data-property': 'district',360                'id': 'id',361                'label': 'name',362                'relation-field': ConstructObject.district,363                'sort-field': District.name,364                'type': District365            }366        ],367        'cell-prop': {368            'editor': 'widget=>RegionSelect',369            'editOn': 'dblclick',370            'editorArgs': 'object=>{url: \'/compulink/regions/tree\'}=end',371            'autoSave': True372        }373    },374    {375        'data-property': 'project',376        'grid-property': 'project',377        'relation': {378            'id': 'id',379            'label': 'name',380            'relation-field': ConstructObject.project,381            'sort-field': Project.name,382            'type': Project383        },384        'label': 'ÐÑоекÑ',385        'cell-prop': {386            'editor': 'widget=>RelationSelect',387            'nullable': 'ÐÑÐ¾ÐµÐºÑ Ð½Ðµ вÑбÑан',388            'editOn': 'dblclick',389            'editorArgs': '[data]',390            'autoSave': True391        }392    },393    {394        'data-property': 'subcontr_name',395        'grid-property': 'subcontr_name',396        'label': 'СÑбподÑÑдÑик',397        'cell-prop': {398            'editor': 'text',399            'editOn': 'dblclick',400            'autoSave': True401        }402    }403    # {404    #     'data-property': 'resource',405    #     'grid-property': 'resource',406    #     'relation': {407    #         'id': 'id',408    #         'label': 'display_name',409    #         'relation-field': ConstructObject.resource,410    #         'sort-field': Resource.display_name,411    #         'type': Resource412    #     },413    #     'label': 'СÑÑлка на ÑеÑÑÑÑ',414    #     'cell-prop': {415    #         'editor': 'widget=>BuildingObjectsRelationSelect',416    #         'editorArgs': 'object=>{url: \'/compulink/reporting/resources/child\'}=end',417    #         'editOn': 'dblclick',418    #         'autoSave': True419    #     }420    # }...NUCI0102_class.py
Source:NUCI0102_class.py  
...16        self.page2.wait_for_timeout(5000)17        self.page2.frame(name="fraInterface").click("text=ååè³è¨éå
¥")18        self.page2.wait_for_timeout(2000)19        # 輸å
¥éªç¨®ç·¨ç¢¼20        self.page2.frame(name="fraInterface").dblclick("input[name=\"RiskCode\"]")21        self.page2.frame(name="fraInterface").fill("input[name=\"RiskCode\"]", product["productId"])22        self.page2.frame(name="fraInterface").select_option("select[name=\"codeselect\"]",product["productId"])23        self.page2.frame(name="fraInterface").press("input[name=\"RiskCode\"]", "Enter")24        # Click text=é²å
¥ååéå
¥ç«é¢25        self.page2.frame(name="fraInterface").click("input[name=\"back\"]")26        self.page2.wait_for_timeout(2000)27        # (ç±æ¤èéå§ä¿®æ¹)28        # 輸å
¥ä¿é¡  Amnt29        self.page2.frame(name="fraInterface").click("#Amnt")30        self.page2.frame(name="fraInterface").fill("#Amnt", product["price"])31        # # 鏿åå¥ PolType ç²ä¹å32        # self.page2.frame(name="fraInterface").dblclick("input[name=\"PolType\"]")33        # self.page2.frame(name="fraInterface").fill("input[name=\"PolType\"]", product["PolType"])34        # self.page2.frame(name="fraInterface").select_option("select[name=\"codeselect\"]",product["PolType"])35        # self.page2.frame(name="fraInterface").press("input[name=\"PolType\"]", "Enter")36        # # è¶
é¡å®æ class datagrid-editable-input37        # # /html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[2]/td[4]38        # self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[2]/td[4]")39        # # æ¤èelementçºé¸ætdç第ä¸åæ¡ï¼è¥è¦é¸æå¾æ¹çç¹³å¥åéææelement[3]40        # element=self.page2.frame(name="fraInterface").query_selector_all("input.datagrid-editable-input")41        # element[2].fill(product["price2"])42        # # éè·³åºå»éæå
¶ä»æ¬ä½ï¼è§£é¤é該æ»å輸å
¥æ¡éå®å¾ï¼åè¡å°è¼¸å
¥æ¡ç¬¬ä¸æ¬ä½è¼¸å
¥å¼43        # self.page2.frame(name="fraInterface").dblclick("#Amnt")44        # # ç®æ¨ä¿è²»  class datagrid-editable-input45        # self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[1]/td[4]")46        # element=self.page2.frame(name="fraInterface").query_selector_all("input.datagrid-editable-input")47        # element[2].fill(product["price1"])48        # if (product["PayIntv"]=="6"):49        #     # ç¹³å¥  combo-text validatebox-text50        #     self.page2.frame(name="fraInterface").dblclick("#Amnt")51        #     # ç¬¬ä¸æ¬ç¹³å¥52        #     self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[1]/td[4]")53        #     # 黿䏿鏿¡54        #     self.page2.frame(name="fraInterface").click("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[1]/td[5]/div/table/tbody/tr/td/span/span/span")55        #     # å¼·å¶é»æåå¹´ç¹³56        #     self.page2.frame(name="fraInterface").dispatch_event("//html/body/div[2]/div/div[3]","click")57        #     # ç¬¬äºæ¬ç¹³å¥58        #     self.page2.frame(name="fraInterface").dblclick("#Amnt")59        #     self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[2]/td[5]")60        #     # å¼·å¶é»æåå¹´ç¹³61        #     self.page2.frame(name="fraInterface").dispatch_event("//html/body/div[3]/div/div[3]","click")62        #     # self.page2.frame(name="fraInterface").fill("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[2]/td[5]/div/table/tbody/tr/td/span/input[1]",product["PayIntv"])63        #     # self.page2.frame(name="fraInterface").press("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[2]/td[5]/div/table/tbody/tr/td/span/input[1]", "Enter")64        #     # ä¿å65        #     self.page2.frame(name="fraInterface").click("text=ä¿ å")66        # elif (product["PayIntv"]=="12"):67        #     # ç¹³å¥  combo-text validatebox-text68        #     self.page2.frame(name="fraInterface").dblclick("#Amnt")69        #     # ç¬¬ä¸æ¬ç¹³å¥70        #     self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[1]/td[4]")71        #     # 黿䏿鏿¡72        #     self.page2.frame(name="fraInterface").click("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[1]/td[5]/div/table/tbody/tr/td/span/span/span")73        #     # å¼·å¶é»æå¹´ç¹³74        #     self.page2.frame(name="fraInterface").dispatch_event("//html/body/div[2]/div/div[5]","click")75        #     # ç¬¬äºæ¬ç¹³å¥76        #     self.page2.frame(name="fraInterface").dblclick("#Amnt")77        #     self.page2.frame(name="fraInterface").dblclick("//html/body/form/div[18]/div/div[2]/div/div[2]/div[2]/table/tbody/tr[2]/td[5]")78        #     # å¼·å¶é»æå¹´ç¹³79        #     self.page2.frame(name="fraInterface").dispatch_event("//html/body/div[3]/div/div[5]","click")80        #     # ä¿å81        #     self.page2.frame(name="fraInterface").click("text=ä¿ å")82        83        # print("ç¹³å¥é¸ææå")84        # # é¸æææ¨çï¼åºå®é¸E00285        # self.page2.frame(name="fraInterface").dblclick("input[name=\"InvestPlanRate1\"]")86        # self.page2.frame(name="fraInterface").select_option("select[name=\"codeselect\"]",value="E002")87        # self.page2.frame(name="fraInterface").press("input[name=\"InvestPlanRate1\"]", "Enter")88        # # 輸å
¥æè³è¶´æ¸89        # self.page2.frame(name="fraInterface").fill("input[name=\"InvestPlanRate5\"]", product["InvestPlanRate"])90        # # æ·»å 91        # self.page2.frame(name="fraInterface").click("input[name=\"submitFormButton\"]")92        # # ä¸ä¸æ¥93        # self.page2.frame(name="fraInterface").click("#riskbutton1")94    def BenefitPeople_NITU0901_NTD(self, BenefitInfo):95        # time.sleep(2)96        # print("é²å
¥èªå·±çæè³æ¹æ³")97        self.page2.screenshot(path="åçäººè³æéå
¥2.png")98        self.page2.touchscreen.tap(100,100)99        # self.page2.screenshot(path="åçäººè³æéå
¥.png")100        self.page2.once("dialog", lambda dialog: dialog.accept())101        with self.page2.expect_popup() as popup_info:102            self.page2.frame(name="fraInterface").click("#LBnfButton")103        self.page6 = popup_info.value104        self.page6.set_viewport_size({"width": 1920, "height": 1080})105        106        # # åç人é¡å¥107        # BnfType 身æ
åç人108        self.page6.touchscreen.tap(100,100)109        self.page6.frame(name="fraInterface").fill("#BnfType", BenefitInfo["BnfType1"])110        self.page6.frame(name="fraInterface").dblclick("#BnfType")111        self.page6.wait_for_timeout(3000)112        self.page6.frame(name="fraInterface").click("option[value=\"1\"]")113        self.page6.wait_for_timeout(2000)114        # # æ³å® check115        # isSameLaw116        self.page6.frame(name="fraInterface").check("#isSameLaw")117        # # åç人é ä½118        # BnfGrade 第ä¸é ä½119        self.page6.frame(name="fraInterface").dblclick("#BnfGrade")120        self.page6.frame(name="fraInterface").fill("#BnfGrade", BenefitInfo["BnfGrade"])121        self.page6.frame(name="fraInterface").select_option("select[name=\"codeselect\"]",BenefitInfo["BnfGrade"])122        self.page6.wait_for_timeout(3000)123        self.page6.frame(name="fraInterface").press("#BnfGrade", "Enter")124        # 100%125        self.page6.frame(name="fraInterface").fill("#BnfLot", BenefitInfo["BnfLot"])       126        # ä¿å127        self.page6.frame(name="fraInterface").click("#save")128        self.page6.once("dialog", lambda dialog: dialog.dismiss())...LambdaTest’s Playwright tutorial will give you a broader idea about the Playwright automation framework, its unique features, and use cases with examples to exceed your understanding of Playwright testing. This tutorial will give A to Z guidance, from installing the Playwright framework to some best practices and advanced concepts.
Get 100 minutes of automation test minutes FREE!!
