曹睿
2025-04-23 f825462aead9ccfaedbc2b822d0114a807b7fe43
feat: 完成新增
已修改2个文件
24 ■■■■■ 文件已修改
src/pages/production/twist/receive/plate/form.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/production/twist/receive/steelCore/form.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/production/twist/receive/plate/form.vue
@@ -44,6 +44,7 @@
import { useToast } from "wot-design-uni";
const emits = defineEmits(["refresh"]);
const paramsId = ref();
const toast = useToast();
const { form: model } = useFormData({
  diskMaterial: undefined, // 盘具类型
@@ -54,7 +55,12 @@
});
const submit = async () => {
  const { code } = await TwistApi.addStrandedWireDish([model]);
  const { code } = await TwistApi.addStrandedWireDish([
    {
      wireId: paramsId.value,
      ...model,
    },
  ]);
  if (code == 200) {
    toast.success("新增成功");
    emits("refresh");
@@ -62,6 +68,10 @@
  }
};
onLoad((options: any) => {
  paramsId.value = options.id;
});
defineExpose({
  submit,
});
src/pages/production/twist/receive/steelCore/form.vue
@@ -43,6 +43,7 @@
import { useToast } from "wot-design-uni";
const emits = defineEmits(["refresh"]);
const paramsId = ref();
const toast = useToast();
const { form: model } = useFormData({
  model: undefined, // 规格型号
@@ -53,7 +54,12 @@
});
const submit = async () => {
  const { code } = await TwistApi.addStrandedWireDish([model]);
  const { code } = await TwistApi.addStrandedWireDish([
    {
      wireId: paramsId.value,
      ...model,
    },
  ]);
  if (code == 200) {
    toast.success("新增成功");
    emits("refresh");
@@ -61,6 +67,10 @@
  }
};
onLoad((options: any) => {
  paramsId.value = options.id;
});
defineExpose({
  submit,
});