曹睿
2025-04-23 f825462aead9ccfaedbc2b822d0114a807b7fe43
src/pages/production/twist/receive/plate/form.vue
@@ -44,16 +44,23 @@
import { useToast } from "wot-design-uni";
const emits = defineEmits(["refresh"]);
const paramsId = ref();
const toast = useToast();
const { form: model } = useFormData({
  diskMaterial: undefined, // 盘具类型
  model: undefined, // 尺寸
  amount: undefined, // 数量
  supplier: undefined,
  type: "盘具",
});
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 +68,10 @@
  }
};
onLoad((options: any) => {
  paramsId.value = options.id;
});
defineExpose({
  submit,
});