|  |  | 
 |  |  |       <view class="flex justify-between w-full h-[20px]"> | 
 |  |  |         <view class="text-[#646874] pl-1">{{ item.label }}</view> | 
 |  |  |         <view class="font-medium pr-1" :style="{ color: item.color ?? color }"> | 
 |  |  |           {{ value[item.prop] }} {{ item.unit }} | 
 |  |  |           {{ value[item.prop] }} {{ value[item.unitProp] }} {{ item.unit }} | 
 |  |  |         </view> | 
 |  |  |       </view> | 
 |  |  |     </wd-col> | 
 
 |  |  | 
 |  |  |   <wd-form ref="form" :model="model" class="relative form_box"> | 
 |  |  |     <wd-cell-group :border="true"> | 
 |  |  |       <wd-input | 
 |  |  |         v-model="model.plateType" | 
 |  |  |         v-model="model.diskMaterial" | 
 |  |  |         label="盘具类型" | 
 |  |  |         label-width="100px" | 
 |  |  |         prop="plateType" | 
 |  |  |         prop="diskMaterial" | 
 |  |  |         clearable | 
 |  |  |         placeholder="请输入盘具类型" | 
 |  |  |       /> | 
 |  |  |       <wd-input | 
 |  |  |         v-model="model.length" | 
 |  |  |         v-model="model.model" | 
 |  |  |         label="尺寸" | 
 |  |  |         label-width="100px" | 
 |  |  |         prop="length" | 
 |  |  |         prop="model" | 
 |  |  |         clearable | 
 |  |  |         placeholder="请输入尺寸" | 
 |  |  |       /> | 
 |  |  |       <wd-input | 
 |  |  |         v-model="model.weigth" | 
 |  |  |         label="重量" | 
 |  |  |         v-model="model.amount" | 
 |  |  |         label="数量" | 
 |  |  |         label-width="100px" | 
 |  |  |         prop="weigth" | 
 |  |  |         prop="amount" | 
 |  |  |         clearable | 
 |  |  |         placeholder="请输入重量" | 
 |  |  |         placeholder="请输入数量" | 
 |  |  |       /> | 
 |  |  |       <wd-input | 
 |  |  |         v-model="model.supplier" | 
 |  |  |         label="厂家" | 
 |  |  |         label-width="100px" | 
 |  |  |         prop="supplier" | 
 |  |  |         clearable | 
 |  |  |         placeholder="请输入厂家" | 
 |  |  |       /> | 
 |  |  |     </wd-cell-group> | 
 |  |  |     <wd-toast /> | 
 |  |  |   </wd-form> | 
 |  |  | </template> | 
 |  |  |  | 
 |  |  | <script setup lang="ts"> | 
 |  |  | 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({ | 
 |  |  |   plateType: undefined, // 盘具类型 | 
 |  |  |   length: undefined, // 尺寸 | 
 |  |  |   weigth: undefined, // 重量 | 
 |  |  |   diskMaterial: undefined, // 盘具类型 | 
 |  |  |   model: undefined, // 尺寸 | 
 |  |  |   amount: undefined, // 数量 | 
 |  |  |   supplier: undefined, | 
 |  |  | }); | 
 |  |  |  | 
 |  |  | const submit = async () => { | 
 |  |  |   const { code } = await TwistApi.addStrandedWireDish([model]); | 
 |  |  |   if (code == 200) { | 
 |  |  |     toast.success("新增成功"); | 
 |  |  |     emits("refresh"); | 
 |  |  |     return true; | 
 |  |  |   } | 
 |  |  | }; | 
 |  |  |  | 
 |  |  | defineExpose({ | 
 |  |  |   submit, | 
 |  |  | }); | 
 |  |  | </script> | 
 |  |  | <style lang="scss" scoped> | 
 
 |  |  | 
 |  |  |           <view class="flex justify-between"> | 
 |  |  |             <view> | 
 |  |  |               <wd-icon name="a-rootlist" color="#0D867F"></wd-icon> | 
 |  |  |               <text class="text-[#252525] ml-2 font-medium">铁木盘</text> | 
 |  |  |               <text class="text-[#252525] ml-2 font-medium">{{ item.diskMaterial }}</text> | 
 |  |  |             </view> | 
 |  |  |             <view class="text-[#A8A8A8]" @click="toEdit">编辑</view> | 
 |  |  |           </view> | 
 |  |  | 
 |  |  |       <wd-button type="text" @click="cancel">取消</wd-button> | 
 |  |  |       <wd-button type="text" @click="submit">确定</wd-button> | 
 |  |  |     </view> | 
 |  |  |     <PlateForm /> | 
 |  |  |     <PlateForm ref="plateFormRef" @refresh="reloadList" /> | 
 |  |  |   </wd-popup> | 
 |  |  |   <wd-toast /> | 
 |  |  | </template> | 
 |  |  | 
 |  |  |  | 
 |  |  | const paramsId = ref(); | 
 |  |  | const pagingRef = ref(); | 
 |  |  | const plateFormRef = ref(); | 
 |  |  | const toast = useToast(); | 
 |  |  | const dialog = reactive({ | 
 |  |  |   visible: false, | 
 |  |  | 
 |  |  |     prop: "weight", | 
 |  |  |     unit: "kg", | 
 |  |  |   }, | 
 |  |  |   { | 
 |  |  |     label: "数量", | 
 |  |  |     prop: "amount", | 
 |  |  |   }, | 
 |  |  |   {}, | 
 |  |  |   { | 
 |  |  |     label: "厂家", | 
 |  |  |     prop: "supplier", | 
 |  |  |     span: 14, | 
 |  |  |   }, | 
 |  |  | ]); | 
 |  |  |  | 
 |  |  | const toEdit = () => { | 
 |  |  | 
 |  |  |   dialog.visible = true; | 
 |  |  | }; | 
 |  |  |  | 
 |  |  | const submit = () => { | 
 |  |  | const submit = async () => { | 
 |  |  |   toast.show("提交"); | 
 |  |  |   dialog.visible = false; | 
 |  |  |   dialog.visible = !(await plateFormRef.value.submit()); | 
 |  |  | }; | 
 |  |  |  | 
 |  |  | const cancel = () => { | 
 |  |  | 
 |  |  |   dialog.visible = false; | 
 |  |  | }; | 
 |  |  |  | 
 |  |  | const reloadList = () => { | 
 |  |  |   pagingRef.value.refresh(); | 
 |  |  | }; | 
 |  |  |  | 
 |  |  | const getList = async () => { | 
 |  |  |   const { code, data } = await ManageApi.getStrandedWireDish({ | 
 |  |  |     wireId: paramsId.value, | 
 
 |  |  | 
 |  |  |   <wd-form ref="form" :model="model" class="relative form_box"> | 
 |  |  |     <wd-cell-group :border="true"> | 
 |  |  |       <wd-input | 
 |  |  |         v-model="model.steelCoreName" | 
 |  |  |         label="钢芯名称" | 
 |  |  |         v-model="model.model" | 
 |  |  |         label="规格型号" | 
 |  |  |         label-width="100px" | 
 |  |  |         prop="steelCoreName" | 
 |  |  |         prop="model" | 
 |  |  |         clearable | 
 |  |  |         placeholder="请输入钢芯名称" | 
 |  |  |         placeholder="请输入规格型号" | 
 |  |  |       /> | 
 |  |  |       <wd-input | 
 |  |  |         v-model="model.plateNo" | 
 |  |  |         label="盘号" | 
 |  |  |         v-model="model.monofilamentNumber" | 
 |  |  |         label="样品编号" | 
 |  |  |         label-width="100px" | 
 |  |  |         prop="plateNo" | 
 |  |  |         prop="monofilamentNumber" | 
 |  |  |         clearable | 
 |  |  |         placeholder="请输入盘号" | 
 |  |  |       /> | 
 |  |  |       <wd-input | 
 |  |  |         v-model="model.length" | 
 |  |  |         label="长度" | 
 |  |  |         v-model="model.amount" | 
 |  |  |         label="数量" | 
 |  |  |         label-width="100px" | 
 |  |  |         prop="length" | 
 |  |  |         prop="amount" | 
 |  |  |         clearable | 
 |  |  |         placeholder="请输入长度" | 
 |  |  |       /> | 
 |  |  |       <wd-input | 
 |  |  |         v-model="model.weight" | 
 |  |  |         label="重量" | 
 |  |  |         label-width="100px" | 
 |  |  |         prop="weight" | 
 |  |  |         clearable | 
 |  |  |         placeholder="请输入重量" | 
 |  |  |       /> | 
 |  |  |       <wd-input | 
 |  |  |         v-model="model.manufacturers" | 
 |  |  | 
 |  |  | import useFormData from "@/hooks/useFormData"; | 
 |  |  |  | 
 |  |  | const { form: model } = useFormData({ | 
 |  |  |   steelCoreName: undefined, // 钢芯名称 | 
 |  |  |   plateNo: undefined, // 盘号 | 
 |  |  |   length: undefined, // 长度 | 
 |  |  |   weight: undefined, // 重量 | 
 |  |  |   model: undefined, // 规格型号 | 
 |  |  |   monofilamentNumber: undefined, // 样品编号 | 
 |  |  |   amount: undefined, // 数量 | 
 |  |  |   manufacturers: undefined, // 厂家 | 
 |  |  | }); | 
 |  |  | </script> | 
 
 |  |  | 
 |  |  |           <view class="flex justify-between"> | 
 |  |  |             <view> | 
 |  |  |               <wd-icon name="a-rootlist" color="#0D867F"></wd-icon> | 
 |  |  |               <text class="text-[#252525] ml-2 font-medium">JX28201021-1</text> | 
 |  |  |               <text class="text-[#252525] ml-2 font-medium">{{ item.model }}</text> | 
 |  |  |             </view> | 
 |  |  |             <view class="text-[#A8A8A8]" @click="toEdit">编辑</view> | 
 |  |  |           </view> | 
 |  |  |         </template> | 
 |  |  |         <ProductionCard :data="cardAttr" color="#0D867F" /> | 
 |  |  |         <ProductionCard :data="cardAttr" :value="item" color="#0D867F" /> | 
 |  |  |       </wd-card> | 
 |  |  |     </z-paging> | 
 |  |  |   </view> | 
 |  |  | 
 |  |  |       <wd-button type="text" @click="cancel">取消</wd-button> | 
 |  |  |       <wd-button type="text" @click="submit">确定</wd-button> | 
 |  |  |     </view> | 
 |  |  |     <PlateForm /> | 
 |  |  |     <SteelCore ref="steelCoreRef" /> | 
 |  |  |   </wd-popup> | 
 |  |  |   <wd-toast /> | 
 |  |  | </template> | 
 |  |  | 
 |  |  | import CardTitle from "@/components/card-title/index.vue"; | 
 |  |  | import ProductionCard from "../../../components/ProductionCard.vue"; | 
 |  |  | import { useToast } from "wot-design-uni"; | 
 |  |  | import PlateForm from "./form.vue"; | 
 |  |  | import SteelCore from "./form.vue"; | 
 |  |  | import { onLoad } from "@dcloudio/uni-app"; | 
 |  |  | import ManageApi from "@/api/product/manage"; | 
 |  |  | import zPaging from "@/components/z-paging/z-paging.vue"; | 
 |  |  |  | 
 |  |  | const paramsId = ref(); | 
 |  |  | const pagingRef = ref(); | 
 |  |  | const steelCoreRef = ref(); | 
 |  |  | const toast = useToast(); | 
 |  |  | const dialog = reactive({ | 
 |  |  |   visible: false, | 
 |  |  | 
 |  |  |  | 
 |  |  | const cardAttr = ref<any[]>([ | 
 |  |  |   { | 
 |  |  |     label: "盘号", | 
 |  |  |     value: "1902101", | 
 |  |  |     label: "样品编号", | 
 |  |  |     prop: "monofilamentNumber", | 
 |  |  |   }, | 
 |  |  |   { | 
 |  |  |     label: "长度", | 
 |  |  |     value: "46kg", | 
 |  |  |   }, | 
 |  |  |   { | 
 |  |  |     label: "重量", | 
 |  |  |     value: "10kg", | 
 |  |  |   }, | 
 |  |  |   { | 
 |  |  |     label: undefined, | 
 |  |  |     value: undefined, | 
 |  |  |     label: "数量", | 
 |  |  |     prop: "amount", | 
 |  |  |     unitProp: "unit", | 
 |  |  |   }, | 
 |  |  |   { | 
 |  |  |     label: "厂家", | 
 |  |  |     value: "江苏省南通市芯导数字厂", | 
 |  |  |     prop: "supplier", | 
 |  |  |     span: 16, | 
 |  |  |   }, | 
 |  |  | ]); | 
 |  |  | 
 |  |  | const getList = async () => { | 
 |  |  |   const { code, data } = await ManageApi.getStrandedWireDish({ | 
 |  |  |     wireId: paramsId.value, | 
 |  |  |     type: "盘具", | 
 |  |  |     type: "钢芯", | 
 |  |  |   }); | 
 |  |  |   if (code == 200) { | 
 |  |  |     pagingRef.value.complete(data); |