| | |
| | | <wd-cell-group :border="true"> |
| | | <wd-input |
| | | v-model="model.contractNo" |
| | | label="合同号" |
| | | label="领用杆号" |
| | | label-width="100px" |
| | | prop="contractNo" |
| | | clearable |
| | | placeholder="请输入合同号" |
| | | placeholder="请输入领用杆号" |
| | | /> |
| | | <wd-input |
| | | v-model="model.status" |
| | | label="状态" |
| | | label="杆重(kg)" |
| | | label-width="100px" |
| | | prop="status" |
| | | clearable |
| | | placeholder="请输入状态" |
| | | placeholder="请输入杆重" |
| | | /> |
| | | <wd-input |
| | | v-model="model.clientName" |
| | | label="客户名称" |
| | | label="单丝盘号" |
| | | label-width="100px" |
| | | prop="clientName" |
| | | clearable |
| | | placeholder="请输入客户名称" |
| | | placeholder="请输入单丝盘号" |
| | | /> |
| | | <wd-input |
| | | v-model="model.workbench" |
| | | label="机台" |
| | | label="实际重量(kg)" |
| | | label-width="100px" |
| | | prop="workbench" |
| | | clearable |
| | | placeholder="请输入机台" |
| | | placeholder="请输入实际重量" |
| | | /> |
| | | <wd-input |
| | | v-model="model.quality" |
| | | label="质量追溯号" |
| | | label-width="100px" |
| | | prop="quality" |
| | | clearable |
| | | placeholder="请输入质量追溯号" |
| | | /> |
| | | <wd-input |
| | | v-model="model.specification" |
| | | label="规格型号" |
| | | label-width="100px" |
| | | prop="specification" |
| | | clearable |
| | | placeholder="请输入规格型号" |
| | | /> |
| | | <wd-input |
| | | v-model="model.disc" |
| | | label="盘长(m)" |
| | | label-width="100px" |
| | | prop="disc" |
| | | prop="quality" |
| | | clearable |
| | | placeholder="请输入盘长" |
| | | /> |
| | | <wd-input |
| | | v-model="model.produced" |
| | | label="已生产(m)" |
| | | v-model="model.specification" |
| | | label="理论重量(kg)" |
| | | label-width="100px" |
| | | prop="produced" |
| | | prop="specification" |
| | | clearable |
| | | placeholder="请输入已生产" |
| | | placeholder="请输入理论重量" |
| | | /> |
| | | <wd-input |
| | | v-model="model.beProduced" |
| | | label="待生产(m)" |
| | | v-model="model.disc" |
| | | label="规格型号" |
| | | label-width="100px" |
| | | prop="beProduced" |
| | | prop="disc" |
| | | clearable |
| | | placeholder="请输入单丝盘长" |
| | | placeholder="请输入规格型号" |
| | | /> |
| | | </wd-cell-group> |
| | | </wd-form> |
| | |
| | | |
| | | <script lang="ts" setup> |
| | | import useFormData from "@/hooks/useFormData"; |
| | | import { useToast } from "wot-design-uni"; |
| | | import TwistApi from "@/api/product/twist"; |
| | | |
| | | const paramsId = ref(); |
| | | const toast = useToast(); |
| | | const { form: model } = useFormData({ |
| | | contractNo: undefined, // 合同号 |
| | | status: undefined, // 状态 |
| | | clientName: undefined, // 客户名称 |
| | | workbench: undefined, // 机台 |
| | | quality: undefined, // 质量追溯号 |
| | | specification: undefined, // 规格型号 |
| | | disc: undefined, // 盘长 |
| | | produced: undefined, // 已生产 |
| | | beProduced: undefined, // 待生产 |
| | | poleNumber: undefined, // 领用杆号 |
| | | poleWeight: undefined, // 杆重(kg) |
| | | monofilamentNumber: undefined, // 单丝盘号 |
| | | actuallyWeight: undefined, // 实际重量(kg) |
| | | ontLength: undefined, // 盘长(m) |
| | | theoryWeight: undefined, // 理论重量(kg) |
| | | model: undefined, // 规格型号 |
| | | }); |
| | | |
| | | const submit = async () => { |
| | | const { code } = await TwistApi.addTwistOutput({ |
| | | wireId: paramsId.value, |
| | | ...model, |
| | | }); |
| | | if (code == 200) { |
| | | toast.success("提交成功"); |
| | | return true; |
| | | } else { |
| | | toast.error("提交失败"); |
| | | return false; |
| | | } |
| | | }; |
| | | |
| | | onLoad((options: any) => { |
| | | paramsId.value = options.id; |
| | | }); |
| | | |
| | | defineExpose({ |
| | | submit, |
| | | }); |
| | | </script> |
| | | |