| | |
| | | <wd-form ref="form" :model="model" class="relative form_box"> |
| | | <wd-cell-group :border="true"> |
| | | <wd-input |
| | | v-model="model.contractNo" |
| | | label="合同号" |
| | | v-model="model.poleNumber" |
| | | label="领用杆号" |
| | | label-width="100px" |
| | | prop="contractNo" |
| | | prop="poleNumber" |
| | | clearable |
| | | placeholder="请输入合同号" |
| | | placeholder="请输入领用杆号" |
| | | /> |
| | | <wd-input |
| | | v-model="model.clientName" |
| | | label="客户名称" |
| | | v-model="model.poleWeight" |
| | | label="杆重" |
| | | label-width="100px" |
| | | prop="clientName" |
| | | prop="poleWeight" |
| | | clearable |
| | | placeholder="请输入客户名称" |
| | | placeholder="请输入杆重" |
| | | /> |
| | | <wd-input |
| | | v-model="model.workbench" |
| | | label="机台" |
| | | v-model="model.monofilamentNumber" |
| | | label="单丝盘号" |
| | | label-width="100px" |
| | | prop="workbench" |
| | | prop="monofilamentNumber" |
| | | clearable |
| | | placeholder="请输入机台" |
| | | /> |
| | | <wd-input |
| | | v-model="model.monofilNo" |
| | | label="单体编号" |
| | | v-model="model.model" |
| | | label="规格型号" |
| | | label-width="100px" |
| | | prop="monofilNo" |
| | | prop="model" |
| | | clearable |
| | | placeholder="请输入单体编号" |
| | | placeholder="请输入规格型号" |
| | | /> |
| | | <wd-input |
| | | v-model="model.specification" |
| | | label="规格" |
| | | v-model="model.ontLength" |
| | | label="盘长" |
| | | label-width="100px" |
| | | prop="specification" |
| | | prop="ontLength" |
| | | clearable |
| | | placeholder="请输入规格" |
| | | placeholder="请输入盘长" |
| | | /> |
| | | <wd-input |
| | | v-model="model.singleDisc" |
| | | label="单丝盘长" |
| | | v-model="model.theoryWeight" |
| | | label="理论重量" |
| | | label-width="100px" |
| | | prop="singleDisc" |
| | | prop="theoryWeight" |
| | | clearable |
| | | placeholder="请输入单丝盘长" |
| | | placeholder="请输入理论重量" |
| | | /> |
| | | <wd-input |
| | | v-model="model.actuallyWeight" |
| | | label="实际重量" |
| | | label-width="100px" |
| | | prop="actuallyWeight" |
| | | clearable |
| | | placeholder="请输入实际重量" |
| | | /> |
| | | </wd-cell-group> |
| | | <wd-toast /> |
| | | </wd-form> |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | | import useFormData from "@/hooks/useFormData"; |
| | | import { useToast } from "wot-design-uni"; |
| | | import WireApi from "@/api/product/wire"; |
| | | |
| | | const paramsId = ref(); |
| | | const toast = useToast(); |
| | | const { form: model } = useFormData({ |
| | | contractNo: undefined, // 合同号 |
| | | clientName: undefined, // 客户名称 |
| | | workbench: undefined, // 机台 |
| | | monofilNo: undefined, // 单体编号 |
| | | specification: undefined, // 规格 |
| | | poleNumber: undefined, // 领用杆号 |
| | | poleWeight: undefined, // 客户名称 |
| | | monofilamentNumber: undefined, // 单丝盘号 |
| | | model: undefined, // 规格型号 |
| | | oneLength: undefined, // 盘长 |
| | | singleDisc: undefined, // 单丝盘长 |
| | | }); |
| | | |
| | | const submit = async () => { |
| | | const { code } = await WireApi.addWireOutput({ |
| | | wireId: paramsId.value, |
| | | type: "拉丝", |
| | | ...model, |
| | | }); |
| | | if (code == 200) { |
| | | toast.success("提交成功"); |
| | | return true; |
| | | } else { |
| | | toast.error("提交失败"); |
| | | return false; |
| | | } |
| | | }; |
| | | |
| | | onLoad((options: any) => { |
| | | paramsId.value = options.id; |
| | | }); |
| | | |
| | | defineExpose({ |
| | | submit, |
| | | }); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |