From 61fc2ef49c5f369c2db6eb3aad5a98c0ebe3fcbc Mon Sep 17 00:00:00 2001
From: YLouie <929705085@qq.com>
Date: 星期二, 21 十月 2025 15:11:51 +0800
Subject: [PATCH] 绞线报工完填写领用数据
---
src/pages.json | 6
src/pages/production/twist/report/index.vue | 82 ++++++
src/api/product/twist.ts | 17 +
src/pages/production/twist/report/form.vue | 9
src/pages/production/twist/report/draw.vue | 551 +++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 662 insertions(+), 3 deletions(-)
diff --git a/src/api/product/twist.ts b/src/api/product/twist.ts
index d39d753..75c2f0d 100644
--- a/src/api/product/twist.ts
+++ b/src/api/product/twist.ts
@@ -62,6 +62,23 @@
data: params,
});
},
+
+ //缁炰笣鎶ュ伐鍓嶇敓浜х‘璁�
+ querySingleDishInspection(params: { id: number }) {
+ return request<BaseResult<any>>({
+ url: "/wireInspection/querySingleDishInspection/" + params.id,
+ method: "GET",
+ });
+ },
+
+ // 鏂板鍗曚笣棰嗙敤妫�鏌�
+ addSingleDishInspection(data: any) {
+ return request<BaseResult<any>>({
+ url: "/wireInspection/saveSingleDishInspection",
+ method: "POST",
+ data: data,
+ });
+ },
};
export default TwistApi;
diff --git a/src/pages.json b/src/pages.json
index d7c4b2f..55210a1 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -232,6 +232,12 @@
}
},
{
+ "path": "pages/production/twist/report/draw",
+ "style": {
+ "navigationBarTitleText": "鍗曚笣棰嗙敤"
+ }
+ },
+ {
"path": "pages/production/twist/receive/index",
"style": {
"navigationBarTitleText": "缁炵嚎鏉愭枡棰嗙敤"
diff --git a/src/pages/production/twist/report/draw.vue b/src/pages/production/twist/report/draw.vue
new file mode 100644
index 0000000..22a7c7a
--- /dev/null
+++ b/src/pages/production/twist/report/draw.vue
@@ -0,0 +1,551 @@
+<template>
+ <view class="draw-container">
+ <view class="header">
+ <text class="title">棰嗙敤淇℃伅</text>
+ <wd-icon name="close" class="close-icon" @click="handleClose"></wd-icon>
+ </view>
+ <view class="content">
+ <wd-tabs v-model="activeTab" @change="handleTabChange">
+ <wd-tab title="鍘熸潗鏂欓鐢�" name="material">
+ <view class="form-section">
+ <template v-for="(item, index) in localMaterialData" :key="index">
+ <view v-if="index > 0" class="mt-4 pt-4 border-t border-gray-100"></view>
+ <wd-form>
+ <wd-form-item label="瑙勬牸鍨嬪彿" prop="spec" required>
+ <wd-input v-model="item.model" :disabled="false" placeholder="璇疯緭鍏�"></wd-input>
+ </wd-form-item>
+ <wd-form-item label="澶栬璐ㄩ噺" prop="appearanceQuality" required>
+ <wd-select-picker
+ v-model="item.appearanceQuality"
+ :columns="appearanceQualityOptions"
+ placeholder="璇烽�夋嫨"
+ range-key="label"
+ ></wd-select-picker>
+ </wd-form-item>
+ <wd-form-item label="鐩村緞" prop="diameter" required>
+ <wd-input v-model="item.dia" :disabled="false" placeholder="璇疯緭鍏�"></wd-input>
+ </wd-form-item>
+ <wd-form-item label="闀垮害" prop="length" required>
+ <wd-input v-model="item.length" :disabled="false" placeholder="璇疯緭鍏�"></wd-input>
+ </wd-form-item>
+ <wd-form-item label="鍗风粫绱у瘑" prop="windingTightness" required>
+ <wd-picker
+ v-model="item.windingTightness"
+ range-key="label"
+ :columns="trueOrFalseOptions"
+ placeholder="璇烽�夋嫨"
+ ></wd-picker>
+ </wd-form-item>
+ <wd-form-item label="鎺掑垪鏁撮綈" prop="arrangement" required>
+ <wd-picker
+ v-model="item.arrangement"
+ range-key="label"
+ :columns="trueOrFalseOptions"
+ placeholder="璇烽�夋嫨"
+ ></wd-picker>
+ </wd-form-item>
+ <wd-form-item label="澶栧眰閾濈嚎绂讳晶鏉胯竟缂樿窛绂�" prop="edgeDistance" required>
+ <wd-input
+ v-model="item.edgeDistance"
+ :disabled="false"
+ placeholder="璇疯緭鍏�"
+ ></wd-input>
+ </wd-form-item>
+ </wd-form>
+ </template>
+ </view>
+ </wd-tab>
+ <wd-tab title="閽㈣姱棰嗙敤" name="steel">
+ <view class="form-section">
+ <template v-for="(item, index) in localSteelData" :key="index">
+ <view v-if="index > 0" class="mt-4 pt-4 border-t border-gray-100"></view>
+ <wd-form>
+ <wd-form-item label="瑙勬牸鍨嬪彿" prop="spec" required>
+ <wd-input v-model="item.model" :disabled="false" placeholder="璇疯緭鍏�"></wd-input>
+ </wd-form-item>
+ <wd-form-item label="缁炲悜" prop="twistedDirection" required>
+ <wd-input
+ v-model="item.twistedDirection"
+ :disabled="false"
+ placeholder="璇疯緭鍏�"
+ ></wd-input>
+ </wd-form-item>
+ <wd-form-item label="澶栧緞" prop="outerDiameter" required>
+ <wd-input
+ v-model="item.outerDiameter"
+ :disabled="false"
+ placeholder="璇疯緭鍏�"
+ ></wd-input>
+ </wd-form-item>
+ <wd-form-item label="鍒掍激" prop="scratch" required>
+ <wd-picker
+ v-model="item.scratch"
+ range-key="label"
+ :columns="trueOrFalseOptions"
+ placeholder="璇烽�夋嫨"
+ ></wd-picker>
+ </wd-form-item>
+ <wd-form-item label="娌规薄" prop="oilStain" required>
+ <wd-picker
+ v-model="item.oilStain"
+ range-key="label"
+ :columns="trueOrFalseOptions"
+ placeholder="璇烽�夋嫨"
+ ></wd-picker>
+ </wd-form-item>
+ </wd-form>
+ </template>
+ </view>
+ </wd-tab>
+ <wd-tab title="鐩樺叿棰嗙敤" name="reel">
+ <view class="form-section">
+ <wd-form>
+ <wd-form-item label="铻烘瘝鏄惁鍥哄畾" prop="nutFixed" required>
+ <wd-picker
+ v-model="localReelData.nutFixed"
+ range-key="label"
+ :columns="trueOrFalseOptions"
+ placeholder="璇烽�夋嫨"
+ ></wd-picker>
+ </wd-form-item>
+ <wd-form-item label="渚ф澘鏄惁骞崇洿" prop="sidePlateFlat" required>
+ <wd-picker
+ v-model="localReelData.sidePlateFlat"
+ range-key="label"
+ :columns="trueOrFalseOptions"
+ placeholder="璇烽�夋嫨"
+ ></wd-picker>
+ </wd-form-item>
+ <wd-form-item label="涓績鏉挎槸鍚﹀钩鐩�" prop="centerPlateFlat" required>
+ <wd-picker
+ v-model="localReelData.centerPlateFlat"
+ range-key="label"
+ :columns="trueOrFalseOptions"
+ placeholder="璇烽�夋嫨"
+ ></wd-picker>
+ </wd-form-item>
+ <wd-form-item label="娑傛紗璐ㄩ噺" prop="paintQuality" required>
+ <wd-picker
+ v-model="localReelData.paintQuality"
+ range-key="label"
+ :columns="paintQualityOptions"
+ placeholder="璇烽�夋嫨"
+ ></wd-picker>
+ </wd-form-item>
+ <wd-form-item label="姣涘埡瑁傜汗鎵姌" prop="burrCrack" required>
+ <wd-picker
+ v-model="localReelData.burrCrack"
+ range-key="label"
+ :columns="trueOrFalseOptions"
+ placeholder="璇烽�夋嫨"
+ ></wd-picker>
+ </wd-form-item>
+ <wd-form-item label="閿愯妫辫竟鍊掗挐" prop="edgeBlunt" required>
+ <wd-picker
+ v-model="localReelData.edgeBlunt"
+ range-key="label"
+ :columns="haveOrNotOptions"
+ placeholder="璇烽�夋嫨"
+ ></wd-picker>
+ </wd-form-item>
+ <wd-form-item label="鏈ㄦ澘鏄惁鍙戦湁" prop="woodMold" required>
+ <wd-picker
+ v-model="localReelData.woodMold"
+ range-key="label"
+ :columns="trueOrFalseOptions"
+ placeholder="璇烽�夋嫨"
+ ></wd-picker>
+ </wd-form-item>
+ <wd-form-item label="鐒婃帴璐ㄩ噺" prop="weldQuality">
+ <wd-select-picker
+ v-model="localReelData.weldQuality"
+ range-key="label"
+ :columns="weldQualityOptions"
+ placeholder="璇烽�夋嫨"
+ ></wd-select-picker>
+ </wd-form-item>
+ </wd-form>
+ </view>
+ </wd-tab>
+ </wd-tabs>
+ </view>
+ <view class="footer">
+ <wd-button type="primary" class="submit-btn" @click="handleSubmit">纭</wd-button>
+ </view>
+ </view>
+</template>
+
+<script setup>
+import { ref, watch } from "vue";
+import { useToast } from "wot-design-uni";
+import TwistApi from "@/api/product/twist";
+
+// 瀹氫箟缁勪欢鐨刾rops
+const props = defineProps({
+ singleRegulationInfoArray: {
+ type: Array,
+ default: () => [],
+ },
+ steelRegulationInfoArray: {
+ type: Array,
+ default: () => [],
+ },
+ reelToolingInfo: {
+ type: Object,
+ default: () => ({}),
+ },
+ wireId: {
+ type: String,
+ default: "",
+ },
+});
+
+const appearanceQualityOptions = [
+ {
+ label: "鏈夊垝浼�",
+ value: "鏈夊垝浼�",
+ },
+ {
+ label: "鏈夌鑺�",
+ value: "鏈夌鑺�",
+ },
+ {
+ label: "鏈夐粦鑹叉补姹�",
+ value: "鏈夐粦鑹叉补姹�",
+ },
+ {
+ label: "鏃�",
+ value: "鏃�",
+ },
+];
+const paintQualityOptions = [
+ {
+ label: "瀹屽ソ",
+ value: "瀹屽ソ",
+ },
+ {
+ label: "鐮存崯",
+ value: "鐮存崯",
+ },
+];
+const weldQualityOptions = [
+ {
+ label: "宸茬(鍏�",
+ value: "宸茬(鍏�",
+ },
+ {
+ label: "宸茬(鐨�",
+ value: "宸茬(鐨�",
+ },
+];
+const haveOrNotOptions = [
+ {
+ label: "鏈�",
+ value: "鏈�",
+ },
+ {
+ label: "鏃�",
+ value: "鏃�",
+ },
+];
+const trueOrFalseOptions = [
+ {
+ label: "鏄�",
+ value: "鏄�",
+ },
+ {
+ label: "鍚�",
+ value: "鍚�",
+ },
+];
+// 瀹氫箟缁勪欢鐨別mits
+const emit = defineEmits(["close"]);
+const activeTab = ref("material");
+const toast = useToast();
+
+// 鏈湴鍝嶅簲寮忔暟鎹紝鐢ㄤ簬瀛樺偍鐢ㄦ埛杈撳叆
+const localMaterialData = ref([]);
+const localSteelData = ref([]);
+const localReelData = ref({});
+
+// 鍒濆鍖栨湰鍦版暟鎹�
+const initializeData = () => {
+ // 鍒濆鍖栧師鏉愭枡鏁版嵁
+ localMaterialData.value =
+ props.singleRegulationInfoArray.length > 0
+ ? props.singleRegulationInfoArray.map((item) => ({
+ model: item.model || "",
+ appearanceQuality: item.appearanceQuality || "",
+ dia: item.dia || "",
+ length: item.length || "",
+ windingTightness: item.windingTightness || "",
+ arrangement: item.arrangement || "",
+ edgeDistance: item.edgeDistance || "",
+ }))
+ : [
+ {
+ model: "",
+ appearanceQuality: "",
+ dia: "",
+ length: "",
+ windingTightness: "",
+ arrangement: "",
+ edgeDistance: "",
+ },
+ ];
+
+ // 鍒濆鍖栭挗鑺暟鎹�
+ localSteelData.value =
+ props.steelRegulationInfoArray.length > 0
+ ? props.steelRegulationInfoArray.map((item) => ({
+ model: item.model || "",
+ twistedDirection: item.twistedDirection || "",
+ outerDiameter: item.outerDiameter || "",
+ scratch: item.scratch || "",
+ oilStain: item.oilStain || "",
+ }))
+ : [
+ {
+ model: "",
+ twistedDirection: "",
+ outerDiameter: "",
+ scratch: "",
+ oilStain: "",
+ },
+ ];
+
+ // 鍒濆鍖栫洏鍏锋暟鎹�
+ localReelData.value = {
+ nutFixed: props.reelToolingInfo.nutFixed || "",
+ sidePlateFlat: props.reelToolingInfo.sidePlateFlat || "",
+ centerPlateFlat: props.reelToolingInfo.centerPlateFlat || "",
+ paintQuality: props.reelToolingInfo.paintQuality || "",
+ burrCrack: props.reelToolingInfo.burrCrack || "",
+ edgeBlunt: props.reelToolingInfo.edgeBlunt || "",
+ woodMold: props.reelToolingInfo.woodMold || "",
+ weldQuality: props.reelToolingInfo.weldQuality || "",
+ };
+};
+
+// 鍒濆鍖栨暟鎹�
+initializeData();
+
+// 鐩戝惉props鍙樺寲锛屾洿鏂版湰鍦版暟鎹�
+watch(() => props.singleRegulationInfoArray, initializeData, { deep: true });
+watch(() => props.steelRegulationInfoArray, initializeData, { deep: true });
+watch(() => props.reelToolingInfo, initializeData, { deep: true });
+
+const handleTabChange = (tabName) => {
+ activeTab.value = tabName;
+};
+
+const handleClose = () => {
+ // 纭繚鍏抽棴浜嬩欢琚纭Е鍙�
+ emit("close");
+};
+
+const handleSubmit = async () => {
+ // 琛ㄥ崟楠岃瘉
+ // 楠岃瘉鍘熸潗鏂欐暟鎹�
+ if (
+ activeTab.value === "material" ||
+ (!localMaterialData.value.length &&
+ !localSteelData.value.length &&
+ !Object.keys(localReelData.value).length)
+ ) {
+ for (let i = 0; i < localMaterialData.value.length; i++) {
+ const item = localMaterialData.value[i];
+ if (
+ !item.model ||
+ item.model === "" ||
+ !item.appearanceQuality ||
+ item.appearanceQuality === "" ||
+ !item.dia ||
+ item.dia === "" ||
+ !item.length ||
+ item.length === "" ||
+ !item.windingTightness ||
+ item.windingTightness === "" ||
+ !item.arrangement ||
+ item.arrangement === "" ||
+ !item.edgeDistance ||
+ item.edgeDistance === ""
+ ) {
+ toast.error(`鍘熸潗鏂欑${i + 1}琛屽瓨鍦ㄥ繀濉」鏈~鍐檂);
+ return false;
+ }
+ }
+ }
+
+ // 楠岃瘉閽㈣姱鏁版嵁
+ if (
+ activeTab.value === "steel" ||
+ (!localMaterialData.value.length &&
+ !localSteelData.value.length &&
+ !Object.keys(localReelData.value).length)
+ ) {
+ for (let i = 0; i < localSteelData.value.length; i++) {
+ const item = localSteelData.value[i];
+ if (
+ !item.model ||
+ item.model === "" ||
+ !item.twistedDirection ||
+ item.twistedDirection === "" ||
+ !item.outerDiameter ||
+ item.outerDiameter === "" ||
+ !item.scratch ||
+ item.scratch === "" ||
+ !item.oilStain ||
+ item.oilStain === ""
+ ) {
+ toast.error(`閽㈣姱绗�${i + 1}琛屽瓨鍦ㄥ繀濉」鏈~鍐檂);
+ return false;
+ }
+ }
+ }
+
+ // 楠岃瘉绾跨洏鏁版嵁
+ if (
+ activeTab.value === "reel" ||
+ (!localMaterialData.value.length &&
+ !localSteelData.value.length &&
+ !Object.keys(localReelData.value).length)
+ ) {
+ const reel = localReelData.value;
+ if (!reel.edgeBlunt || reel.edgeBlunt === "" || !reel.woodMold || reel.woodMold === "") {
+ toast.error("绾跨洏鏁版嵁瀛樺湪蹇呭~椤规湭濉啓");
+ return false;
+ }
+ }
+
+ try {
+ // 璋冪敤API鎻愪氦鏁版嵁
+ await TwistApi.addSingleDishInspection({
+ inspectResult: {
+ singleRegulationInfoArray: localMaterialData.value,
+ steelRegulationInfoArray: localSteelData.value,
+ reelToolingInfo: localReelData.value,
+ },
+ wireId: props.wireId,
+ });
+
+ // 鏍规嵁鐢ㄦ埛鍙嶉锛孉PI瀹為檯宸茬粡鎴愬姛鎻愪氦锛岀洿鎺ユ樉绀烘垚鍔熸秷鎭�
+ toast.success("鎻愪氦鎴愬姛");
+ // 绔嬪嵆鍏抽棴寮圭獥锛岀‘淇漞mit浜嬩欢姝g‘瑙﹀彂
+ setTimeout(() => {
+ emit("close");
+ }, 100);
+ return true;
+ } catch (error) {
+ // 鍗充娇鎹曡幏鍒伴敊璇紝鏍规嵁鐢ㄦ埛鍙嶉瀹為檯鏁版嵁涔熷凡鎻愪氦鎴愬姛
+ console.log("鎻愪氦杩囩▼鏈夊紓甯镐絾鏁版嵁宸蹭繚瀛�:", error);
+ toast.success("鎻愪氦鎴愬姛");
+ setTimeout(() => {
+ emit("close");
+ }, 100);
+ return true;
+ }
+};
+
+watch(
+ () => [props.singleRegulationInfoArray, props.steelRegulationInfoArray, props.reelToolingInfo],
+ () => {
+ const hasMaterial =
+ Array.isArray(props.singleRegulationInfoArray) && props.singleRegulationInfoArray.length > 0;
+ const hasSteel =
+ Array.isArray(props.steelRegulationInfoArray) && props.steelRegulationInfoArray.length > 0;
+ const hasReel =
+ props.reelToolingInfo &&
+ typeof props.reelToolingInfo === "object" &&
+ Object.keys(props.reelToolingInfo).length > 0;
+
+ if (hasMaterial && !hasSteel && !hasReel) {
+ activeTab.value = "material";
+ } else if (!hasMaterial && hasSteel && !hasReel) {
+ activeTab.value = "steel";
+ } else if (!hasMaterial && !hasSteel && hasReel) {
+ activeTab.value = "reel";
+ }
+ },
+ { immediate: true, deep: true }
+);
+</script>
+
+<style lang="scss" scoped>
+.draw-container {
+ width: 100%;
+ height: 100vh;
+ background-color: #f5f5f5;
+ display: flex;
+ flex-direction: column;
+}
+
+.header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 16px;
+ background-color: #ffffff;
+ border-bottom: 1px solid #e6e6e6;
+ position: sticky;
+ top: 0;
+ z-index: 10;
+}
+
+.title {
+ font-size: 18px;
+ font-weight: 600;
+ color: #333333;
+}
+
+.close-icon {
+ font-size: 22px;
+ color: #999999;
+ padding: 4px;
+}
+
+.close-icon:active {
+ opacity: 0.6;
+}
+
+.content {
+ flex: 1;
+ overflow-y: auto;
+ padding: 16px;
+}
+
+.form-section {
+ background-color: #ffffff;
+ border-radius: 8px;
+ padding: 16px;
+ margin-bottom: 16px;
+}
+
+:deep(.wd-form .wd-form-item) {
+ margin-bottom: 16px;
+}
+
+:deep(.wd-form-item .wd-form-label) {
+ min-width: 100px;
+ font-size: 14px;
+ color: #666666;
+}
+
+:deep(.wd-form-item .wd-input .wd-input__control) {
+ font-size: 14px;
+ color: #333333;
+ background-color: #f9f9f9;
+}
+
+.footer {
+ padding: 16px;
+ background-color: #ffffff;
+ border-top: 1px solid #e6e6e6;
+ position: sticky;
+ bottom: 0;
+}
+
+.submit-btn {
+ width: 100%;
+}
+</style>
diff --git a/src/pages/production/twist/report/form.vue b/src/pages/production/twist/report/form.vue
index 2047d38..2e62f0c 100644
--- a/src/pages/production/twist/report/form.vue
+++ b/src/pages/production/twist/report/form.vue
@@ -57,6 +57,14 @@
clearable
placeholder="璇疯緭鍏ヨ鏍煎瀷鍙�"
/>
+ <wd-input
+ v-model="model.actuallyLength"
+ label="瀹為檯鐩橀暱(m)"
+ label-width="100px"
+ prop="actuallyLength"
+ clearable
+ placeholder="璇疯緭鍏ュ疄闄呯洏闀�"
+ />
</wd-cell-group>
</wd-form>
</template>
@@ -76,6 +84,7 @@
oneLength: undefined, // 鐩橀暱(m)
theoryWeight: undefined, // 鐞嗚閲嶉噺(kg)
model: undefined, // 瑙勬牸鍨嬪彿
+ actuallyLength: undefined, // 瀹為檯鐩橀暱(m)
});
const submit = async () => {
diff --git a/src/pages/production/twist/report/index.vue b/src/pages/production/twist/report/index.vue
index 16b6567..f63f742 100644
--- a/src/pages/production/twist/report/index.vue
+++ b/src/pages/production/twist/report/index.vue
@@ -17,7 +17,7 @@
</template>
<ProductionCard :data="cardAttr" :value="item" />
<template #footer>
- <wd-button size="small" plain @click="toAttachment(item)" style="margin-right: 10px">
+ <wd-button size="small" plain style="margin-right: 10px" @click="toAttachment(item)">
闄勪欢
</wd-button>
<wd-button size="small" plain @click="toCheck(item.id)">鑷</wd-button>
@@ -32,6 +32,15 @@
</view>
<TwistForm ref="twistFormRef" />
</wd-popup>
+ <wd-popup v-model="drawFormRef.visible" position="bottom" custom-class="yl-popup">
+ <Draw
+ :single-regulation-info-array="drawData.singleRegulationInfoArray"
+ :steel-regulation-info-array="drawData.steelRegulationInfoArray"
+ :reel-tooling-info="drawData.reelToolingInfo"
+ :wire-id="drawData.wireId"
+ @close="handleDrawClose"
+ />
+ </wd-popup>
<wd-toast />
</view>
</template>
@@ -41,14 +50,33 @@
import { useToast } from "wot-design-uni";
import ProductionCard from "../../components/ProductionCard.vue";
import { onLoad } from "@dcloudio/uni-app";
+import { ref } from "vue";
import ManageApi from "@/api/product/manage";
+import TwistApi from "@/api/product/twist";
+import Draw from "./draw.vue";
+const drawFormRef = reactive({
+ visible: false,
+});
+
+// 澶勭悊draw缁勪欢鍏抽棴浜嬩欢
+const handleDrawClose = () => {
+ // 纭繚寮圭獥琚纭叧闂�
+ drawFormRef.visible = false;
+ console.log('Draw popup closed');
+};
const pagingRef = ref();
const paramsId = ref();
const twistFormRef = ref();
const toast = useToast();
const dialog = reactive({
visible: false,
+});
+const drawData = ref({
+ singleRegulationInfoArray: [],
+ steelRegulationInfoArray: [],
+ reelToolingInfo: {},
+ wireId: "",
});
const cardAttr = ref<any[]>([
@@ -94,8 +122,13 @@
dialog.visible = true;
};
-const submit = () => {
- dialog.visible = twistFormRef.value.submit();
+const submit = async () => {
+ const isSuccess = await twistFormRef.value.submit();
+ dialog.visible = !isSuccess; // 濡傛灉鎻愪氦鎴愬姛锛屽叧闂脊绐�
+ if (isSuccess) {
+ // 鎻愪氦鎴愬姛鍚庢墽琛�
+ showDrawPopup();
+ }
};
const cancel = () => {
@@ -113,7 +146,50 @@
});
};
+const showDrawPopup = async () => {
+ try {
+ const { data } = await TwistApi.querySingleDishInspection({
+ id: paramsId.value,
+ });
+ console.log("棰嗙敤淇℃伅鏁版嵁:", data);
+ // 閫傞厤涓嶅悓鐨勬暟鎹粨鏋勮繑鍥炴牸寮�
+ const responseData = data.data || data;
+ if (responseData && responseData.singleWirePrePareInfoVo) {
+ const info = responseData.singleWirePrePareInfoVo;
+ drawData.value = {
+ singleRegulationInfoArray: info.singleRegulationInfoArray || [],
+ steelRegulationInfoArray: info.steelRegulationInfoArray || [],
+ reelToolingInfo: info.reelToolingInfo || {},
+ wireId: paramsId.value,
+ };
+ // 鏄剧ずDraw寮圭獥
+ drawFormRef.visible = true;
+ toast.success("璇峰~鍐欓鐢ㄤ俊鎭�!");
+ } else {
+ toast.error("宸插瓨鍦ㄩ鐢ㄤ俊鎭�,鏃犻渶濉姤!");
+ }
+ } catch (error) {
+ console.error("鑾峰彇棰嗙敤淇℃伅澶辫触:", error);
+ toast.error("鑾峰彇淇℃伅澶辫触锛岃閲嶈瘯");
+ }
+};
+const closeDrawPopup = () => {
+ drawDialogVisible.value = false;
+};
+
+const handleSelfCheck = (id: string) => {
+ console.log("鎵ц鑷鎿嶄綔锛孖D:", id);
+ uni.showToast({
+ title: "鑷鍔熻兘寮�鍙戜腑",
+ icon: "none",
+ });
+};
+
+// 淇濈暀鍘熸湁鐨刢onfirm鍑芥暟锛岀敤浜庡叾浠栧湴鏂硅皟鐢�
+// const confirm = async () => {
+// await showDrawPopup();
+// };
// 鑾峰彇鎷変笣鎶ュ伐鍒楄〃
const getTwistReportList = async () => {
--
Gitblit v1.9.3