diff --git a/src/views/product/product/add_edit.vue b/src/views/product/product/add_edit.vue
index 317b472..9789499 100644
--- a/src/views/product/product/add_edit.vue
+++ b/src/views/product/product/add_edit.vue
@@ -16,7 +16,7 @@
-
+
@@ -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 });
}
//添加加工次数
diff --git a/src/views/product/product/index.vue b/src/views/product/product/index.vue
index 8de9e31..bca99f6 100644
--- a/src/views/product/product/index.vue
+++ b/src/views/product/product/index.vue
@@ -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;