|  |  | 
 |  |  |   model: undefined, // 尺寸 | 
 |  |  |   amount: undefined, // 数量 | 
 |  |  |   supplier: undefined, | 
 |  |  |   type: "盘具", | 
 |  |  | }); | 
 |  |  |  | 
 |  |  | const submit = async () => { | 
 
 |  |  | 
 |  |  |       @query="getList" | 
 |  |  |     > | 
 |  |  |       <template #top> | 
 |  |  |         <CardTitle title="盘具领用" :hideAction="true" @action="addReport" /> | 
 |  |  |         <CardTitle title="盘具领用" :hideAction="true" :full="false" @action="addReport" /> | 
 |  |  |       </template> | 
 |  |  |       <wd-card v-for="(item, index) in cardList" :key="index" type="rectangle" custom-class="round"> | 
 |  |  |         <template #title> | 
 
 |  |  | 
 |  |  |  | 
 |  |  | <script lang="ts" setup> | 
 |  |  | import useFormData from "@/hooks/useFormData"; | 
 |  |  | import TwistApi from "@/api/product/twist"; | 
 |  |  | import { useToast } from "wot-design-uni"; | 
 |  |  |  | 
 |  |  | const emits = defineEmits(["refresh"]); | 
 |  |  | const toast = useToast(); | 
 |  |  | const { form: model } = useFormData({ | 
 |  |  |   model: undefined, // 规格型号 | 
 |  |  |   monofilamentNumber: undefined, // 样品编号 | 
 |  |  |   amount: undefined, // 数量 | 
 |  |  |   manufacturers: undefined, // 厂家 | 
 |  |  |   type: "钢芯", | 
 |  |  | }); | 
 |  |  |  | 
 |  |  | const submit = async () => { | 
 |  |  |   const { code } = await TwistApi.addStrandedWireDish([model]); | 
 |  |  |   if (code == 200) { | 
 |  |  |     toast.success("新增成功"); | 
 |  |  |     emits("refresh"); | 
 |  |  |     return true; | 
 |  |  |   } | 
 |  |  | }; | 
 |  |  |  | 
 |  |  | defineExpose({ | 
 |  |  |   submit, | 
 |  |  | }); | 
 |  |  | </script> | 
 |  |  |  | 
 
 |  |  | 
 |  |  |       @query="getList" | 
 |  |  |     > | 
 |  |  |       <template #top> | 
 |  |  |         <CardTitle title="钢芯领用" :hideAction="true" @action="addReport" /> | 
 |  |  |         <CardTitle title="钢芯领用" :hideAction="true" :full="false" @action="addReport" /> | 
 |  |  |       </template> | 
 |  |  |       <wd-card v-for="(item, index) in cardList" :key="index" type="rectangle" custom-class="round"> | 
 |  |  |         <template #title> | 
 |  |  | 
 |  |  |       <wd-button type="text" @click="cancel">取消</wd-button> | 
 |  |  |       <wd-button type="text" @click="submit">确定</wd-button> | 
 |  |  |     </view> | 
 |  |  |     <SteelCore ref="steelCoreRef" /> | 
 |  |  |     <SteelCore ref="steelCoreRef" @refresh="reloadList" /> | 
 |  |  |   </wd-popup> | 
 |  |  |   <wd-toast /> | 
 |  |  | </template> | 
 |  |  | 
 |  |  |   } | 
 |  |  | }; | 
 |  |  |  | 
 |  |  | const reloadList = () => { | 
 |  |  |   pagingRef.value.refresh(); | 
 |  |  | }; | 
 |  |  |  | 
 |  |  | onLoad((options: any) => { | 
 |  |  |   paramsId.value = options.id; | 
 |  |  | }); |