产品管理修改 集合针管理,加工次数管理

This commit is contained in:
hzz 2024-04-29 17:06:37 +08:00
parent bd98db02ac
commit dc412800c6
2 changed files with 12 additions and 12 deletions

View File

@ -16,7 +16,7 @@
<el-button type="primary" icon="Plus" circle @click="handleAddNeedle" />
</el-form-item>
<el-table :data="props.form.needle" style="margin-bottom: 15px;">
<el-table :data="props.form.zhen" style="margin-bottom: 15px;">
<el-table-column type="index" :label="tLang('product', '针号')" width="60" align="center" />
<el-table-column :label="tLang('product', '面线信息')" align="center" prop="name">
<template #default="scope">
@ -114,29 +114,29 @@ const baseUrl = import.meta.env.VITE_APP_BASE_API;
//
function handleAddNeedle() {
let needle = props.form.needle || [];
needle.push({
needleNum: needle.length + 1,
let zhen = props.form.zhen || [];
zhen.push({
needleNum: zhen.length + 1,
surfacelineCode: "",
bottomlineCode: "",
min: "",
max: "",
});
emit("update:form", { ...props.form, needle });
emit("update:form", { ...props.form, zhen });
}
//
function handleDeleteNeedle(i) {
let needle = props.form.needle || [];
let length = needle.length;
needle.splice(i, 1);
if (needle.length>0 && i != length - 1) {
needle = needle.map((item, index) => {
let zhen = props.form.zhen || [];
let length = zhen.length;
zhen.splice(i, 1);
if (zhen.length>0 && i != length - 1) {
zhen = zhen.map((item, index) => {
item.needleNum = index + 1;
return item;
});
}
emit("update:form", { ...props.form, needle });
emit("update:form", { ...props.form, zhen });
}
//

View File

@ -273,7 +273,7 @@ function reset() {
function handleUpdate(row) {
reset();
const id = row.code || ids.value
getProduction(id).then(response => {
selectProduction(id).then(response => {
form.value = response.data;
form.value.disabled = true;
open.value = true;