function openQuoteExcelImport(e) { //openPopup('/apex/QuoteExcelImport', 'doc', 450, 210, 'width=450,height=210,scrollbars=yes,toolbar=no,status=no,directories=no,menubar=no,resizable=1', true); if ( openQuoteExcelImportWindow == null || openQuoteExcelImportWindow.closed) { openQuoteExcelImportWindow = window.open('/apex/QuoteExcelImport', 'xlsdoc', 'width=450,height=210'); } else { openQuoteExcelImportWindow.focus(); } } function copyToClipboard( event, displayCost, quoid, currencyName) { //alert( 'copyToClipboard() executed!!'); //alert( event); //alert( displayCost); //alert( quoid); //var hiddenQuoid = j$(escapeVfId( 'Page:mainForm:hiddenQuoid')).text(); //alert( hiddenQuoid); if ( quoid == null || quoid == '') { alert( Message_Please_Save_Quote); return null; } var records; try { sforce.connection.sessionId = Session_ID; records = sforce.apex.execute("NewQuoteEntryWebService","getQuoteLineItem",{quoId:quoid}); } catch(e){ alert( e.faultcode + ',' + e.faultstring); } var x; var targetString = 'No.\t编码\t状态\t名称\tListPrice\t数量\t单价\t单位\tTotal\t商品成本\t通货'; for ( var i = 0; i < records.length; i++) { x = records[i]; // targetString += '\r\n' + (i+1) + '\t' + x.ProductCode__c + '\t' + x.SFDA_Status__c + '\t' + x.Name__c + '\t' + toNumComma( x.ListPrice__c) + '\t' + x.Quantity + '\t' + toNumComma( x.UnitPrice__c) + '\t' + x.Qty_Unit__c + '\t' + toNumComma( x.Subtotal__c); targetString += '\r\n' + (i+1) + '\t' + '=MID(( "_" & "' + x.ProductCode__c + '"),2,LEN("' + '_' + x.ProductCode__c + '")-1)' + '\t' + x.SFDA_Status__c + '\t' + x.Name__c + '\t' + toNumComma( x.ListPrice__c) + '\t' + x.Quantity + '\t' + toNumComma( x.UnitPrice__c) + '\t' + ( x.Qty_Unit__c == null ? '' : x.Qty_Unit__c) + '\t' + toNumComma(x.UnitPrice__c * x.Quantity); if ( displayCost == 'true') { targetString += '\t' + toNumComma( x.Cost__c) + '\t' + currencyName; } } try { clipboardData.setData( "Text", targetString); alert( Message_Check_Your_Clipboard); } catch ( e) { alert( e); } } function searchProduct(i,str){ // CNY USDを取得 j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Assert')).attr('readonly',true); // var trade = j$(escapeVfId("Page:mainForm:block:CurrencyIsoCode")).value(); // openPopup('/apex/SearchProduct?trade=' + trade + '&lineno=' + i + '&val=' + str, 'setsearch', 950, 450, 'width=950,height=450,scrollbars=yes,toolbar=no,status=no,directories=no,menubar=no,resizable=1', true); openPopup('/apex/SearchProductCS?lineno=' + i + '&val=' + str, 'setsearch', 1050, 450, 'width=1050,height=450,scrollbars=yes,toolbar=no,status=no,directories=no,menubar=no,resizable=1', true); //var w = openPopup('/apex/SearchProduct?trade=' + trade + '&lineno=' + i + '&val=' + str, 'search','width=950,height=450'); //w.focus(); } function openQuotePage(b,b2,b3) { quoid = b3; if (b2 == 'true'){ }else{ if (b=='true'){ //openPopup('/apex/contractdetailpdf?id=quoid'); window.open('/apex/contractdetailpdf?id=' + quoid,'Contract'); } else { //openPopup('/apex/quotepdf?id=quoid'); window.open('/apex/quotepdf?id=' + quoid,'Quote'); } } } jQuery(function() { }); function reSet(){ } function calonLoad(){ EstimationListPrice.call(); calUnitPriceTotal.call(); quoteTotalPrice.call(); setOCMAmount.call(); } function number_format() { for(var i=0; i<150; i++){ var a = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Assert')).value(); if (a!=''){ var x = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ListPricetext')).text(); j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ListPricetext')).text(toNumComma(x)); var y = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ListPricetext')).text(); j$(escapeVfId('Page:mainForm:block:lists:' + i + ':TotalPrice')).text(toNumComma(y)); } } } function calUnitPriceTotal() { j$(escapeVfId( 'ListPriceTotal')).val(0); j$(escapeVfId( 'UnitPriceTotal')).val(0); var ListPriceTotal = 0.0, listPrice = 0.0; var unitPriceTotal = 0.0, unitPrice = 0.0; for(var i=0; i<150; i++){ listPrice = j$(escapeVfId('Page:mainForm:block:lists:'+ i + ':ListPrice')).value(); unitPrice = j$(escapeVfId('Page:mainForm:block:lists:'+ i + ':UnitPrice')).value(); ListPriceTotal += localParseFloat( listPrice); unitPriceTotal += localParseFloat( unitPrice); } j$(escapeVfId( 'ListPriceTotal')).val(ListPriceTotal); j$(escapeVfId( 'UnitPriceTotal')).val(unitPriceTotal); } function calPrice(i){ var x,y,z,c,d; x = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Quantity')).value(); y = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':UnitPrice')).value(); c = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Cost')).value(); d = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ListPrice')).value(); x = localParseInt( x); y = localParseFloat( y); c = localParseFloat( c); d = localParseFloat( d); j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Quantity')).val(x); j$(escapeVfId('Page:mainForm:block:lists:' + i + ':UnitPrice')).val(toNumComma(y)); j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Cost')).val(toNum(c)); j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ListPrice')).val(toNum(d)); z = x * y; j$(escapeVfId('Page:mainForm:block:lists:' + i + ':TotalPrice')).text(toNumComma(z)); j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Subtotal__c')).val(toNum(z)); z = x * c; j$(escapeVfId('Page:mainForm:block:lists:' + i + ':CostSubTotal')).val(toNum(z)); z = x * d; j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ListPriceTotalText')).text(toNumComma(z)); j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ListPriceTotal')).val(toNum(z)); EstimationListPrice.call(); calUnitPriceTotal.call(); quoteTotalPrice.call(); } function calPriceAll(){ var x,y,z,c,d; for(var i=0; i<150; i++){ x = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Quantity')).value(); x = localParseInt( x); if ( x > 0){ y = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':UnitPrice')).value(); c = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Cost')).value(); d = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ListPrice')).value(); y = localParseFloat( y); c = localParseFloat( c); d = localParseFloat( d); z = x * y; j$(escapeVfId('Page:mainForm:block:lists:' + i + ':TotalPrice')).text(toNumComma(z)); j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Subtotal__c')).val(toNum(z)); z = x * d; j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ListPriceTotalText')).text(toNumComma(z)); j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ListPriceTotal')).val(toNum(z)); z = x * c; j$(escapeVfId('Page:mainForm:block:lists:' + i + ':CostSubTotal')).val(toNum(z)); } } EstimationListPrice.call(); calUnitPriceTotal.call(); quoteTotalPrice.call(); } function EstimationListPrice() { var x,y,z; x = 0; y = 0; z = 0; var ass_cnt = 0; var con_cnt = 0; for(var i=0; i<150; i++){ x = j$(escapeVfId('Page:mainForm:block:lists:'+ i + ':ListPrice')).value(); y = j$(escapeVfId('Page:mainForm:block:lists:'+ i + ':Quantity')).value(); x = localParseFloat(x); y = localParseFloat(y); z = z + (x * y); var type = j$(escapeVfId('Page:mainForm:block:lists:'+ i + ':Asset_loaner_category')).value(); if (type == '资产') { ass_cnt = ass_cnt + y; } else if (type == '耗材') { con_cnt = con_cnt + y; } else { //不计数 } } j$(escapeVfId('Page:mainForm:block:hidden_Estimation_List')).val(toNum(z)); j$(escapeVfId('Page:mainForm:block:Estimation_List_Price')).text(toNumComma(z)); j$(escapeVfId('Page:mainForm:block:Asset_cnt')).text(number_format_common(ass_cnt, 0, "", ",")); j$(escapeVfId('Page:mainForm:block:Consumable_cnt')).text(number_format_common(con_cnt, 0, "", ",")); } function quoteTotalPrice() { var x = 0; var y = 0; for(var i=0; i<150; i++){ x = j$(escapeVfId('Page:mainForm:block:lists:'+ i + ':Subtotal__c')).value(); x = localParseFloat(x); y = y + localParseFloat(x); } j$(escapeVfId('Page:mainForm:block:quoTotalPrice')).val(toNumComma(y)); DisCalculation.call(); DisAmount.call(); QuoteAdjust.call(); salesProfit1.call(); salesProfit2.call(); setCostTatal.call(); } function quoteTotalPriceAction() { //var t = 0; var s = 0; var x = 0; var y = 0; var yy = 0; var z = j$(escapeVfId('Page:mainForm:block:quoTotalPrice')).value(); var zz = 0; z = localParseFloat( z); for ( var i=0; i < 150; i++) { x = j$(escapeVfId('Page:mainForm:block:lists:'+ i + ':Subtotal__c')).value(); x = localParseFloat(x); y = y + x; } //t = z / y; //alert( "z=" + z + ", y=" + y + ", z / y = " + (z / y)); for(var i=0; i<150;i++){ s = j$(escapeVfId('Page:mainForm:block:lists:'+ i + ':Quantity')).value(); s = localParseInt(s); x = j$(escapeVfId('Page:mainForm:block:lists:'+ i + ':Subtotal__c')).value(); x = localParseFloat(x); if ((s==0) || (x==0)){ //処理なし }else{ //yy = Math.round(x * t); //alert( "x=" + x + ", z=" + z + ", y=" + y); yy = localParseFloat(x * z / y); //alert( "yy=" + yy); //if (isNaN(x)==false){ j$(escapeVfId('Page:mainForm:block:lists:'+ i + ':Subtotal__c')).val(toNum(yy)); j$(escapeVfId('Page:mainForm:block:lists:' + i + ':TotalPrice')).text(toNumComma(yy)); j$(escapeVfId('Page:mainForm:block:lists:'+ i + ':UnitPrice')).val(toNumComma(yy / s)); zz = zz + yy; //} //alert( "zz=" + zz); } } j$(escapeVfId('Page:mainForm:block:quoTotalPrice')).val(toNumComma(zz)); calUnitPriceTotal.call(); QuoteAdjust.call(); DisCalculation.call(); DisAmount.call(); } function calFromQuoAmont() { var x = 0, y = 0; x = j$(escapeVfId('Page:mainForm:block:hidden_Estimation_List')).value(); x = localParseFloat(x); y = j$(escapeVfId('Page:mainForm:block:QuoAmount')).value(); j$(escapeVfId('Page:mainForm:block:QuoAmount')).val(toNumComma(y)); y = localParseFloat(y); j$(escapeVfId('Page:mainForm:block:quoTotalPrice')).val(toNumComma( y + x)); if (y == 0) { j$(escapeVfId('Page:mainForm:block:QuoCalculation')).val(0); UnitPriceUpdate.call(); } else { quoteTotalPriceAction.call(); } } function calFromContactPrice() { var x = 0; x = j$(escapeVfId('Page:mainForm:block:Dealer_Final_Price')).value(); x = localParseFloat( x); j$(escapeVfId('Page:mainForm:block:Dealer_Final_Price')).val(toNumComma(x)); //quoteTotalPrice.call(); DisCalculation.call(); DisAmount.call(); salesProfit1.call(); salesProfit2.call(); setCostTatal.call(); } function radioChecker2(str){ j$(escapeVfId("Page:mainForm:block:Btn_RowDelete")).attr("disabled", true); j$(escapeVfId("Page:mainForm:block:Btn_RowUp")).attr("disabled", true); j$(escapeVfId("Page:mainForm:block:Btn_RowDown")).attr("disabled", true); //error初期化 replaceErrorClass.call(); var lastLineNoNext = getLastLineNoNext(document); try { var hasCheckedCnt = 0; for(var i=0; i 1) { // 複数件チェックされているか、わかればbreak; break; } } } if (hasCheckedCnt == 0) { throw Error_Message34; } var hasCheckedCnt1 = 0; // 実際変更できた件数 if (str=='up'){ for(var i=0; i=0; i--){ var iChecked = document.forms['Page:mainForm']['checklist'][i].checked; if (!iChecked) { continue; } if (i==149 && iChecked){ throw Error_Message36; }else{ if (setlists(str,i)) { hasCheckedCnt1++; } else { if (hasCheckedCnt1 == 0) { // 移動できない throw Error_Message36; } } } } }else if(str=='del'){ for(var i=lastLineNoNext-1; i>=0; i--){ var iChecked = document.forms['Page:mainForm']['checklist'][i].checked; if (iChecked) { hasCheckedCnt1++; deletelist(i, document); } } }else{ throw 'Unknow Operation'; } if (hasCheckedCnt1 > 0) { if (str=='del'){ calPriceAll.call(); } } if (str=='del') { // 複数選択して削除した場合、削除後チェックを外す if (hasCheckedCnt > 1) { for(var i = 0; i < lastLineNoNext; i++) { document.forms['Page:mainForm']['checklist'][i].checked = false; } } else { // lastLineNoNextの行も外す document.forms['Page:mainForm']['checklist'][lastLineNoNext - 1].checked = false; } } } catch(e) { alert(e); } document.getElementById("Page:mainForm:block:Btn_RowDelete").disabled = false; document.getElementById("Page:mainForm:block:Btn_RowUp").disabled = false; document.getElementById("Page:mainForm:block:Btn_RowDown").disabled = false; return true; } function productCompare(){ try{ sforce.connection.sessionId = Session_ID; var b = true; var t = j$(escapeVfId('Page:mainForm:block:Trade')).value(); var ids = new Array(); for(var i=0; i<150; i++){ var id = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Product_Id')).value(); if (id != ''){ ids.push(j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Product_Id')).value()); } } var results = sforce.apex.execute("NewQuoteEntryWebService","getProduct2",{id:ids}); var id2Product = new Object(); for(var j=0; jtoNum j$(escapeVfId('Page:mainForm:block:QuoCalculation')).val(toNumComma(0)); }else{ //var tnum = (zz - z) / z *100 ; //j$(escapeVfId('Page:mainForm:block:QuoCalculation')).val(Math.floor(tnum * 100) / 100); j$(escapeVfId('Page:mainForm:block:QuoCalculation')).val(toNumComma((zz - z) / z *100)); } } function salesProfit1() { var x = j$(escapeVfId('Page:mainForm:block:Dealer_Final_Price')).value(); var y = j$(escapeVfId('Page:mainForm:block:SalesAmount1')).value(); y = y.replace(/ /g, ""); if ( y.length == 0) { var z = j$(escapeVfId('Page:mainForm:block:SalesAmount2')).value(); z = z.replace(/ /g, ""); if ( z.length == 0) { j$(escapeVfId('Page:mainForm:block:SalesAmount1')).val(''); j$(escapeVfId('Page:mainForm:block:Salesprofit1value')).val(''); j$(escapeVfId('Page:mainForm:block:Salesprofit1')).text(''); }else { j$(escapeVfId('Page:mainForm:block:SalesAmount1')).val(toNumComma(0)); j$(escapeVfId('Page:mainForm:block:Salesprofit1value')).val(toNum(0)); j$(escapeVfId('Page:mainForm:block:Salesprofit1')).text(toNumComma(0)); } }else{ j$(escapeVfId('Page:mainForm:block:SalesAmount1')).val(toNumComma(y)); x = localParseFloat( x); y = localParseFloat( y); var t = j$(escapeVfId('Page:mainForm:block:SalesAmount2')).value(); if ( t.length == 0) { j$(escapeVfId('Page:mainForm:block:Salesprofit1value')).val(toNum(x - y)); j$(escapeVfId('Page:mainForm:block:Salesprofit1')).text(toNumComma(x - y)); }else{ t = localParseFloat( t); j$(escapeVfId('Page:mainForm:block:Salesprofit1value')).val(toNum(t - y)); j$(escapeVfId('Page:mainForm:block:Salesprofit1')).text(toNumComma(t - y)); } } salesCalculation1.call(); } function salesProfit2() { var x = j$(escapeVfId('Page:mainForm:block:Dealer_Final_Price')).value(); var y = j$(escapeVfId('Page:mainForm:block:SalesAmount2')).value(); y = y.replace(/ /g, ""); if ( y.length == 0) { j$(escapeVfId('Page:mainForm:block:SalesAmount2')).val(''); j$(escapeVfId('Page:mainForm:block:Salesprofit2value')).val(''); j$(escapeVfId('Page:mainForm:block:Salesprofit2')).text(''); } else { x = localParseFloat( x); y = localParseFloat( y); j$(escapeVfId('Page:mainForm:block:SalesAmount2')).val(toNumComma(y)); j$(escapeVfId('Page:mainForm:block:Salesprofit2value')).val(toNum(x - y)); j$(escapeVfId('Page:mainForm:block:Salesprofit2')).text(toNumComma(x - y)); } salesCalculation2.call(); salesProfit1(); } function salesCalculation1() { var w = j$(escapeVfId('Page:mainForm:block:SalesAmount1')).value(); w = w.replace(/ /g, ''); var x = j$(escapeVfId('Page:mainForm:block:Salesprofit1value')).value(); var y = j$(escapeVfId('Page:mainForm:block:Dealer_Final_Price')).value(); var z = j$(escapeVfId('Page:mainForm:block:SalesAmount2')).value(); z = z.replace(/ /g, ''); if ( w.length == 0) { j$(escapeVfId('Page:mainForm:block:SalesCalculation1value')).val(''); j$(escapeVfId('Page:mainForm:block:SalesCalculation1')).text(''); } else { x = localParseFloat( x); var t = 0; if ( z.length == 0) { y = localParseFloat( y); t = x / y * 100; } else { z = localParseFloat( z); t = x / z * 100; } j$(escapeVfId('Page:mainForm:block:SalesCalculation1value')).val(toNum(t)); j$(escapeVfId('Page:mainForm:block:SalesCalculation1')).text(toNumComma(t)); } } function salesCalculation2() { var w = j$(escapeVfId('Page:mainForm:block:SalesAmount2')).value(); w = w.replace(/ /g, ''); var x = j$(escapeVfId('Page:mainForm:block:Salesprofit2value')).value(); var y = j$(escapeVfId('Page:mainForm:block:Dealer_Final_Price')).value(); if ( w.length == 0) { j$(escapeVfId('Page:mainForm:block:SalesCalculation2value')).val(''); j$(escapeVfId('Page:mainForm:block:SalesCalculation2')).text(''); } else { x = localParseFloat( x); y = localParseFloat( y); if((y==0)){ j$(escapeVfId('Page:mainForm:block:SalesCalculation2value')).val(toNum(0)); j$(escapeVfId('Page:mainForm:block:SalesCalculation2')).text(toNumComma(0)); }else{ var z = x / y * 100; j$(escapeVfId('Page:mainForm:block:SalesCalculation2value')).val(toNum(z)); j$(escapeVfId('Page:mainForm:block:SalesCalculation2')).text(toNumComma(z)); } } } function setlistFocus(i){ j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Quantity')).focus(); } function setCostTatal(){ var z = 0; for(var i=0; i<150; i++){ var s = 0; s = eval(j$(escapeVfId('Page:mainForm:block:lists:' + i + ':CostSubTotal')).value()); if (isNaN(s)==false){ z = z + s; } } j$(escapeVfId('Page:mainForm:block:hidden_Stocking_Price')).val(toNum(z)); if (displayCost == 'true') { j$(escapeVfId('Page:mainForm:block:Stocking_Price')).text(toNumComma(z)); } } function setOCMAmount(){ var s,t; s = j$(escapeVfId('Page:mainForm:block:SalesRoot_Flg')).value(); if (s=='true'){ t = j$(escapeVfId('Page:mainForm:block:SalesAmount1')).value(); }else{ t = j$(escapeVfId('Page:mainForm:block:Dealer_Final_Price')).value(); } t = localParseFloat( t); j$(escapeVfId('Page:mainForm:block:hidden_Wholesale_Price')).val(toNum(t)); j$(escapeVfId('Page:mainForm:block:Wholesale_Price')).text(toNumComma(t)); } function decision2btn(){ checkchangedAfterPrint(); var changedAfterPrint = j$(escapeVfId('Page:mainForm:changedAfterPrint')).value(); if (changedAfterPrint == 'true') { if (confirm(Confirm_ChangedAfterPrint)) { return chkSalesPossibilityDecision(); } } else { return chkSalesPossibilityDecision(); } } function chkSalesPossibilityDecision(){ try{ sforce.connection.sessionId = Session_ID; var b = true; var ids = new Array(); for(var i=0; i<150; i++){ var id = j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Product_Id')).value(); if (id != ''){ ids.push(id); } } var results = sforce.apex.execute("NewQuoteEntryWebService","getProduct2",{id:ids}); var id2Product = new Object(); for(var j=0; j 0) { // quote_Date__c = results[0]['Quote']['Quote_Date__c']; // if(!quote_Date__c) { // return; // } // } else { // return; // } // if (changedAfterPrint == 'false') { // if (activities.length != results.length) { // changedAfterPrint = 'true'; // } // } // if (changedAfterPrint == 'false') { // for(var j=0; j=0; i--){ if (j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Assert')).value() != ''){ if (!hasRecordFlg) { lastLineNo = i; } hasRecordFlg = true; } if (hasRecordFlg == true) { if (j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Assert')).value() == ''){ var moveCheckbox = true; deletelist(i, doc, moveCheckbox); lastLineNo = i; } } } if (hasRecordFlg) { lastLineNo = lastLineNo + 1; } return lastLineNo; } function deletelist(k, doc, moveCheckbox){ var j = 0; for(var i=k; i<150; i++){ j = parseInt(i)+1; if (j<150){ if (moveCheckbox) { doc.forms['Page:mainForm']['checklist'][i].checked = doc.forms['Page:mainForm']['checklist'][j].checked; } //製品番号 j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Assert')).val(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':Assert')).value()); //LineNo if (j$(escapeVfId('Page:mainForm:block:lists:' + j + ':Assert')).value() == ''){ j$(escapeVfId('Page:mainForm:block:lists:' + i + ':indexNo')).text(''); }else{ j$(escapeVfId('Page:mainForm:block:lists:' + i + ':indexNo')).text(j); } //SFDA j$(escapeVfId('Page:mainForm:block:lists:' + i + ':SFDA')).val(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':SFDA')).value()); j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Status__c')).text(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':Status__c')).text()); //Id j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Product_Id')).val(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':Product_Id')).value()); //品目名 j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Name__c')).val(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':Name__c')).value()); j$(escapeVfId('Page:mainForm:block:lists:' + i + ':NameLink')).html(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':NameLink')).html()); //ListPrice j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ListPrice')).val(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':ListPrice')).value()); j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ListPricetext')).text(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':ListPricetext')).text()); //数量 j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Quantity')).val(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':Quantity')).value()); //価格 j$(escapeVfId('Page:mainForm:block:lists:' + i + ':UnitPrice')).val(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':UnitPrice')).value()); //単位 //j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Qty')).text(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':Qty')).text()); //j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Qty_Unit')).val(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':Qty_Unit')).value()); //小計 j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Subtotal__c')).val(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':Subtotal__c')).value()); j$(escapeVfId('Page:mainForm:block:lists:' + i + ':TotalPrice')).text(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':TotalPrice')).text()); //小計lw j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ListPriceTotal')).val(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':ListPriceTotal')).value()); j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ListPriceTotalText')).text(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':ListPriceTotalText')).text()); //Product_SFDA j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Product_SFDA')).val(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':Product_SFDA')).value()); //NameCode j$(escapeVfId('Page:mainForm:block:lists:' + i + ':NameCode')).val(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':NameCode')).value()); //Product_Name j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Product_Name')).val(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':Product_Name')).value()); //Product_ListPrice j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Product_ListPrice')).val(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':Product_ListPrice')).value()); //Product_Cost j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Product_Cost')).val(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':Product_Cost')).value()); //Sales_Possibility j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Sales_Possibility')).val(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':Sales_Possibility')).value()); //Cost j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Cost')).val(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':Cost')).value()); //CostSubTotal j$(escapeVfId('Page:mainForm:block:lists:' + i + ':CostSubTotal')).val(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':CostSubTotal')).value()); //Bsscategory j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Bsscategory')).val(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':Bsscategory')).value()); //PricebookEntryId j$(escapeVfId('Page:mainForm:block:lists:' + i + ':PricebookEntryId')).val(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':PricebookEntryId')).value()); //Serial_lot j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Serial_Lot')).text(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':Serial_Lot')).text()); //Asset_loaner_category j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Asset_loaner_category')).text(j$(escapeVfId('Page:mainForm:block:lists:' + j + ':Asset_loaner_category')).text()); }else{ //製品番号 j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Assert')).val(''); //LineNo j$(escapeVfId('Page:mainForm:block:lists:' + i + ':indexNo')).text(''); //SFDA j$(escapeVfId('Page:mainForm:block:lists:' + i + ':SFDA')).val(''); j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Status__c')).text(''); //Id j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Product_Id')).val(''); //品目名 j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Name__c')).val(''); j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Nametext1')).text(''); j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Nametext1')).attr('href', '#'); //ListPrice j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ListPrice')).val(''); j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ListPricetext')).text(''); //数量 j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Quantity')).val(''); //価格 j$(escapeVfId('Page:mainForm:block:lists:' + i + ':UnitPrice')).val(''); //単位 //j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Qty')).text(''); //j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Qty_Unit')).val(''); //小計 j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Subtotal__c')).val(''); j$(escapeVfId('Page:mainForm:block:lists:' + i + ':TotalPrice')).text(''); //小計lw j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ListPriceTotal')).val(''); j$(escapeVfId('Page:mainForm:block:lists:' + i + ':ListPriceTotalText')).text(''); //Product_SFDA j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Product_SFDA')).val(''); //NameCode j$(escapeVfId('Page:mainForm:block:lists:' + i + ':NameCode')).val(''); //Product_Name j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Product_Name')).val(''); //Product_ListPrice j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Product_ListPrice')).val(''); //Product_Cost j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Product_Cost')).val(''); //Sales_Possibility j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Sales_Possibility')).val(''); //Cost j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Cost')).val(''); //CostSubTotal j$(escapeVfId('Page:mainForm:block:lists:' + i + ':CostSubTotal')).val(''); //Bsscategory j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Bsscategory')).val(''); //PricebookEntryId j$(escapeVfId('Page:mainForm:block:lists:' + i + ':PricebookEntryId')).val(''); //Serial_lot j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Serial_Lot')).val(''); //Asset_loaner_category j$(escapeVfId('Page:mainForm:block:lists:' + i + ':Asset_loaner_category')).val(''); } } return true; } function setProductEntryGateway(str) { blockme(); setProductEntry(str); } function excelImportGateway(str) { blockme(); excelImport(str); }