From 549c2c9e9af028aba4329e77f75502d1d42c39bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Sat, 12 Oct 2019 15:52:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=95=86=E5=93=81=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=B1=95=E7=A4=BA=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- erp_web/pages/materials/material.html | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/erp_web/pages/materials/material.html b/erp_web/pages/materials/material.html index db1d02d8..a886054f 100644 --- a/erp_web/pages/materials/material.html +++ b/erp_web/pages/materials/material.html @@ -469,18 +469,20 @@ res = value; } else { var ps = rec.pricestrategy; - var arr = JSON.parse(ps); - var basic = ""; - if(type == "lowprice") { - basic = arr[0].basic.LowPrice; - } else if(type == "presetpriceone") { - basic = arr[0].basic.PresetPriceOne; - } else if(type == "presetpricetwo") { - basic = arr[0].basic.PresetPriceTwo; - } else if(type == "retailprice") { - basic = arr[0].basic.RetailPrice; + if(ps) { + var arr = JSON.parse(ps); + var basic = ""; + if(type == "lowprice") { + basic = arr[0].basic.LowPrice; + } else if(type == "presetpriceone") { + basic = arr[0].basic.PresetPriceOne; + } else if(type == "presetpricetwo") { + basic = arr[0].basic.PresetPriceTwo; + } else if(type == "retailprice") { + basic = arr[0].basic.RetailPrice; + } + res = basic; } - res = basic; } return res; }