隐藏模型价格重量字段
This commit is contained in:
@@ -308,8 +308,6 @@ function renderModelCard(item: ModelItem) {
|
|||||||
<div><dt>品牌</dt><dd>${escapeHtml(item.brand_name ?? "")}</dd></div>
|
<div><dt>品牌</dt><dd>${escapeHtml(item.brand_name ?? "")}</dd></div>
|
||||||
<div><dt>类型</dt><dd>${escapeHtml(item.type_name ?? "")}</dd></div>
|
<div><dt>类型</dt><dd>${escapeHtml(item.type_name ?? "")}</dd></div>
|
||||||
<div><dt>型号</dt><dd>${escapeHtml(prop.model ?? "")}</dd></div>
|
<div><dt>型号</dt><dd>${escapeHtml(prop.model ?? "")}</dd></div>
|
||||||
<div><dt>价钱</dt><dd>${escapeHtml(prop.price ?? "")}</dd></div>
|
|
||||||
<div><dt>重量</dt><dd>${escapeHtml(prop.weight ?? "")}</dd></div>
|
|
||||||
</dl>
|
</dl>
|
||||||
</article>
|
</article>
|
||||||
`;
|
`;
|
||||||
@@ -508,8 +506,6 @@ async function openUploadModelDialog() {
|
|||||||
<label><span>品牌</span><input name="brandName" list="brandOptions" /></label>
|
<label><span>品牌</span><input name="brandName" list="brandOptions" /></label>
|
||||||
<label><span>类型</span><input name="typeName" list="typeOptions" /></label>
|
<label><span>类型</span><input name="typeName" list="typeOptions" /></label>
|
||||||
<label><span>型号</span><input name="model" /></label>
|
<label><span>型号</span><input name="model" /></label>
|
||||||
<label><span>价钱</span><input name="price" /></label>
|
|
||||||
<label><span>重量</span><input name="weight" /></label>
|
|
||||||
</div>
|
</div>
|
||||||
${dictionaryDatalistHtml()}
|
${dictionaryDatalistHtml()}
|
||||||
</form>
|
</form>
|
||||||
@@ -532,9 +528,7 @@ async function openUploadModelDialog() {
|
|||||||
typeName: String(form.get("typeName") ?? ""),
|
typeName: String(form.get("typeName") ?? ""),
|
||||||
operationTree: defaultOperationTree,
|
operationTree: defaultOperationTree,
|
||||||
properties: {
|
properties: {
|
||||||
model: String(form.get("model") ?? ""),
|
model: String(form.get("model") ?? "")
|
||||||
price: String(form.get("price") ?? ""),
|
|
||||||
weight: String(form.get("weight") ?? "")
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
@@ -572,8 +566,6 @@ export async function openProcessModelUploadDialog(input?: {
|
|||||||
<label><span>品牌</span><input name="brandName" list="brandOptions" autocomplete="off" /></label>
|
<label><span>品牌</span><input name="brandName" list="brandOptions" autocomplete="off" /></label>
|
||||||
<label><span>类型</span><input name="typeName" list="typeOptions" autocomplete="off" /></label>
|
<label><span>类型</span><input name="typeName" list="typeOptions" autocomplete="off" /></label>
|
||||||
<label><span>型号</span><input name="model" autocomplete="off" /></label>
|
<label><span>型号</span><input name="model" autocomplete="off" /></label>
|
||||||
<label><span>价钱</span><input name="price" autocomplete="off" /></label>
|
|
||||||
<label><span>重量</span><input name="weight" autocomplete="off" /></label>
|
|
||||||
</div>
|
</div>
|
||||||
${dictionaryDatalistHtml()}
|
${dictionaryDatalistHtml()}
|
||||||
</form>
|
</form>
|
||||||
@@ -593,9 +585,7 @@ export async function openProcessModelUploadDialog(input?: {
|
|||||||
typeName: String(form.get("typeName") ?? ""),
|
typeName: String(form.get("typeName") ?? ""),
|
||||||
operationTree: String(form.get("operationTree") ?? ""),
|
operationTree: String(form.get("operationTree") ?? ""),
|
||||||
properties: {
|
properties: {
|
||||||
model: String(form.get("model") ?? ""),
|
model: String(form.get("model") ?? "")
|
||||||
price: String(form.get("price") ?? ""),
|
|
||||||
weight: String(form.get("weight") ?? "")
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
@@ -750,7 +740,7 @@ async function editModel(id: number) {
|
|||||||
const card = document.querySelector<HTMLButtonElement>(`button[data-id="${id}"]`)?.closest(".model-card");
|
const card = document.querySelector<HTMLButtonElement>(`button[data-id="${id}"]`)?.closest(".model-card");
|
||||||
const oldName = card?.querySelector("strong")?.textContent ?? "";
|
const oldName = card?.querySelector("strong")?.textContent ?? "";
|
||||||
await loadDictionaries();
|
await loadDictionaries();
|
||||||
const result = await formDialog<{ name: string; brandName: string; typeName: string; model: string; price: string; weight: string }>({
|
const result = await formDialog<{ name: string; brandName: string; typeName: string; model: string }>({
|
||||||
title: "编辑模型",
|
title: "编辑模型",
|
||||||
width: 520,
|
width: 520,
|
||||||
height: 390,
|
height: 390,
|
||||||
@@ -762,8 +752,6 @@ async function editModel(id: number) {
|
|||||||
<label><span>品牌</span><input name="brandName" list="brandOptions" value="${escapeHtml(card?.querySelector("dl div:nth-child(1) dd")?.textContent ?? "")}" /></label>
|
<label><span>品牌</span><input name="brandName" list="brandOptions" value="${escapeHtml(card?.querySelector("dl div:nth-child(1) dd")?.textContent ?? "")}" /></label>
|
||||||
<label><span>类型</span><input name="typeName" list="typeOptions" value="${escapeHtml(card?.querySelector("dl div:nth-child(2) dd")?.textContent ?? "")}" /></label>
|
<label><span>类型</span><input name="typeName" list="typeOptions" value="${escapeHtml(card?.querySelector("dl div:nth-child(2) dd")?.textContent ?? "")}" /></label>
|
||||||
<label><span>型号</span><input name="model" value="${escapeHtml(card?.querySelector("dl div:nth-child(3) dd")?.textContent ?? "")}" /></label>
|
<label><span>型号</span><input name="model" value="${escapeHtml(card?.querySelector("dl div:nth-child(3) dd")?.textContent ?? "")}" /></label>
|
||||||
<label><span>价钱</span><input name="price" value="${escapeHtml(card?.querySelector("dl div:nth-child(4) dd")?.textContent ?? "")}" /></label>
|
|
||||||
<label><span>重量</span><input name="weight" value="${escapeHtml(card?.querySelector("dl div:nth-child(5) dd")?.textContent ?? "")}" /></label>
|
|
||||||
</div>
|
</div>
|
||||||
${dictionaryDatalistHtml()}
|
${dictionaryDatalistHtml()}
|
||||||
</form>
|
</form>
|
||||||
@@ -778,9 +766,7 @@ async function editModel(id: number) {
|
|||||||
name,
|
name,
|
||||||
brandName: String(form.get("brandName") ?? ""),
|
brandName: String(form.get("brandName") ?? ""),
|
||||||
typeName: String(form.get("typeName") ?? ""),
|
typeName: String(form.get("typeName") ?? ""),
|
||||||
model: String(form.get("model") ?? ""),
|
model: String(form.get("model") ?? "")
|
||||||
price: String(form.get("price") ?? ""),
|
|
||||||
weight: String(form.get("weight") ?? "")
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -792,9 +778,7 @@ async function editModel(id: number) {
|
|||||||
brandName: result.brandName,
|
brandName: result.brandName,
|
||||||
typeName: result.typeName,
|
typeName: result.typeName,
|
||||||
properties: {
|
properties: {
|
||||||
model: result.model,
|
model: result.model
|
||||||
price: result.price,
|
|
||||||
weight: result.weight
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user