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);