From ab27e3ac8c7e90fd267bd6c3f0c0e06f25469697 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 23 九月 2025 14:54:07 +0800
Subject: [PATCH] feat: 添加绞线/拉丝报工附件功能
---
src/pages/production/twist/report/index.vue | 53 ++++++++++++++++++++++++++++++-----------------------
1 files changed, 30 insertions(+), 23 deletions(-)
diff --git a/src/pages/production/twist/report/index.vue b/src/pages/production/twist/report/index.vue
index 9c6b5c0..fe8e34b 100644
--- a/src/pages/production/twist/report/index.vue
+++ b/src/pages/production/twist/report/index.vue
@@ -1,23 +1,26 @@
<template>
- <view class="page pt-2">
- <z-paging ref="pagingRef" v-model="twistReportList" class="list" @query="getTwistReportList">
+ <view class="list">
+ <z-paging ref="pagingRef" v-model="twistReportList" :fixed="false" @query="getTwistReportList">
<template #top>
<CardTitle title="鎶ュ伐淇℃伅" :hideAction="true" :full="false" @action="addReport" />
</template>
- <wd-card v-for="(item, index) in twistReportList" type="rectangle" custom-class="round">
+ <wd-card v-for="item in twistReportList" :key="item.id" type="rectangle" custom-class="round">
<template #title>
<view class="flex justify-between">
<view>
<wd-icon name="user" color="#0D867F"></wd-icon>
<text class="text-[#0D867F] ml-2 font-medium">鐢熶骇浜�</text>
- <text class="text-[#333333] ml-2">鏂瑰厗鐜�</text>
+ <text class="text-[#333333] ml-2">{{ item.productUser }}</text>
</view>
<view class="text-[#A8A8A8]" @click="toEdit">缂栬緫</view>
</view>
</template>
<ProductionCard :data="cardAttr" :value="item" />
<template #footer>
- <wd-button size="small" plain @click="toCheck">鑷</wd-button>
+ <wd-button size="small" plain @click="toAttachment(item.id)" style="margin-right: 10px">
+ 闄勪欢
+ </wd-button>
+ <wd-button size="small" plain @click="toCheck(item.id)">鑷</wd-button>
</template>
</wd-card>
</z-paging>
@@ -27,7 +30,7 @@
<wd-button type="text" @click="cancel">鍙栨秷</wd-button>
<wd-button type="text" @click="submit">纭畾</wd-button>
</view>
- <TwistForm />
+ <TwistForm ref="twistFormRef" />
</wd-popup>
<wd-toast />
</view>
@@ -42,6 +45,7 @@
const pagingRef = ref();
const paramsId = ref();
+const twistFormRef = ref();
const toast = useToast();
const dialog = reactive({
visible: false,
@@ -61,20 +65,20 @@
prop: "monofilamentNumber",
},
{
- label: "瑙勬牸鍨嬪彿",
- prop: "model",
+ label: "瀹為檯閲嶉噺(kg)",
+ prop: "actuallyWeight",
},
{
label: "鐩橀暱(m)",
- prop: "ontLength",
+ prop: "oneLength",
},
{
label: "鐞嗚閲嶉噺(kg)",
prop: "theoryWeight",
},
{
- label: "瀹為檯閲嶉噺(kg)",
- prop: "actuallyWeight",
+ label: "瑙勬牸鍨嬪彿",
+ prop: "model",
},
]);
@@ -91,8 +95,7 @@
};
const submit = () => {
- toast.show("鎻愪氦");
- dialog.visible = false;
+ dialog.visible = twistFormRef.value.submit();
};
const cancel = () => {
@@ -100,9 +103,15 @@
dialog.visible = false;
};
-const toCheck = () => {
+const toAttachment = (id: number) => {
uni.navigateTo({
- url: "/pages/production/twist/selfInspect/index",
+ url: `/pages/production/twist/attachment/index?reportId=${id}`,
+ });
+};
+
+const toCheck = (id: number) => {
+ uni.navigateTo({
+ url: `/pages/production/twist/selfInspect/index?id=${id}`,
});
};
@@ -121,16 +130,14 @@
</script>
<style lang="scss" scoped>
-.page {
+.list {
+ height: calc(100vh - 80px);
+ padding: 12px;
background: #f3f9f8;
- .list {
- margin: 12px;
-
- :deep() {
- .round {
- border-radius: 4px;
- }
+ :deep() {
+ .round {
+ border-radius: 4px;
}
}
}
--
Gitblit v1.9.3