How to control the column input box of the workflow form List Control of Tongda oa, oa Workflow
The workflow form List Control of Tongda OA only provides the selection of ing from internal or external data sources, but sometimes it is necessary to control certain columns which cannot be input. After some columns are input, the data of other columns is taken out, such
// Function getinventory (cinvcode) {var resobj; jQuery. ajax ({type: 'post', url: '/userext/index. php? C = workflow & m = getcinvname ', data: {cinvcode: cinvcode}, success: function (res) {resobj = res;}, dataType: 'json', async: false, cache: false}); return resobj;} jQuery (function () {// The second column cannot input jQuery ("td [id $ = '_ c2'] input "). live ('keypress keylow', function (event) {return false ;}); // enter the code in the first column and call out the name jQuery ("td [id $ = '_ c1'] input "). live ('blur', function (event) {var cinvcode = jQuery (this ). val (); var tdid = jQuery (this ). parent (). attr ('id'); var tdary = tdid. split ('_'); var rowidx = tdary [2]. substr (1); // line number var objtdid = tdary [0] + '_' + tdary [1] + '_' + tdary [2] + '_ c2 '; if (cinvcode = '') {jQuery (" td [id = '"+ objtdid +"'] input: eq (0 )"). val (''); return;} var res = getinventory (cinvcode); if (res. rescode = 0) {jQuery ("td [id = '" + objtdid + "'] input: eq (0 )"). val (res. resmsg);} else {jQuery ("td [id = '" + objtdid + "'] input: eq (0 )"). val ('');}});});
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.