| | |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 100, style: 'background-color:#efefef4d;' } |
| | | , { field: 'HUnitID', title: 'HUnitID', width: 100, hide: true, style: 'background-color:#efefef4d;' } |
| | | , { field: '计éåä½', title: '计éåä½', width: 100, style: 'background-color:#efefef4d;'} |
| | | , { field: 'HQty', title: 'æ°é', width: 100, totalRow: true,edit:'text' } |
| | | , { field: 'HQty', title: 'æ°é', width: 100, totalRow: true, style: 'background-color:#efefef4d;' } |
| | | , { field: 'HPrice', title: 'åä»·', width: 100, style: 'background-color:#efefef4d;' } |
| | | , { field: 'HMoney', title: 'ç»ç®éé¢', width: 100, totalRow: true, style: 'background-color:#efefef4d;' } |
| | | , { field: 'HReceiveBillInterID', title: 'æ¥æ¶æºåå
ç ', width: 100, hide: true, style: 'background-color:#efefef4d;' } |
| | |
| | | obj.update({ |
| | | HPrice: oldText |
| | | }); |
| | | |
| | | table.render(option); |
| | | layer.msg("å价请è¾å
¥å¤§äº0çæ°å!"); |
| | | return; |
| | | } |
| | |
| | | HPrice = Number(HPrice.toFixed(HPriceDec)); |
| | | HMoney = Number(HMoney.toFixed(HMoneyDec)); |
| | | HlineTotal = Number(HlineTotal.toFixed(HMoneyDec)); |
| | | HTaxPrice = Number(HPrice.toFixed(HPriceDec)); |
| | | HRelTaxPrice = Number(HPrice.toFixed(HPriceDec)); |
| | | HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec)); |
| | | HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec)); |
| | | HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec)); |
| | | HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec)); |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | |
| | | obj.update({ |
| | | HTaxRate: oldText |
| | | }); |
| | | |
| | | table.render(option); |
| | | layer.msg("ç¨ç请è¾å
¥ä¸å°äº0çæ°å!"); |
| | | return; |
| | | } |
| | |
| | | HPrice = Number(HPrice.toFixed(HPriceDec)); |
| | | HMoney = Number(HMoney.toFixed(HMoneyDec)); |
| | | HlineTotal = Number(HlineTotal.toFixed(HMoneyDec)); |
| | | HTaxPrice = Number(HPrice.toFixed(HPriceDec)); |
| | | HRelTaxPrice = Number(HPrice.toFixed(HPriceDec)); |
| | | HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec)); |
| | | HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec)); |
| | | HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec)); |
| | | HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec)); |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | |
| | | obj.update({ |
| | | HDiscountRate: oldText |
| | | }); |
| | | |
| | | table.render(option); |
| | | layer.msg("ææ£ç请è¾å
¥ä¸å°äº0çæ°å!"); |
| | | return; |
| | | } |
| | |
| | | HQty = Number(HQty.toFixed(HQtyDec)); |
| | | HPrice = Number(HPrice.toFixed(HPriceDec)); |
| | | HMoney = Number(HMoney.toFixed(HMoneyDec)); |
| | | HTaxPrice = Number(HPrice.toFixed(HPriceDec)); |
| | | HRelTaxPrice = Number(HPrice.toFixed(HPriceDec)); |
| | | HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec)); |
| | | HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec)); |
| | | HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec)); |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | |
| | | HMoney = Number(HMoney.toFixed(HMoneyDec)); |
| | | HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec)); |
| | | HlineTotal = Number(HlineTotal.toFixed(HMoneyDec)); |
| | | HTaxPrice = Number(HPrice.toFixed(HPriceDec)); |
| | | HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec)); |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ //æ´æ°è¡¨æ ¼æ°æ® æ¹æ³æ¯è¯¥å¯¹è±¡æä¾çä¸ä¸ªæ¹æ³ï¼ç¨äºæ´æ°å
¶å
é¨ç¶ææä¸ä¹å
³èçæ°æ®æº |
| | | HQty: HQty //æ´æ°HQtyåæ®µï¼HQty |
| | |
| | | HMoney = Number(HMoney.toFixed(HMoneyDec)); |
| | | HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec)); |
| | | HlineTotal = Number(HlineTotal.toFixed(HMoneyDec)); |
| | | HTaxPrice = Number(HPrice.toFixed(HPriceDec)); |
| | | HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec)); |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ //æ´æ°è¡¨æ ¼æ°æ® |
| | | HTaxRate: HTaxRate * 100 |
| | |
| | | HMoney = Number(HMoney.toFixed(HMoneyDec)); |
| | | HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec)); |
| | | HlineTotal = Number(HlineTotal.toFixed(HMoneyDec)); |
| | | HTaxPrice = Number(HPrice.toFixed(HPriceDec)); |
| | | HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec)); |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ //æ´æ°è¡¨æ ¼æ°æ® æ¹æ³æ¯è¯¥å¯¹è±¡æä¾çä¸ä¸ªæ¹æ³ï¼ç¨äºæ´æ°å
¶å
é¨ç¶ææä¸ä¹å
³èçæ°æ®æº |
| | | HQty: HQty //æ´æ°HQtyåæ®µï¼HQty |
| | |
| | | , { field: 'HMoney', title: 'éé¢', event: 'inputHMoney', width: 90, totalRow: true } |
| | | , { field: 'HTaxPrice', title: 'å«ç¨åä»·', edit: 'text', event: 'inputHTaxPrice', width:90 } |
| | | , { field: 'HTaxRate', title: 'ç¨ç%', edit: 'text', event: 'inputHTaxRate', width:90 } |
| | | , { field: 'HTaxMoney', title: 'ç¨é¢', edit: 'text', event: 'inputHTaxMoney', width:90 } |
| | | , { field: 'HlineTotal', title: 'ä»·ç¨å计', edit: 'text', event: 'inputHlineTotal', width:90 } |
| | | , { field: 'HTaxMoney', title: 'ç¨é¢', event: 'inputHTaxMoney', width:90 } |
| | | , { field: 'HlineTotal', title: 'ä»·ç¨å计', event: 'inputHlineTotal', width:90 } |
| | | , { field: 'HlineTotalBB', title: 'æ¬ä½å¸ä»·ç¨å计', edit: 'text', event: 'inputHlineTotalBB', width:125 } |
| | | , { field: 'HDate', title: 'é¢è®¡äº¤è´§æ¥æ', width: 120, templet: "<div>{{d.HDate ==null ?'':layui.util.toDateString(d.HDate, 'yyyy-MM-dd')}}</div>", event: 'HDate' } |
| | | , { field: 'HBagType', title: 'å
è£
æ¹å¼', edit: 'text', width: 120 } |
| | |
| | | obj.update({ |
| | | HPrice: oldText |
| | | }); |
| | | |
| | | table.render(option) |
| | | layer.msg("å价请è¾å
¥å¤§äº0çæ°å!"); |
| | | return; |
| | | } |
| | |
| | | }); |
| | | table.render(option) |
| | | break; |
| | | case "HTaxRate": //æ°é |
| | | case "HTaxRate": //ç¨ç |
| | | //æ°æ®æ ¼å¼æ ¡éª |
| | | temp = value + ""; |
| | | if (!ref.test(temp)) { |
| | |
| | | obj.update({ |
| | | HTaxRate: oldText |
| | | }); |
| | | |
| | | table.render(option) |
| | | layer.msg("ç¨ç请è¾å
¥ä¸å°äº0çæ°å!"); |
| | | return; |
| | | } |
| | |
| | | obj.update({ |
| | | HDiscountRate: oldText |
| | | }); |
| | | |
| | | table.render(option) |
| | | layer.msg("ææ£ç请è¾å
¥ä¸å°äº0çæ°å!"); |
| | | return; |
| | | } |
| | |
| | | }); |
| | | table.render(option); |
| | | break; |
| | | case "HTaxPrice": //åä»· |
| | | case "HTaxPrice": //å«ç¨åä»· |
| | | //æ°æ®æ ¼å¼æ ¡éª |
| | | temp = value + ""; //ä¿®æ¹åçå¼ è½¬ä¸ºå符串 èµå¼ç» åétemp |
| | | // refå¾å¯è½æ¯ä¸ä¸ªæ£å表达å¼å¯¹è±¡ï¼ç¨äºå¹é
ç¹å®çå符串模å¼ãref.test(temp)伿£æ¥åétempï¼å³è½¬æ¢åçåä»·åç¬¦ä¸²ï¼æ¯å¦ç¬¦årefå®ä¹ç模å¼ã妿testæ¹æ³è¿åfalse |
| | |
| | | }); |
| | | table.render(option) |
| | | break; |
| | | case "HMoney": //éé¢ |
| | | //æ°æ®æ ¼å¼æ ¡éª |
| | | temp = value + ""; //ä¿®æ¹åçå¼ è½¬ä¸ºå符串 èµå¼ç» åétemp |
| | | // refå¾å¯è½æ¯ä¸ä¸ªæ£å表达å¼å¯¹è±¡ï¼ç¨äºå¹é
ç¹å®çå符串模å¼ãref.test(temp)伿£æ¥åétempï¼å³è½¬æ¢åçåä»·åç¬¦ä¸²ï¼æ¯å¦ç¬¦årefå®ä¹ç模å¼ã妿testæ¹æ³è¿åfalse |
| | | if (!ref.test(temp)) { //æ£æ¥åä»·å符串æ¯å¦ç¬¦åé¢æçæ ¼å¼ |
| | | //æ¢å¤æ°æ®å°ç¼è¾å |
| | | obj.update({ //æ´æ°è¡¨æ ¼æä¸è¡æ°æ® |
| | | HMoney: oldText //å°hpriceåæ®µæ¢å¤å°ä¿ååçå¼ |
| | | }); |
| | | table.render(option); |
| | | layer.msg("éé¢è¯·è¾å
¥æ°å!"); //请è¾å
¥åä»·çæ°å¼ |
| | | return; |
| | | } |
| | | |
| | | //æ°æ®æ ¡éªåæ ¼ï¼éç®è®°å½ |
| | | var HQty = obj.data.HQty * 1; //æ°é |
| | | var HMoney = value * 1; //éé¢ |
| | | var HTaxRate = obj.data.HTaxRate * 0.01; //ç¨ç |
| | | var HPrice = Number((HMoney / HQty)); //åä»· = éé¢/(æ°é) |
| | | var HTaxPrice = Number(HPrice * (1 + HTaxRate)); //å«ç¨åä»·=åä»·*(1+ç¨ç) |
| | | |
| | | |
| | | var HTaxMoney = Number((HMoney * HTaxRate)); //ç¨é¢=éé¢*ç¨ç |
| | | var HDiscountRate = obj.data.HDiscountRate * 1; //ææ£ç |
| | | //æ°å精度 |
| | | HQty = Number(HQty.toFixed(HQtyDec)); |
| | | HPrice = Number(HPrice.toFixed(HPriceDec)); |
| | | HMoney = Number(HMoney.toFixed(HMoneyDec)); |
| | | HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec)); |
| | | HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec)); |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ //æ´æ°è¡¨æ ¼æ°æ® æ¹æ³æ¯è¯¥å¯¹è±¡æä¾çä¸ä¸ªæ¹æ³ï¼ç¨äºæ´æ°å
¶å
é¨ç¶ææä¸ä¹å
³èçæ°æ®æº |
| | | HQty: Number(HQty.toFixed(HQtyDec)) |
| | | , HPrice: Number(HPrice.toFixed(HPriceDec)) |
| | | , HMoney: Number(HMoney.toFixed(HMoneyDec)) |
| | | , HTaxMoney: HTaxMoney //æ´æ°HTaxMoneyåæ®µï¼HTaxMoney |
| | | , HTaxPrice: Number(HTaxPrice.toFixed(HPriceDec)) //æ´æ°HTaxPriceåæ®µï¼HTaxPrice |
| | | }); |
| | | table.render(option) |
| | | break; |
| | | default: |
| | | } |
| | | }); |
| | |
| | | , { field: 'è¾
å©åä½', title: 'è¾
å©åä½', width: 100, edit: 'text', event: "HSecUnitID" }//f7 |
| | | , { field: 'HQty', title: 'æ°é', width: 100, edit: 'text', totalRow: true} |
| | | , { field: 'HPrice', title: 'åä»·', width: 100, edit: 'text' } |
| | | , { field: 'HMoney', title: 'éé¢', width: 100, edit: 'text', totalRow: true } |
| | | , { field: 'HMoney', title: 'éé¢', width: 100, totalRow: true, style: 'background-color:#efefef4d;' } |
| | | , { field: 'HTaxRate', title: 'ç¨ç', width: 100, edit: 'text' } |
| | | , { field: 'HTaxMoney', title: 'ç¨é¢', width: 100, style: 'background-color:#efefef4d;'} |
| | | , { field: 'HBatchNo', title: 'æ¹å·', width: 150, edit: 'text' } |
| | |
| | | obj.update({ |
| | | HPrice: oldText |
| | | }); |
| | | |
| | | table.render(option); |
| | | layer.msg("å价请è¾å
¥å¤§äº0çæ°å!"); |
| | | return; |
| | | } |
| | |
| | | obj.update({ |
| | | HTaxRate: oldText |
| | | }); |
| | | |
| | | table.render(option); |
| | | layer.msg("ç¨ç请è¾å
¥ä¸å°äº0çæ°å!"); |
| | | return; |
| | | } |
| | |
| | | , { field: 'HMoney', title: 'éé¢', width: 100, totalRow: true, style: 'background-color:#efefef4d;' } |
| | | , { field: 'HTaxRate', title: 'ç¨ç', width: 100, edit: 'text' } |
| | | , { field: 'HTaxMoney', title: 'ç¨é¢', width: 100, style: 'background-color:#efefef4d;' } |
| | | , { field: 'HlineTotal', title: 'ä»·ç¨å计', width: 100, edit: 'text' } |
| | | , { field: 'HlineTotal', title: 'ä»·ç¨å计', width: 100, style: 'background-color:#efefef4d;' } |
| | | , { field: 'HRemark', title: '夿³¨', width: 100, edit: 'text' } |
| | | , { fixed: 'right', field: 'æä½', title: 'æä½', toolbar: '#barDemo', width: 70 } |
| | | ]] |
| | |
| | | |
| | | //ä»åº |
| | | if (obj.event == "HWHID") { //夿obj.eventäºä»¶ çå符串æ¯å¦==HWHID |
| | | var HOrgName = $('select[name="HOrgID"] option:selected').text(); |
| | | layer.open({ //æå¼å± |
| | | type: 2 //表示弹åºå±çå
容æ¯ä¸ä¸ª iframe ç±»å为2 |
| | | , skin: "layui-layer-rim" //å ä¸è¾¹æ¡ |
| | |
| | | , shift: 2 //å¼¹åºå¨ç» |
| | | , area: ["90%", "90%"] //çªä½å¤§å° |
| | | , maxmin: true //设置æå¤§æå°æé®æ¯å¦æ¾ç¤º |
| | | , content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_Warehouse.html?type=Warehouse', 'yes']//设置 iframe ç URLï¼URL ä¸å
å«äºæ¥è¯¢åæ°ï¼æ¥è°ç¨æéè¦çå¼ |
| | | , content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_Warehouse.html?type=Warehouse&HOrgName=' + HOrgName, 'yes']//设置 iframe ç URLï¼URL ä¸å
å«äºæ¥è¯¢åæ°ï¼æ¥è°ç¨æéè¦çå¼ |
| | | , btn: ["ç¡®å®", "åæ¶"] //èªå®ä¹éæ©æé® å
¶æé®çå称为 ç¡®å®ï¼åæ¶ |
| | | , btn1: function (index, laero) { //å½ä¸ºä¸ºç¡®è®¤æ¶ |
| | | //æé®ä¸ çåè° |
| | |
| | | obj.update({ |
| | | HPrice: oldText |
| | | }); |
| | | /* table.render(option);*/ |
| | | table.render(option); |
| | | |
| | | layer.msg("å价请è¾å
¥å¤§äº0çæ°å!"); |
| | | return; |
| | |
| | | obj.update({ |
| | | HMoney: oldText |
| | | }); |
| | | /* table.render(option);*/ |
| | | table.render(option); |
| | | |
| | | layer.msg("éé¢è¯·è¾å
¥å¤§äº0çæ°å!"); |
| | | return; |
| | |
| | | var HQty = obj.data.HQty * 1; //æ°é |
| | | var HMoney = value * 1; |
| | | var HPrice = (HMoney / HQty); //åä»·=éé¢/æ°é |
| | | var HTaxRate = value * 0.01; //ç¨ç |
| | | var HTaxRate = obj.data.HTaxRate * 0.01; //ç¨ç |
| | | var HTaxPrice = HPrice * (1 + HTaxRate); //å«ç¨åä»·=åä»·*(1+ç¨ç) |
| | | var HTaxMoney = HMoney * HTaxRate; //ç¨é¢=éé¢*ç¨ç |
| | | var HlineTotal = HMoney + HTaxMoney; //ä»·ç¨å计=éé¢+ç¨é¢ |
| | |
| | | obj.update({ |
| | | HMoney: oldText |
| | | }); |
| | | /* table.render(option);*/ |
| | | table.render(option); |
| | | |
| | | layer.msg("éé¢è¯·è¾å
¥å¤§äº0çæ°å!"); |
| | | return; |
| | |
| | | //æ°æ®æ ¡éªåæ ¼ï¼éç®è®°å½ |
| | | var HQty = obj.data.HQty * 1; //æ°é |
| | | var HMoney = value * 1; |
| | | var HPrice = (HMoney / HQty).toFixed(2); //åä»·=éé¢/æ°é |
| | | var HPrice = Number((HMoney / HQty).toFixed(2)); //åä»·=éé¢/æ°é |
| | | HQty = Number(HQty.toFixed(HQtyDec)); |
| | | HPrice = Number(HPrice.toFixed(HPriceDec)); |
| | | HMoney = Number(HMoney.toFixed(HMoneyDec)); |