From 9d0c2a41859dbe5903fd85be8be7167d098007ee Mon Sep 17 00:00:00 2001 From: Default User Date: Fri, 23 Jan 2026 11:05:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=8D=E5=88=B6=E8=B4=A7?= =?UTF-8?q?=E6=BA=90=E5=8A=9F=E8=83=BD=EF=BC=8C=E5=B0=86=E8=A7=84=E6=A0=BC?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E8=AE=BE=E7=BD=AE=E4=B8=BA0=E4=B8=94?= =?UTF-8?q?=E4=B8=8D=E5=8F=AF=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply.html | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/supply.html b/supply.html index 94f78b0..ac6f272 100644 --- a/supply.html +++ b/supply.html @@ -3102,7 +3102,7 @@ - + `; container.appendChild(pair); @@ -5242,6 +5242,27 @@ quantities = [supply.quantity || '']; } + // 解析采购价(英文逗号分隔字符串) + try { + if (supply.costprice) { + if (typeof supply.costprice === 'string') { + costprices = supply.costprice.split(',').filter(cp => cp.trim()); + } else if (Array.isArray(supply.costprice)) { + costprices = supply.costprice; + } else { + costprices = [supply.costprice]; + } + } + } catch (e) { + costprices = [supply.costprice || '']; + } + + // 复制货源时,将所有规格状态设置为0 + let specStatuses = []; + for (let i = 0; i < specifications.length; i++) { + specStatuses.push('0'); + } + // 动态生成规格-件数对输入框 const specQuantityPairs = document.getElementById('specQuantityPairs'); if (specQuantityPairs) { @@ -5258,8 +5279,9 @@ pair.className = 'spec-quantity-pair'; pair.innerHTML = ` - + + `; specQuantityPairs.appendChild(pair); @@ -7150,7 +7172,7 @@ - + `; specQuantityPairs.appendChild(pair); @@ -7497,7 +7519,7 @@ - + `; container.appendChild(pair);