| | |
| | | unAmount: 'unAmount', |
| | | poleModel: 'poleModel', |
| | | contractNo: 'contractNo', |
| | | isMonofil: 'isMonofil', |
| | | totalWeight: 'totalWeight', |
| | | }" |
| | | /> |
| | | <view class="mx-3"> |
| | |
| | | oneLength: undefined, |
| | | poleModel: undefined, |
| | | contractNo: undefined, |
| | | isMonofil: undefined, |
| | | totalWeight: undefined, |
| | | meterWeight: undefined, |
| | | type: "拉丝", |
| | | }); |
| | | const detailData = ref<any>({}); |
| | | |
| | | const getDetailData = async (id: string) => { |
| | | const { data } = await WireApi.getWireDetailById({ |
| | | id: id, |
| | | }); |
| | | detailData.value = data; |
| | | cardData.deviceModel = data.deviceModel; |
| | | cardData.model = data.model; |
| | | cardData.systemNo = data.systemNo; |
| | |
| | | cardData.oneLength = data.oneLength; |
| | | cardData.poleModel = data.poleModel; |
| | | cardData.contractNo = data.contractNo; |
| | | cardData.isMonofil = data.isMonofil; |
| | | cardData.totalWeight = data.totalWeight; |
| | | cardData.meterWeight = data.meterWeight; |
| | | cardData.type = data.type || "拉丝"; |
| | | }; |
| | | |
| | |
| | | }; |
| | | |
| | | // 处理报工点击 |
| | | const handleReportClick = () => { |
| | | const handleReportClick = async () => { |
| | | // 先请求验证变更接口 |
| | | try { |
| | | const { code } = await WireApi.verifyChanges({ projectId: detailData.value.projectId }); |
| | | if (code !== 200) { |
| | | return; |
| | | } |
| | | } catch (error) { |
| | | console.error("验证变更失败:", error); |
| | | return; |
| | | } |
| | | |
| | | const prepareId = getPrepareId(); |
| | | console.log("拉丝表格报工检查 - prepareId值:", prepareId); |
| | | |
| | |
| | | } |
| | | |
| | | // 如果有 prepareId,正常跳转 |
| | | const isMonofil = |
| | | cardData.isMonofil !== undefined && cardData.isMonofil !== null ? cardData.isMonofil : ""; |
| | | const meterWeight = |
| | | cardData.meterWeight !== undefined && cardData.meterWeight !== null ? cardData.meterWeight : ""; |
| | | const totalWeight = |
| | | cardData.totalWeight !== undefined && cardData.totalWeight !== null ? cardData.totalWeight : ""; |
| | | uni.navigateTo({ |
| | | url: `/pages/production/wire/report/wire?id=${paramsId.value}&model=${cardData.model}&oneLength=${cardData.oneLength}`, |
| | | url: `/pages/production/wire/report/wire?id=${paramsId.value}&model=${cardData.model}&oneLength=${cardData.oneLength}&isMonofil=${isMonofil}&meterWeight=${meterWeight}&totalWeight=${totalWeight}`, |
| | | }); |
| | | }; |
| | | |