netsuite事务处理单据 列字段serialnumbers 的客户端验证函数validateInventoryNumbers
function validateInventoryNumbers(bAddEdit) {
2771 var addEditWhenDone = 'F';
2772 if (bAddEdit) addEditWhenDone='T';
2773 var isadvbill = document.forms['main_form'].elements['isadvbill'].value;
2774 var istransforming = document.forms['main_form'].elements['istransforming'].value;
2775 var els = document.forms['item_form'].elements;
2776
var orderid =
document.forms['main_form'].elements['createdfrom']?document.forms['main_form'].elements['createdfrom'].value:
'';
2777 var itemfld=getFormElement(document.forms['item_form'], 'item');
2778
if (els['costingmethod'].value == 'SERIAL' ||
els['costingmethod'].value == 'LOT' || getSelectValue(itemfld) == '-1'
|| getSelectValue(itemfld) == '') {
2779 els['serialnumbersvalid'].value = 'F';
2780 els['serialnumbers'].disabled = false;
2781 var location = '';
2782 if ( els['location'] ) { location = els['location'].value; }
2783
else if ( document.forms['main_form'].elements['location'] ) { location
= document.forms['main_form'].elements['location'].value; }
2784 var url = '/app/accounting/transactions/inventory/validateInventoryNumbers.nl';
2785 var form = document.forms['machine_commands_form'];
2786 form.elements['i'].value=getSelectValue(getFormElementViaFormName( 'item_form', 'item' ));
2787 form.elements['l'].value=location;
2788 form.elements['q'].value=document.forms['item_form'].elements['quantity'].value;
2789 form.elements['cm'].value=els['costingmethod'].value;
2790
form.elements['sn'].value=(document.forms['item_form'].elements['serialnumbers_display'].value
== _mult_popup_help ? '' :
document.forms['item_form'].elements['serialnumbers_display'].value);
2791 form.elements['tt'].value=document.forms['main_form'].elements['type'].value;
2792 form.elements['d'].value=document.forms['main_form'].elements['trandate'].value;
2793 form.elements['oid'].value=orderid;
2794 form.elements['ab'].value=isadvbill;
2795 form.elements['istransforming'].value=istransforming;
2796 form.elements['aewd'].value=addEditWhenDone;
2797 form.elements['cl'].value=els['lineindex'].value;
2798 form.elements['f'].value='item_form';
2799 form.elements['mt'].value='0';
2800 form.elements['id'].value= (getEditFlag() ? document.forms['main_form'].elements['id'].value : '');
2801 form.elements['e'].value= (getEditFlag() ? 'T' : 'F');
2802 form.action=url;
2803 form.submit();
2804 }
2805 }
这是一个经典应用, 把静态页面上的动态内容通过出发传递参数也页面隐含的form,submit后动态刷新或验证生效。
// Only including validateInventoryNumbers call if not WS, which breaks. See Issue 92127 for more details. how can I get details from issue92127?
这是一个经典应用, 把静态页面上的动态内容通过出发传递参数也页面隐含的form,submit后动态刷新或验证生效。
// Only including validateInventoryNumbers call if not WS, which breaks. See Issue 92127 for more details. how can I get details from issue92127?
本文来自博客园,作者:CarlZeng,转载请注明原文链接:https://www.cnblogs.com/backuper/archive/2009/02/08/1386246.html
需求沟通链接 扫客服加群:
![](https://images.cnblogs.com/cnblogs_com/backuper/933606/o_240408031754_%E6%89%AB%E5%AE%A2%E6%9C%8D%E5%8A%A0%E7%BE%A4.png)