| | |
| | | label-width="100px" |
| | | placeholder="请输入领用杆号" |
| | | /> |
| | | <wd-input |
| | | <wd-picker |
| | | v-model="newParentData.poleModel" |
| | | label="杆型号" |
| | | label-width="100px" |
| | | placeholder="请输入杆型号" |
| | | :columns="poleModelOptions" |
| | | placeholder="请选择杆型号" |
| | | /> |
| | | <wd-input |
| | | v-model="newParentData.polePackageNumber" |
| | |
| | | const paramsId = ref(); |
| | | const model = ref(); |
| | | const oneLength = ref(); |
| | | const isMonofil = ref(); |
| | | const meterWeight = ref(); |
| | | const totalWeight = ref(); |
| | | |
| | | // 父级数据列表 |
| | | const parentDataList = ref<any[]>([]); |
| | |
| | | |
| | | // 供应商选项 |
| | | const supplierOptions = ref<any[]>([]); |
| | | // 规格型号选项 |
| | | const poleModelOptions = ref<any[]>([]); |
| | | // 父级物料编码 |
| | | const materialCode = ref<string>(""); |
| | | |
| | | // 父级弹框相关 |
| | | const parentDialogVisible = ref(false); |
| | |
| | | const { data } = await WireDetailApi.getWireDetailById({ id }); |
| | | model.value = data.model; |
| | | oneLength.value = data.oneLength; |
| | | await loadPoleModelOptions(); |
| | | } catch (error) { |
| | | console.error("获取详情失败:", error); |
| | | } |
| | | }; |
| | | |
| | | // 加载规格型号列表 |
| | | const loadPoleModelOptions = async () => { |
| | | try { |
| | | const { code, data } = await WireApi.getMaterialByParentCode("003001"); |
| | | if (code == 200 && Array.isArray(data)) { |
| | | poleModelOptions.value = data.map((item: any) => ({ |
| | | label: item.specificationModel || "", |
| | | value: item.specificationModel || "", |
| | | })); |
| | | } |
| | | } catch (error) { |
| | | console.error("加载规格型号列表失败:", error); |
| | | toast.error("加载规格型号列表失败"); |
| | | } |
| | | }; |
| | | |
| | |
| | | } |
| | | |
| | | // 跳转到报工管理页面 |
| | | const isMonofilParam = isMonofil.value !== undefined && isMonofil.value !== null ? isMonofil.value : ""; |
| | | const meterWeightParam = meterWeight.value !== undefined && meterWeight.value !== null ? meterWeight.value : ""; |
| | | const totalWeightParam = totalWeight.value !== undefined && totalWeight.value !== null ? totalWeight.value : ""; |
| | | uni.navigateTo({ |
| | | url: `/pages/production/wire/report/reportManage?wireId=${paramsId.value}&parentId=${parentRow.id}&poleNumber=${parentRow.poleNumber}&poleModel=${parentRow.poleModel}&polePackageNumber=${parentRow.polePackageNumber}&poleWeight=${parentRow.poleWeight}&supplier=${parentRow.supplier || ""}`, |
| | | url: `/pages/production/wire/report/reportManage?wireId=${paramsId.value}&parentId=${parentRow.id}&poleNumber=${parentRow.poleNumber}&poleModel=${parentRow.poleModel}&polePackageNumber=${parentRow.polePackageNumber}&poleWeight=${parentRow.poleWeight}&supplier=${parentRow.supplier || ""}&isMonofil=${isMonofilParam}&meterWeight=${meterWeightParam}&totalWeight=${totalWeightParam}`, |
| | | }); |
| | | }; |
| | | |
| | |
| | | |
| | | onLoad(async (options: any) => { |
| | | paramsId.value = options.id; |
| | | model.value = options.model; |
| | | oneLength.value = options.oneLength; |
| | | isMonofil.value = options.isMonofil; |
| | | meterWeight.value = options.meterWeight; |
| | | totalWeight.value = options.totalWeight; |
| | | await getDetailData(options.id); |
| | | await loadSupplierDict(); |
| | | await getData(); |