From 912b764830b165ff3b92267570ea43ef9dad58bf Mon Sep 17 00:00:00 2001 From: 曹睿 <360930172@qq.com> Date: 星期五, 18 四月 2025 14:25:03 +0800 Subject: [PATCH] feat: 拉丝 --- src/pages/production/twist/selfInspect/form.vue | 66 ++ src/pages.json | 92 ++ src/pages/production/wire/receive/edit.vue | 0 src/pages/production/wire/selfInspect/index.vue | 98 +++ src/pages/production/twist/receive/monofil.vue | 61 + src/pages/production/detail/wireDetail.vue | 18 src/pages/production/twist/report/form.vue | 104 +++ src/pages/production/twist/receive/plate/form.vue | 48 + src/pages/production/twist/backman/index.vue | 108 +++ src/pages/production/twist/components/MonofilCard.vue | 35 + src/pages/production/wire/receive/form.vue | 0 src/pages/production/wire/selfInspect/form.vue | 66 ++ src/pages/production/twist/receive/plate/edit.vue | 29 src/pages/production/wire/selfInspect/edit.vue | 31 + src/pages/production/twist/report/index.vue | 123 +++ src/pages/production/wire/backman/edit.vue | 31 + src/pages/production/components/ProductionCard.vue | 6 src/pages/production/twist/backman/form.vue | 66 ++ src/pages/production/twist/selfInspect/index.vue | 98 +++ src/pages/production/wire/backman/form.vue | 66 ++ src/pages/production/twist/backman/edit.vue | 31 + src/pages/production/twist/report/edit.vue | 29 src/pages/production/twist/selfInspect/edit.vue | 31 + src/pages/production/wire/report/wire.vue | 0 src/pages/production/twist/receive/plate/index.vue | 92 ++ src/pages/production/twist/receive/index.vue | 34 + src/components/scan/index.vue | 89 ++ src/pages/production/wire/backman/index.vue | 108 +++ src/pages/production/wire/report/wireEdit.vue | 0 src/pages/production/twist/receive/steelCore/edit.vue | 29 src/pages/production/wire/receive/index.vue | 0 src/components/card-title/index.vue | 1 src/pages/production/wire/report/wireForm.vue | 0 src/pages/production/detail/twistDetail.vue | 39 + src/pages/production/index.vue | 16 src/pages/production/twist/receive/steelCore/index.vue | 105 +++ src/pages/production/twist/receive/steelCore/form.vue | 68 ++ 37 files changed, 1,802 insertions(+), 16 deletions(-) diff --git a/src/components/card-title/index.vue b/src/components/card-title/index.vue index 2430b16..b18d1d4 100644 --- a/src/components/card-title/index.vue +++ b/src/components/card-title/index.vue @@ -8,6 +8,7 @@ 鏂板 </wd-button> </view> + <slot v-else name="action"></slot> </view> </template> <script setup lang="ts"> diff --git a/src/components/scan/index.vue b/src/components/scan/index.vue new file mode 100644 index 0000000..f9b96c4 --- /dev/null +++ b/src/components/scan/index.vue @@ -0,0 +1,89 @@ +<template> + <view> + <view class="content"></view> + </view> +</template> +<!-- 婵�鍏夋壂鐮侊紝骞挎挱妯″紡 --> +<script> +var main, receiver, filter; +var codeQueryTag = false; +export default { + data() { + return { + scanCode: "", + }; + }, + created() { + // 鍒濆鍖� + this.initScan(); + // 鍚姩骞挎挱 + this.startScan(); + }, + onHide() { + // 缁撴潫骞挎挱 + this.stopScan(); + }, + destroyed() { + // 缁撴潫骞挎挱 + this.stopScan(); + }, + methods: { + // 鍒濆鍖� + initScan() { + // #ifdef APP + // console.log('initScan:鎵爜鍒濆鍖�'); + let that = this; + main = plus.android.runtimeMainActivity(); //鑾峰彇activity + //var context = plus.android.importClass('android.content.Context'); //涓婁笅鏂� + var IntentFilter = plus.android.importClass("android.content.IntentFilter"); + filter = new IntentFilter(); + //涓嬮潰鐨刟ddAction 鏀逛负鑷繁 pad 璁惧鐨勫箍鎾姩浣滐紙鍦ㄦ壂鎻忚缃垨鑰呭巶鍟嗛檮甯︾殑app 閲岄潰璁剧疆涓哄箍鎾ā寮忥紝鐒跺悗鏌ョ湅鐩稿簲鍙傛暟锛� + filter.addAction("com.dwexample.ACTION"); + receiver = plus.android.implements("io.dcloud.feature.internal.reflect.BroadcastReceiver", { + onReceive: (context, intent) => { + console.log("---onReceive锛�", context, intent); + plus.android.importClass(intent); + //涓嬮潰鐨刧etStringExtra鍐呮敼涓鸿嚜宸辩殑骞挎挱鏍囩锛堥敭鍊�/key锛夛細 data + //鏂戦┈ TC20 + var banMaSacanInfo = intent.getStringExtra( + "com.motorolasolutions.emdk.datawedge.data_string" + ); // callback(intent.getStringExtra('com.motorolasolutions.emdk.datawedge.data_string')); + console.log("鏂戦┈鎵弿缁撴灉", banMaSacanInfo); + // 浼犲叆鎺ユ敹鍒扮殑鍙傛暟 + that.queryCode(banMaSacanInfo); + }, + }); + // #endif + }, + // 寮�鍚箍鎾� + startScan() { + // #ifdef APP + console.log("startScan,寮�鍚箍鎾帴鏀�"); + main.registerReceiver(receiver, filter); + // #endif + }, + // 鍏抽棴骞挎挱 + stopScan() { + // #ifdef APP + console.log("stopScan缁撴潫"); + main.unregisterReceiver(receiver); + // #endif + }, + // 閬垮厤閲嶅鎵爜 + queryCode: function (code) { + // #ifdef APP + if (codeQueryTag) return false; + codeQueryTag = true; + setTimeout(function () { + codeQueryTag = false; + }, 150); + // console.log('-****--鎵爜code锛� ', code); + let data = code; + uni.$emit("scan", { + code: data, + }); + // #endif + }, + }, +}; +</script> diff --git a/src/pages.json b/src/pages.json index 7f13996..3f0035e 100644 --- a/src/pages.json +++ b/src/pages.json @@ -153,29 +153,113 @@ "navigationBarTitleText": "鎷変笣璇︽儏" } }, + { + "path": "pages/production/detail/twistDetail", + "style": { + "navigationBarTitleText": "缁炵嚎璇︽儏" + } + }, { - "path": "pages/production/report/wire", + "path": "pages/production/wire/report/wire", "style": { "navigationBarTitleText": "鎷変笣鎶ュ伐" } }, { - "path": "pages/production/report/wireEdit", + "path": "pages/production/wire/report/wireEdit", "style": { "navigationBarTitleText": "鎶ュ伐涓婃姤" } }, { - "path": "pages/production/receive/index", + "path": "pages/production/wire/receive/index", "style": { "navigationBarTitleText": "鎷変笣棰嗙敤" } }, { - "path": "pages/production/receive/edit", + "path": "pages/production/wire/receive/edit", "style": { "navigationBarTitleText": "缂栬緫鎷変笣棰嗙敤" } + }, + { + "path": "pages/production/wire/selfInspect/index", + "style": { + "navigationBarTitleText": "鎷変笣鑷" + } + }, + { + "path": "pages/production/wire/selfInspect/edit", + "style": { + "navigationBarTitleText": "缂栬緫鎷変笣鑷" + } + }, + { + "path": "pages/production/wire/backman/index", + "style": { + "navigationBarTitleText": "鏉傚伐" + } + }, + { + "path": "pages/production/wire/backman/edit", + "style": { + "navigationBarTitleText": "缂栬緫鏉傚伐" + } + }, + { + "path": "pages/production/twist/report/index", + "style": { + "navigationBarTitleText": "缁炵嚎鎶ュ伐" + } + }, + { + "path": "pages/production/twist/report/edit", + "style": { + "navigationBarTitleText": "缁炵嚎鎶ュ伐涓婃姤" + } + }, + { + "path": "pages/production/twist/receive/index", + "style": { + "navigationBarTitleText": "缁炵嚎鏉愭枡棰嗙敤" + } + }, + { + "path": "pages/production/twist/receive/plate/edit", + "style": { + "navigationBarTitleText": "缁炵嚎鐩樺叿缂栬緫" + } + }, + { + "path": "pages/production/twist/receive/steelCore/edit", + "style": { + "navigationBarTitleText": "缁炵嚎閽㈣姱缂栬緫" + } + }, + { + "path": "pages/production/twist/selfInspect/index", + "style": { + "navigationBarTitleText": "缁炵嚎鑷" + } + }, + { + "path": "pages/production/twist/selfInspect/edit", + "style": { + "navigationBarTitleText": "缁炵嚎鑷缂栬緫" + } + }, + { + "path": "pages/production/twist/backman/index", + "style": { + "navigationBarTitleText": "缁炵嚎鏉傚伐" + } + }, + { + "path": "pages/production/twist/backman/edit", + "style": { + "navigationBarTitleText": "缁炵嚎鏉傚伐缂栬緫" + } } ], "globalStyle": { diff --git a/src/pages/production/components/ProductionCard.vue b/src/pages/production/components/ProductionCard.vue index b63f378..d89a77d 100644 --- a/src/pages/production/components/ProductionCard.vue +++ b/src/pages/production/components/ProductionCard.vue @@ -1,9 +1,9 @@ <template> <wd-row> - <wd-col v-for="(item, index) in data" :key="index" :span="12" class="my-1"> - <view class="flex justify-between pr-1"> + <wd-col v-for="(item, index) in data" :key="index" :span="item.span ?? 12" class="my-1"> + <view class="flex justify-between pr-1 w-full h-[20px]"> <view class="text-[#646874]">{{ item.label }}</view> - <view class="font-medium" :style="{ color: color }">{{ item.value }}</view> + <view class="font-medium" :style="{ color: item.color ?? color }">{{ item.value }}</view> </view> </wd-col> </wd-row> diff --git a/src/pages/production/detail/twistDetail.vue b/src/pages/production/detail/twistDetail.vue new file mode 100644 index 0000000..936e58e --- /dev/null +++ b/src/pages/production/detail/twistDetail.vue @@ -0,0 +1,39 @@ +<template> + <view> + <ProductCard /> + <view class="mx-3"> + <wd-grid class="rounded-lg" clickable> + <wd-grid-item + icon="computer" + link-type="navigateTo" + url="/pages/production/twist/report/index" + text="鎶ュ伐" + /> + <wd-grid-item + icon="chart" + text="鑷" + link-type="navigateTo" + url="/pages/production/twist/selfInspect/index" + /> + <wd-grid-item + icon="tips" + link-type="navigateTo" + url="/pages/production/twist/backman/index" + text="鏉傚伐" + /> + <wd-grid-item + icon="wallet" + link-type="navigateTo" + url="/pages/production/twist/receive/index" + text="鏉愭枡棰嗙敤" + /> + </wd-grid> + </view> + </view> +</template> + +<script lang="ts" setup> +import ProductCard from "@/components/product_card/index.vue"; +</script> + +<style lang="scss" scoped></style> diff --git a/src/pages/production/detail/wireDetail.vue b/src/pages/production/detail/wireDetail.vue index 5e4276c..e86b48a 100644 --- a/src/pages/production/detail/wireDetail.vue +++ b/src/pages/production/detail/wireDetail.vue @@ -6,15 +6,25 @@ <wd-grid-item icon="computer" link-type="navigateTo" - url="/pages/production/report/wire" + url="/pages/production/wire/report/wire" text="鎶ュ伐" /> - <wd-grid-item icon="chart" text="鑷" /> - <wd-grid-item icon="tips" text="鏉傚伐" /> + <wd-grid-item + icon="chart" + text="鑷" + link-type="navigateTo" + url="/pages/production/wire/selfInspect/index" + /> + <wd-grid-item + icon="tips" + link-type="navigateTo" + url="/pages/production/wire/backman/index" + text="鏉傚伐" + /> <wd-grid-item icon="wallet" link-type="navigateTo" - url="/pages/production/receive/index" + url="/pages/production/wire/receive/index" text="鏉愭枡棰嗙敤" /> </wd-grid> diff --git a/src/pages/production/index.vue b/src/pages/production/index.vue index d82c8d7..cc33983 100644 --- a/src/pages/production/index.vue +++ b/src/pages/production/index.vue @@ -15,7 +15,7 @@ <wd-tab :title="item.label"> <view class="card_box"> <Statistics class="statistics_box" /> - <ProductCard v-for="item in 10" @click="toDetail" /> + <ProductCard v-for="(item, index) in 10" @click="toDetail(index)" /> <wd-loadmore custom-class="loadmore" state="loading" /> </view> </wd-tab> @@ -38,10 +38,16 @@ }, ]); -const toDetail = () => { - uni.navigateTo({ - url: "/pages/production/detail/wireDetail", - }); +const toDetail = (type: number) => { + if (Math.floor(type) % 2 === 0) { + uni.navigateTo({ + url: "/pages/production/detail/wireDetail", + }); + } else { + uni.navigateTo({ + url: "/pages/production/detail/twistDetail", + }); + } }; </script> diff --git a/src/pages/production/twist/backman/edit.vue b/src/pages/production/twist/backman/edit.vue new file mode 100644 index 0000000..c9ebfec --- /dev/null +++ b/src/pages/production/twist/backman/edit.vue @@ -0,0 +1,31 @@ +<template> + <view> + <CardTitle title="缂栬緫鑷" :hideAction="false" /> + <BackmanForm class="mx-4" /> + <view class="footer"> + <wd-button + class="submit_btn" + type="primary" + size="large" + block + :round="false" + @click="handleSubmit" + > + 淇濆瓨 + </wd-button> + </view> + </view> +</template> + +<script setup lang="ts"> +import CardTitle from "@/components/card-title/index.vue"; +import BackmanForm from "./form.vue"; + +const handleSubmit = () => {}; +</script> + +<style lang="scss" scoped> +.footer { + margin: 20px 16px 0 16px; +} +</style> diff --git a/src/pages/production/twist/backman/form.vue b/src/pages/production/twist/backman/form.vue new file mode 100644 index 0000000..e4cf542 --- /dev/null +++ b/src/pages/production/twist/backman/form.vue @@ -0,0 +1,66 @@ +<template> + <wd-form ref="form" :model="model" class="relative form_box"> + <wd-cell-group :border="true"> + <wd-input + v-model="model.workbench" + label="鏉傚伐鍚嶇О" + label-width="100px" + prop="workbench" + clearable + placeholder="璇疯緭鍏ユ潅宸ュ悕绉�" + /> + <wd-input + v-model="model.poleNo" + label="鏉嗗彿" + label-width="100px" + prop="poleNo" + clearable + placeholder="璇疯緭鍏ユ潌鍙�" + /> + <wd-input + v-model="model.unit" + label="鍗曚綅" + label-width="100px" + prop="unit" + clearable + placeholder="璇疯緭鍏ュ崟浣�" + /> + <wd-input + v-model="model.poleWeight" + label="鏉嗛噸" + label-width="100px" + prop="poleWeight" + clearable + placeholder="璇疯緭鍏ユ潌閲�" + /> + <wd-input + v-model="model.useWeight" + label="浣跨敤閲嶉噺" + label-width="100px" + prop="useWeight" + clearable + placeholder="璇疯緭鍏ヤ娇鐢ㄩ噸閲�" + /> + </wd-cell-group> + </wd-form> +</template> + +<script setup lang="ts"> +import useFormData from "@/hooks/useFormData"; +const { form: model } = useFormData({ + backmanName: undefined, // 鏉傚伐鍚嶇О + unit: undefined, // 鍗曚綅 + num: undefined, // 鏁伴噺 + caller: undefined, // 鎶ュ伐浜� + callerDate: undefined, // 鎶ュ伐鏃ユ湡 +}); +</script> +<style lang="scss" scoped> +.form_box { +} +.submit_btn { + position: absolute; + bottom: 0; + width: 100%; +} +</style> diff --git a/src/pages/production/twist/backman/index.vue b/src/pages/production/twist/backman/index.vue new file mode 100644 index 0000000..2ba997f --- /dev/null +++ b/src/pages/production/twist/backman/index.vue @@ -0,0 +1,108 @@ +<template> + <view class="page pt-2"> + <CardTitle title="缁炵嚎鏉傚伐淇℃伅" :hideAction="true" @action="addReport" /> + <view class="list"> + <wd-card type="rectangle" custom-class="round"> + <template #title> + <view class="flex justify-between"> + <view> + <wd-icon name="a-rootlist" color="#0D867F"></wd-icon> + <text class="text-[#252525] ml-2 font-medium">鏉傚伐椤圭洰鍚嶇О</text> + </view> + <view class="text-[#A8A8A8]" @click="toEdit">缂栬緫</view> + </view> + </template> + <ProductionCard :data="cardAttr" color="#0D867F" /> + </wd-card> + </view> + <wd-popup v-model="dialog.visible" position="bottom" custom-class="yl-popup"> + <view class="action px-3"> + <wd-button type="text" @click="cancel">鍙栨秷</wd-button> + <wd-button type="text" @click="submit">纭畾</wd-button> + </view> + <BackmanForm /> + </wd-popup> + <wd-toast /> + </view> +</template> + +<script setup lang="ts"> +import CardTitle from "@/components/card-title/index.vue"; +import ProductionCard from "../../components/ProductionCard.vue"; +import { useToast } from "wot-design-uni"; +import BackmanForm from "./form.vue"; + +const toast = useToast(); +const dialog = reactive({ + visible: false, +}); + +const cardAttr = ref<any[]>([ + { + label: "鍗曚綅", + value: "n惟路m", + }, + { + label: "瀹氶", + value: "1246", + }, + { + label: "鏁伴噺", + value: "4", + }, + { + label: "閲戦", + value: "鏌ョ湅", + }, + { + label: "鎶ュ伐浜�", + value: "闆疯繘瀹�", + }, + { + label: "鏃ユ湡", + value: "2022-05-17", + }, +]); + +const toEdit = () => { + uni.navigateTo({ + url: "/pages/production/twist/backman/edit", + }); +}; + +const addReport = () => { + dialog.visible = true; +}; + +const submit = () => { + toast.show("鎻愪氦"); + dialog.visible = false; +}; + +const cancel = () => { + toast.show("鍙栨秷"); + dialog.visible = false; +}; +</script> + +<style lang="scss" scoped> +.page { + background: #f3f9f8; + .list { + height: calc(100vh - 120px); + margin: 12px; + overflow: scroll; + + :deep() { + .round { + border-radius: 4px; + } + } + } +} + +.action { + display: flex; + justify-content: space-between; +} +</style> diff --git a/src/pages/production/twist/components/MonofilCard.vue b/src/pages/production/twist/components/MonofilCard.vue new file mode 100644 index 0000000..329d7f5 --- /dev/null +++ b/src/pages/production/twist/components/MonofilCard.vue @@ -0,0 +1,35 @@ +<template> + <wd-card> + <wd-form :model="model"> + <wd-cell-group :border="true"> + <wd-input + v-model="model.no" + label="鍗曚笣缂栧彿" + label-width="100px" + prop="no" + clearable + placeholder="璇疯緭鍏ュ崟涓濈紪鍙�" + /> + <wd-input + v-model="model.length" + label="闀垮害" + label-width="100px" + prop="length" + clearable + placeholder="璇疯緭鍏ラ暱搴�" + /> + </wd-cell-group> + </wd-form> + </wd-card> +</template> + +<script setup lang="ts"> +import useFormData from "@/hooks/useFormData"; + +const { form: model } = useFormData({ + no: undefined, + length: undefined, +}); +</script> + +<style lang="scss" scoped></style> diff --git a/src/pages/production/twist/receive/index.vue b/src/pages/production/twist/receive/index.vue new file mode 100644 index 0000000..277e46e --- /dev/null +++ b/src/pages/production/twist/receive/index.vue @@ -0,0 +1,34 @@ +<template> + <wd-tabs v-model="tab" auto-line-width> + <wd-tab title="鍗曚笣棰嗙敤" name="鍗曚笣棰嗙敤"> + <Monofil /> + </wd-tab> + <wd-tab title="鐩樺叿棰嗙敤" name="鐩樺叿棰嗙敤"> + <view class="content"> + <Plate /> + </view> + </wd-tab> + <wd-tab title="閽㈣姱棰嗙敤" name="閽㈣姱棰嗙敤"> + <view class="content"> + <SteelCore /> + </view> + </wd-tab> + </wd-tabs> +</template> + +<script setup lang="ts"> +import Monofil from "./monofil.vue"; +import Plate from "./plate/index.vue"; +import SteelCore from "./steelCore/index.vue"; + +const tab = ref("鍗曚笣棰嗙敤"); +</script> + +<style lang="scss" scoped> +::v-deep .wd-tabs__line { + background: #0d867f; +} +::v-deep .wd-tabs__nav { + border-bottom: 1px #dddddd solid; +} +</style> diff --git a/src/pages/production/twist/receive/monofil.vue b/src/pages/production/twist/receive/monofil.vue new file mode 100644 index 0000000..80d234f --- /dev/null +++ b/src/pages/production/twist/receive/monofil.vue @@ -0,0 +1,61 @@ +<template> + <view class="page"> + <CardTitle title="鍗曚笣棰嗙敤" :hideAction="false"> + <template #action> + <wd-button type="icon" icon="scan" color="#0D867F" @click="scanCode"></wd-button> + </template> + </CardTitle> + <view class="list_box"> + <MonofilCard v-for="(item, index) in 4" :key="index" /> + </view> + <scan /> + </view> +</template> + +<script setup lang="ts"> +import CardTitle from "@/components/card-title/index.vue"; +import MonofilCard from "../components/MonofilCard.vue"; +import scan from "@/components/scan/index.vue"; +import { onLoad, onUnload } from "@dcloudio/uni-app"; + +const cardList = ref<any[]>([]); + +const BroadcastScanningToObtainData = (res: any) => { + console.log("鑾峰彇娆℃暟", res.code); + let barcode = res.code; + console.log("鎵撳嵃鏁版嵁", barcode); +}; + +const scanCode = () => { + uni.scanCode({ + onlyFromCamera: true, + success: (res) => { + console.log("鏉$爜绫诲瀷锛�" + res.scanType); + console.log("鏉$爜鍐呭锛�" + res.result); + cardList.value.push(res.result); + }, + }); +}; + +onLoad(() => { + // 寮�鍚箍鎾洃鍚簨浠� + uni.$on("scan", BroadcastScanningToObtainData); +}); +onUnload(() => { + // 寮�鍚箍鎾洃鍚簨浠� + uni.$off("scan", BroadcastScanningToObtainData); +}); +</script> + +<style lang="scss" scoped> +.page { + background: #f3f9f8; + .list_box { + height: calc(100% - 100px); + overflow: scroll; + } +} +:deep(.wd-button__content) { + color: #0d867f; +} +</style> diff --git a/src/pages/production/twist/receive/plate/edit.vue b/src/pages/production/twist/receive/plate/edit.vue new file mode 100644 index 0000000..da1ad01 --- /dev/null +++ b/src/pages/production/twist/receive/plate/edit.vue @@ -0,0 +1,29 @@ +<template> + <view> + <CardTitle title="缁炵嚎鐩樺叿棰嗙敤" :hideAction="false" /> + <PlateForm class="mx-4" /> + <view class="footer"> + <wd-button + class="submit_btn" + type="primary" + size="large" + block + :round="false" + @click="handleSubmit" + > + 淇濆瓨 + </wd-button> + </view> + </view> +</template> +<script lang="ts" setup> +import CardTitle from "@/components/card-title/index.vue"; +import PlateForm from "./form.vue"; + +const handleSubmit = () => {}; +</script> +<style lang="scss" scoped> +.footer { + margin: 20px 16px 0 16px; +} +</style> diff --git a/src/pages/production/twist/receive/plate/form.vue b/src/pages/production/twist/receive/plate/form.vue new file mode 100644 index 0000000..950e5e1 --- /dev/null +++ b/src/pages/production/twist/receive/plate/form.vue @@ -0,0 +1,48 @@ +<template> + <wd-form ref="form" :model="model" class="relative form_box"> + <wd-cell-group :border="true"> + <wd-input + v-model="model.plateType" + label="鐩樺叿绫诲瀷" + label-width="100px" + prop="plateType" + clearable + placeholder="璇疯緭鍏ョ洏鍏风被鍨�" + /> + <wd-input + v-model="model.length" + label="灏哄" + label-width="100px" + prop="length" + clearable + placeholder="璇疯緭鍏ュ昂瀵�" + /> + <wd-input + v-model="model.weigth" + label="閲嶉噺" + label-width="100px" + prop="weigth" + clearable + placeholder="璇疯緭鍏ラ噸閲�" + /> + </wd-cell-group> + </wd-form> +</template> + +<script setup lang="ts"> +import useFormData from "@/hooks/useFormData"; +const { form: model } = useFormData({ + plateType: undefined, // 鐩樺叿绫诲瀷 + length: undefined, // 灏哄 + weigth: undefined, // 閲嶉噺 +}); +</script> +<style lang="scss" scoped> +.form_box { +} +.submit_btn { + position: absolute; + bottom: 0; + width: 100%; +} +</style> diff --git a/src/pages/production/twist/receive/plate/index.vue b/src/pages/production/twist/receive/plate/index.vue new file mode 100644 index 0000000..26dc6e2 --- /dev/null +++ b/src/pages/production/twist/receive/plate/index.vue @@ -0,0 +1,92 @@ +<template> + <view class="page pt-2"> + <CardTitle title="鐩樺叿棰嗙敤" :hideAction="true" @action="addReport" /> + <view class="list"> + <wd-card v-for="(item, index) in 2" :key="index" type="rectangle" custom-class="round"> + <template #title> + <view class="flex justify-between"> + <view> + <wd-icon name="a-rootlist" color="#0D867F"></wd-icon> + <text class="text-[#252525] ml-2 font-medium">閾佹湪鐩�</text> + </view> + <view class="text-[#A8A8A8]" @click="toEdit">缂栬緫</view> + </view> + </template> + <ProductionCard :data="cardAttr" color="#0D867F" /> + </wd-card> + </view> + <wd-popup v-model="dialog.visible" position="bottom" custom-class="yl-popup"> + <view class="action px-3"> + <wd-button type="text" @click="cancel">鍙栨秷</wd-button> + <wd-button type="text" @click="submit">纭畾</wd-button> + </view> + <PlateForm /> + </wd-popup> + <wd-toast /> + </view> +</template> + +<script setup lang="ts"> +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"; + +const toast = useToast(); +const dialog = reactive({ + visible: false, +}); + +const cardAttr = ref<any[]>([ + { + label: "灏哄", + value: "10m", + }, + { + label: "閲嶉噺", + value: "46kg", + }, +]); + +const toEdit = () => { + uni.navigateTo({ + url: "/pages/production/twist/receive/plate/edit", + }); +}; + +const addReport = () => { + dialog.visible = true; +}; + +const submit = () => { + toast.show("鎻愪氦"); + dialog.visible = false; +}; + +const cancel = () => { + toast.show("鍙栨秷"); + dialog.visible = false; +}; +</script> + +<style lang="scss" scoped> +.page { + background: #f3f9f8; + .list { + height: calc(100vh - 120px); + margin: 12px; + overflow: scroll; + + :deep() { + .round { + border-radius: 4px; + } + } + } +} + +.action { + display: flex; + justify-content: space-between; +} +</style> diff --git a/src/pages/production/twist/receive/steelCore/edit.vue b/src/pages/production/twist/receive/steelCore/edit.vue new file mode 100644 index 0000000..269154d --- /dev/null +++ b/src/pages/production/twist/receive/steelCore/edit.vue @@ -0,0 +1,29 @@ +<template> + <view> + <CardTitle title="缁炵嚎鐩樺叿棰嗙敤" :hideAction="false" /> + <SteelCoreForm class="mx-4" /> + <view class="footer"> + <wd-button + class="submit_btn" + type="primary" + size="large" + block + :round="false" + @click="handleSubmit" + > + 淇濆瓨 + </wd-button> + </view> + </view> +</template> +<script lang="ts" setup> +import CardTitle from "@/components/card-title/index.vue"; +import SteelCoreForm from "./form.vue"; + +const handleSubmit = () => {}; +</script> +<style lang="scss" scoped> +.footer { + margin: 20px 16px 0 16px; +} +</style> diff --git a/src/pages/production/twist/receive/steelCore/form.vue b/src/pages/production/twist/receive/steelCore/form.vue new file mode 100644 index 0000000..0c174b0 --- /dev/null +++ b/src/pages/production/twist/receive/steelCore/form.vue @@ -0,0 +1,68 @@ +<template> + <wd-form ref="form" :model="model" class="relative form_box"> + <wd-cell-group :border="true"> + <wd-input + v-model="model.steelCoreName" + label="閽㈣姱鍚嶇О" + label-width="100px" + prop="steelCoreName" + clearable + placeholder="璇疯緭鍏ラ挗鑺悕绉�" + /> + <wd-input + v-model="model.plateNo" + label="鐩樺彿" + label-width="100px" + prop="plateNo" + clearable + placeholder="璇疯緭鍏ョ洏鍙�" + /> + <wd-input + v-model="model.length" + label="闀垮害" + label-width="100px" + prop="length" + clearable + placeholder="璇疯緭鍏ラ暱搴�" + /> + <wd-input + v-model="model.weight" + label="閲嶉噺" + label-width="100px" + prop="weight" + clearable + placeholder="璇疯緭鍏ラ噸閲�" + /> + <wd-input + v-model="model.manufacturers" + label="鍘傚" + label-width="100px" + prop="manufacturers" + clearable + placeholder="璇疯緭鍏ュ巶瀹�" + /> + </wd-cell-group> + </wd-form> +</template> + +<script lang="ts" setup> +import useFormData from "@/hooks/useFormData"; + +const { form: model } = useFormData({ + steelCoreName: undefined, // 閽㈣姱鍚嶇О + plateNo: undefined, // 鐩樺彿 + length: undefined, // 闀垮害 + weight: undefined, // 閲嶉噺 + manufacturers: undefined, // 鍘傚 +}); +</script> + +<style lang="scss" scoped> +.form_box { +} +.submit_btn { + position: absolute; + bottom: 0; + width: 100%; +} +</style> diff --git a/src/pages/production/twist/receive/steelCore/index.vue b/src/pages/production/twist/receive/steelCore/index.vue new file mode 100644 index 0000000..7195115 --- /dev/null +++ b/src/pages/production/twist/receive/steelCore/index.vue @@ -0,0 +1,105 @@ +<template> + <view class="page pt-2"> + <CardTitle title="閽㈣姱棰嗙敤" :hideAction="true" @action="addReport" /> + <view class="list"> + <wd-card v-for="(item, index) in 2" :key="index" type="rectangle" custom-class="round"> + <template #title> + <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> + </view> + <view class="text-[#A8A8A8]" @click="toEdit">缂栬緫</view> + </view> + </template> + <ProductionCard :data="cardAttr" color="#0D867F" /> + </wd-card> + </view> + <wd-popup v-model="dialog.visible" position="bottom" custom-class="yl-popup"> + <view class="action px-3"> + <wd-button type="text" @click="cancel">鍙栨秷</wd-button> + <wd-button type="text" @click="submit">纭畾</wd-button> + </view> + <PlateForm /> + </wd-popup> + <wd-toast /> + </view> +</template> + +<script setup lang="ts"> +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"; + +const toast = useToast(); +const dialog = reactive({ + visible: false, +}); + +const cardAttr = ref<any[]>([ + { + label: "鐩樺彿", + value: "1902101", + }, + { + label: "闀垮害", + value: "46kg", + }, + { + label: "閲嶉噺", + value: "10kg", + }, + { + label: undefined, + value: undefined, + }, + { + label: "鍘傚", + value: "姹熻嫃鐪佸崡閫氬競鑺鏁板瓧鍘�", + span: 14, + }, +]); + +const toEdit = () => { + uni.navigateTo({ + url: "/pages/production/twist/receive/steelCore/edit", + }); +}; + +const addReport = () => { + dialog.visible = true; +}; + +const submit = () => { + toast.show("鎻愪氦"); + dialog.visible = false; +}; + +const cancel = () => { + toast.show("鍙栨秷"); + dialog.visible = false; +}; +</script> + +<style lang="scss" scoped> +.page { + background: #f3f9f8; + .list { + height: calc(100vh - 120px); + margin: 12px; + overflow: scroll; + + :deep() { + .round { + border-radius: 4px; + } + } + } +} + +.action { + display: flex; + justify-content: space-between; +} +</style> diff --git a/src/pages/production/twist/report/edit.vue b/src/pages/production/twist/report/edit.vue new file mode 100644 index 0000000..ac75111 --- /dev/null +++ b/src/pages/production/twist/report/edit.vue @@ -0,0 +1,29 @@ +<template> + <view> + <CardTitle title="鎶ュ伐涓婃姤" :hideAction="false" /> + <TwistForm class="mx-4" /> + <view class="footer"> + <wd-button + class="submit_btn" + type="primary" + size="large" + block + :round="false" + @click="handleSubmit" + > + 鎶ュ伐 + </wd-button> + </view> + </view> +</template> +<script lang="ts" setup> +import CardTitle from "@/components/card-title/index.vue"; +import TwistForm from "./form.vue"; + +const handleSubmit = () => {}; +</script> +<style lang="scss" scoped> +.footer { + margin: 20px 16px 0 16px; +} +</style> diff --git a/src/pages/production/twist/report/form.vue b/src/pages/production/twist/report/form.vue new file mode 100644 index 0000000..00bf68e --- /dev/null +++ b/src/pages/production/twist/report/form.vue @@ -0,0 +1,104 @@ +<template> + <wd-form ref="form" :model="model" class="relative form_box"> + <wd-cell-group :border="true"> + <wd-input + v-model="model.contractNo" + label="鍚堝悓鍙�" + label-width="100px" + prop="contractNo" + clearable + placeholder="璇疯緭鍏ュ悎鍚屽彿" + /> + <wd-input + v-model="model.status" + label="鐘舵��" + label-width="100px" + prop="status" + clearable + placeholder="璇疯緭鍏ョ姸鎬�" + /> + <wd-input + v-model="model.clientName" + label="瀹㈡埛鍚嶇О" + label-width="100px" + prop="clientName" + clearable + placeholder="璇疯緭鍏ュ鎴峰悕绉�" + /> + <wd-input + v-model="model.workbench" + label="鏈哄彴" + label-width="100px" + prop="workbench" + clearable + placeholder="璇疯緭鍏ユ満鍙�" + /> + <wd-input + v-model="model.quality" + label="璐ㄩ噺杩芥函鍙�" + label-width="100px" + prop="quality" + clearable + placeholder="璇疯緭鍏ヨ川閲忚拷婧彿" + /> + <wd-input + v-model="model.specification" + label="瑙勬牸鍨嬪彿" + label-width="100px" + prop="specification" + clearable + placeholder="璇疯緭鍏ヨ鏍煎瀷鍙�" + /> + <wd-input + v-model="model.disc" + label="鐩橀暱(m)" + label-width="100px" + prop="disc" + clearable + placeholder="璇疯緭鍏ョ洏闀�" + /> + <wd-input + v-model="model.produced" + label="宸茬敓浜�(m)" + label-width="100px" + prop="produced" + clearable + placeholder="璇疯緭鍏ュ凡鐢熶骇" + /> + <wd-input + v-model="model.beProduced" + label="寰呯敓浜�(m)" + label-width="100px" + prop="beProduced" + clearable + placeholder="璇疯緭鍏ュ崟涓濈洏闀�" + /> + </wd-cell-group> + </wd-form> +</template> + +<script lang="ts" setup> +import useFormData from "@/hooks/useFormData"; + +const { form: model } = useFormData({ + contractNo: undefined, // 鍚堝悓鍙� + status: undefined, // 鐘舵�� + clientName: undefined, // 瀹㈡埛鍚嶇О + workbench: undefined, // 鏈哄彴 + quality: undefined, // 璐ㄩ噺杩芥函鍙� + specification: undefined, // 瑙勬牸鍨嬪彿 + disc: undefined, // 鐩橀暱 + produced: undefined, // 宸茬敓浜� + beProduced: undefined, // 寰呯敓浜� +}); +</script> + +<style lang="scss" scoped> +.form_box { +} +.submit_btn { + position: absolute; + bottom: 0; + width: 100%; +} +</style> diff --git a/src/pages/production/twist/report/index.vue b/src/pages/production/twist/report/index.vue new file mode 100644 index 0000000..602f50a --- /dev/null +++ b/src/pages/production/twist/report/index.vue @@ -0,0 +1,123 @@ +<template> + <view class="page pt-2"> + <CardTitle title="鎶ュ伐淇℃伅" :hideAction="true" @action="addReport" /> + <view class="list"> + <wd-card v-for="(item, index) in 6" 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> + </view> + <view class="text-[#A8A8A8]" @click="toEdit">缂栬緫</view> + </view> + </template> + <ProductionCard :data="cardAttr" /> + </wd-card> + <wd-loadmore custom-class="loadmore" state="loading" /> + </view> + + <wd-popup v-model="dialog.visible" position="bottom" custom-class="yl-popup"> + <view class="action px-3"> + <wd-button type="text" @click="cancel">鍙栨秷</wd-button> + <wd-button type="text" @click="submit">纭畾</wd-button> + </view> + <TwistForm /> + </wd-popup> + <wd-toast /> + </view> +</template> +<script setup lang="ts"> +import CardTitle from "@/components/card-title/index.vue"; +import TwistForm from "./form.vue"; +import { useToast } from "wot-design-uni"; +import ProductionCard from "../../components/ProductionCard.vue"; + +const toast = useToast(); +const dialog = reactive({ + visible: false, +}); + +const cardAttr = ref<any[]>([ + { + label: "鍚堝悓鍙�", + value: "ht2921246", + }, + { + label: "鐘舵��", + value: "-----", + }, + { + label: "瀹㈡埛鍚嶇О", + value: "澶忓織璞�", + }, + { + label: "鏈哄彴", + value: "-----", + }, + { + label: "瑙勬牸鍨嬪彿", + value: "2921246", + }, + { + label: "宸茬敓浜ф暟閲�", + value: "0", + }, + { + label: "鐩橀暱(m)", + value: "292", + }, + { + label: "璁″垝鏁伴噺", + value: "100", + }, + { + label: "璐ㄩ噺杩芥函鍙�", + value: "JX-1838", + }, +]); + +const toEdit = () => { + uni.navigateTo({ + url: "/pages/production/twist/report/edit", + }); +}; + +const addReport = () => { + dialog.visible = true; +}; + +const submit = () => { + toast.show("鎻愪氦"); + dialog.visible = false; +}; + +const cancel = () => { + toast.show("鍙栨秷"); + dialog.visible = false; +}; +</script> + +<style lang="scss" scoped> +.page { + background: #f3f9f8; + + .list { + height: calc(100vh - 120px); + margin: 12px; + overflow: scroll; + + :deep() { + .round { + border-radius: 4px; + } + } + } +} + +.action { + display: flex; + justify-content: space-between; +} +</style> diff --git a/src/pages/production/twist/selfInspect/edit.vue b/src/pages/production/twist/selfInspect/edit.vue new file mode 100644 index 0000000..c9ebfec --- /dev/null +++ b/src/pages/production/twist/selfInspect/edit.vue @@ -0,0 +1,31 @@ +<template> + <view> + <CardTitle title="缂栬緫鑷" :hideAction="false" /> + <BackmanForm class="mx-4" /> + <view class="footer"> + <wd-button + class="submit_btn" + type="primary" + size="large" + block + :round="false" + @click="handleSubmit" + > + 淇濆瓨 + </wd-button> + </view> + </view> +</template> + +<script setup lang="ts"> +import CardTitle from "@/components/card-title/index.vue"; +import BackmanForm from "./form.vue"; + +const handleSubmit = () => {}; +</script> + +<style lang="scss" scoped> +.footer { + margin: 20px 16px 0 16px; +} +</style> diff --git a/src/pages/production/twist/selfInspect/form.vue b/src/pages/production/twist/selfInspect/form.vue new file mode 100644 index 0000000..6402db7 --- /dev/null +++ b/src/pages/production/twist/selfInspect/form.vue @@ -0,0 +1,66 @@ +<template> + <wd-form ref="form" :model="model" class="relative form_box"> + <wd-cell-group :border="true"> + <wd-input + v-model="model.selfInspectName" + label="鑷鍚嶇О" + label-width="100px" + prop="selfInspectName" + clearable + placeholder="璇疯緭鍏ヨ嚜妫�鍚嶇О" + /> + <wd-input + v-model="model.unit" + label="鍗曚綅" + label-width="100px" + prop="unit" + clearable + placeholder="璇疯緭鍏ュ崟浣�" + /> + <wd-input + v-model="model.standard" + label="鏍囧噯鍊�" + label-width="100px" + prop="standard" + clearable + placeholder="璇疯緭鍏ユ爣鍑嗗��" + /> + <wd-input + v-model="model.selfInspectValue" + label="鑷鍊�" + label-width="100px" + prop="selfInspectValue" + clearable + placeholder="璇疯緭鍏ヨ嚜妫�鍊�" + /> + <wd-input + v-model="model.selfInspectResult" + label="鑷缁撴灉" + label-width="100px" + prop="selfInspectResult" + clearable + placeholder="璇疯緭鍏ヨ嚜妫�缁撴灉" + /> + </wd-cell-group> + </wd-form> +</template> + +<script setup lang="ts"> +import useFormData from "@/hooks/useFormData"; +const { form: model } = useFormData({ + selfInspectName: undefined, // 鑷鍚嶇О + unit: undefined, // 鍗曚綅 + standard: undefined, // 鏍囧噯鍊� + selfInspectValue: undefined, // 鑷鍊� + selfInspectResult: undefined, // 鑷鍊� +}); +</script> +<style lang="scss" scoped> +.form_box { +} +.submit_btn { + position: absolute; + bottom: 0; + width: 100%; +} +</style> diff --git a/src/pages/production/twist/selfInspect/index.vue b/src/pages/production/twist/selfInspect/index.vue new file mode 100644 index 0000000..9d98a20 --- /dev/null +++ b/src/pages/production/twist/selfInspect/index.vue @@ -0,0 +1,98 @@ +<template> + <view class="page pt-2"> + <CardTitle title="缁炵嚎鑷" :hideAction="true" @action="addReport" /> + <view class="list"> + <wd-card type="rectangle" custom-class="round"> + <template #title> + <view class="flex justify-between"> + <view> + <wd-icon name="a-rootlist" color="#0D867F"></wd-icon> + <text class="text-[#252525] ml-2 font-medium">鑷椤圭洰鍚嶇О</text> + </view> + <view class="text-[#A8A8A8]" @click="toEdit">缂栬緫</view> + </view> + </template> + <ProductionCard :data="cardAttr" color="#0D867F" /> + </wd-card> + </view> + <wd-popup v-model="dialog.visible" position="bottom" custom-class="yl-popup"> + <view class="action px-3"> + <wd-button type="text" @click="cancel">鍙栨秷</wd-button> + <wd-button type="text" @click="submit">纭畾</wd-button> + </view> + <SelfInspectForm /> + </wd-popup> + <wd-toast /> + </view> +</template> + +<script setup lang="ts"> +import CardTitle from "@/components/card-title/index.vue"; +import ProductionCard from "../../components/ProductionCard.vue"; +import { useToast } from "wot-design-uni"; +import SelfInspectForm from "./form.vue"; + +const toast = useToast(); +const dialog = reactive({ + visible: false, +}); +const cardAttr = ref<any[]>([ + { + label: "鍗曚綅", + value: "n惟路m", + }, + { + label: "鏍囧噯鍊�", + value: "1246", + }, + { + label: "鑷鍊�", + value: "1245", + }, + { + label: "鑷缁撴灉", + value: "涓嶅悎鏍�", + color: "#FF1E1E", + }, +]); +const addReport = () => { + dialog.visible = true; +}; + +const toEdit = () => { + uni.navigateTo({ + url: "/pages/production/twist/selfInspect/edit", + }); +}; +const submit = () => { + toast.show("鎻愪氦"); + dialog.visible = false; +}; + +const cancel = () => { + toast.show("鍙栨秷"); + dialog.visible = false; +}; +</script> + +<style lang="scss" scoped> +.page { + background: #f3f9f8; + .list { + height: calc(100vh - 120px); + margin: 12px; + overflow: scroll; + + :deep() { + .round { + border-radius: 4px; + } + } + } +} + +.action { + display: flex; + justify-content: space-between; +} +</style> diff --git a/src/pages/production/wire/backman/edit.vue b/src/pages/production/wire/backman/edit.vue new file mode 100644 index 0000000..c9ebfec --- /dev/null +++ b/src/pages/production/wire/backman/edit.vue @@ -0,0 +1,31 @@ +<template> + <view> + <CardTitle title="缂栬緫鑷" :hideAction="false" /> + <BackmanForm class="mx-4" /> + <view class="footer"> + <wd-button + class="submit_btn" + type="primary" + size="large" + block + :round="false" + @click="handleSubmit" + > + 淇濆瓨 + </wd-button> + </view> + </view> +</template> + +<script setup lang="ts"> +import CardTitle from "@/components/card-title/index.vue"; +import BackmanForm from "./form.vue"; + +const handleSubmit = () => {}; +</script> + +<style lang="scss" scoped> +.footer { + margin: 20px 16px 0 16px; +} +</style> diff --git a/src/pages/production/wire/backman/form.vue b/src/pages/production/wire/backman/form.vue new file mode 100644 index 0000000..e4cf542 --- /dev/null +++ b/src/pages/production/wire/backman/form.vue @@ -0,0 +1,66 @@ +<template> + <wd-form ref="form" :model="model" class="relative form_box"> + <wd-cell-group :border="true"> + <wd-input + v-model="model.workbench" + label="鏉傚伐鍚嶇О" + label-width="100px" + prop="workbench" + clearable + placeholder="璇疯緭鍏ユ潅宸ュ悕绉�" + /> + <wd-input + v-model="model.poleNo" + label="鏉嗗彿" + label-width="100px" + prop="poleNo" + clearable + placeholder="璇疯緭鍏ユ潌鍙�" + /> + <wd-input + v-model="model.unit" + label="鍗曚綅" + label-width="100px" + prop="unit" + clearable + placeholder="璇疯緭鍏ュ崟浣�" + /> + <wd-input + v-model="model.poleWeight" + label="鏉嗛噸" + label-width="100px" + prop="poleWeight" + clearable + placeholder="璇疯緭鍏ユ潌閲�" + /> + <wd-input + v-model="model.useWeight" + label="浣跨敤閲嶉噺" + label-width="100px" + prop="useWeight" + clearable + placeholder="璇疯緭鍏ヤ娇鐢ㄩ噸閲�" + /> + </wd-cell-group> + </wd-form> +</template> + +<script setup lang="ts"> +import useFormData from "@/hooks/useFormData"; +const { form: model } = useFormData({ + backmanName: undefined, // 鏉傚伐鍚嶇О + unit: undefined, // 鍗曚綅 + num: undefined, // 鏁伴噺 + caller: undefined, // 鎶ュ伐浜� + callerDate: undefined, // 鎶ュ伐鏃ユ湡 +}); +</script> +<style lang="scss" scoped> +.form_box { +} +.submit_btn { + position: absolute; + bottom: 0; + width: 100%; +} +</style> diff --git a/src/pages/production/wire/backman/index.vue b/src/pages/production/wire/backman/index.vue new file mode 100644 index 0000000..43f13cb --- /dev/null +++ b/src/pages/production/wire/backman/index.vue @@ -0,0 +1,108 @@ +<template> + <view class="page pt-2"> + <CardTitle title="鏉傚伐淇℃伅" :hideAction="true" @action="addReport" /> + <view class="list"> + <wd-card type="rectangle" custom-class="round"> + <template #title> + <view class="flex justify-between"> + <view> + <wd-icon name="a-rootlist" color="#0D867F"></wd-icon> + <text class="text-[#252525] ml-2 font-medium">鏉傚伐椤圭洰鍚嶇О</text> + </view> + <view class="text-[#A8A8A8]" @click="toEdit">缂栬緫</view> + </view> + </template> + <ProductionCard :data="cardAttr" color="#0D867F" /> + </wd-card> + </view> + <wd-popup v-model="dialog.visible" position="bottom" custom-class="yl-popup"> + <view class="action px-3"> + <wd-button type="text" @click="cancel">鍙栨秷</wd-button> + <wd-button type="text" @click="submit">纭畾</wd-button> + </view> + <BackmanForm /> + </wd-popup> + <wd-toast /> + </view> +</template> + +<script setup lang="ts"> +import CardTitle from "@/components/card-title/index.vue"; +import ProductionCard from "../components/ProductionCard.vue"; +import { useToast } from "wot-design-uni"; +import BackmanForm from "./form.vue"; + +const toast = useToast(); +const dialog = reactive({ + visible: false, +}); + +const cardAttr = ref<any[]>([ + { + label: "鍗曚綅", + value: "n惟路m", + }, + { + label: "瀹氶", + value: "1246", + }, + { + label: "鏁伴噺", + value: "4", + }, + { + label: "閲戦", + value: "鏌ョ湅", + }, + { + label: "鎶ュ伐浜�", + value: "闆疯繘瀹�", + }, + { + label: "鏃ユ湡", + value: "2022-05-17", + }, +]); + +const toEdit = () => { + uni.navigateTo({ + url: "/pages/production/backman/edit", + }); +}; + +const addReport = () => { + dialog.visible = true; +}; + +const submit = () => { + toast.show("鎻愪氦"); + dialog.visible = false; +}; + +const cancel = () => { + toast.show("鍙栨秷"); + dialog.visible = false; +}; +</script> + +<style lang="scss" scoped> +.page { + background: #f3f9f8; + .list { + height: calc(100vh - 120px); + margin: 12px; + overflow: scroll; + + :deep() { + .round { + border-radius: 4px; + } + } + } +} + +.action { + display: flex; + justify-content: space-between; +} +</style> diff --git a/src/pages/production/receive/edit.vue b/src/pages/production/wire/receive/edit.vue similarity index 100% rename from src/pages/production/receive/edit.vue rename to src/pages/production/wire/receive/edit.vue diff --git a/src/pages/production/receive/form.vue b/src/pages/production/wire/receive/form.vue similarity index 100% rename from src/pages/production/receive/form.vue rename to src/pages/production/wire/receive/form.vue diff --git a/src/pages/production/receive/index.vue b/src/pages/production/wire/receive/index.vue similarity index 100% rename from src/pages/production/receive/index.vue rename to src/pages/production/wire/receive/index.vue diff --git a/src/pages/production/report/wire.vue b/src/pages/production/wire/report/wire.vue similarity index 100% rename from src/pages/production/report/wire.vue rename to src/pages/production/wire/report/wire.vue diff --git a/src/pages/production/report/wireEdit.vue b/src/pages/production/wire/report/wireEdit.vue similarity index 100% rename from src/pages/production/report/wireEdit.vue rename to src/pages/production/wire/report/wireEdit.vue diff --git a/src/pages/production/report/wireForm.vue b/src/pages/production/wire/report/wireForm.vue similarity index 100% rename from src/pages/production/report/wireForm.vue rename to src/pages/production/wire/report/wireForm.vue diff --git a/src/pages/production/wire/selfInspect/edit.vue b/src/pages/production/wire/selfInspect/edit.vue new file mode 100644 index 0000000..849b1e0 --- /dev/null +++ b/src/pages/production/wire/selfInspect/edit.vue @@ -0,0 +1,31 @@ +<template> + <view> + <CardTitle title="缂栬緫鎷変笣鑷" :hideAction="false" /> + <SelfInspectForm class="mx-4" /> + <view class="footer"> + <wd-button + class="submit_btn" + type="primary" + size="large" + block + :round="false" + @click="handleSubmit" + > + 淇濆瓨鑷淇℃伅 + </wd-button> + </view> + </view> +</template> + +<script setup lang="ts"> +import CardTitle from "@/components/card-title/index.vue"; +import SelfInspectForm from "./form.vue"; + +const handleSubmit = () => {}; +</script> + +<style lang="scss" scoped> +.footer { + margin: 20px 16px 0 16px; +} +</style> diff --git a/src/pages/production/wire/selfInspect/form.vue b/src/pages/production/wire/selfInspect/form.vue new file mode 100644 index 0000000..6402db7 --- /dev/null +++ b/src/pages/production/wire/selfInspect/form.vue @@ -0,0 +1,66 @@ +<template> + <wd-form ref="form" :model="model" class="relative form_box"> + <wd-cell-group :border="true"> + <wd-input + v-model="model.selfInspectName" + label="鑷鍚嶇О" + label-width="100px" + prop="selfInspectName" + clearable + placeholder="璇疯緭鍏ヨ嚜妫�鍚嶇О" + /> + <wd-input + v-model="model.unit" + label="鍗曚綅" + label-width="100px" + prop="unit" + clearable + placeholder="璇疯緭鍏ュ崟浣�" + /> + <wd-input + v-model="model.standard" + label="鏍囧噯鍊�" + label-width="100px" + prop="standard" + clearable + placeholder="璇疯緭鍏ユ爣鍑嗗��" + /> + <wd-input + v-model="model.selfInspectValue" + label="鑷鍊�" + label-width="100px" + prop="selfInspectValue" + clearable + placeholder="璇疯緭鍏ヨ嚜妫�鍊�" + /> + <wd-input + v-model="model.selfInspectResult" + label="鑷缁撴灉" + label-width="100px" + prop="selfInspectResult" + clearable + placeholder="璇疯緭鍏ヨ嚜妫�缁撴灉" + /> + </wd-cell-group> + </wd-form> +</template> + +<script setup lang="ts"> +import useFormData from "@/hooks/useFormData"; +const { form: model } = useFormData({ + selfInspectName: undefined, // 鑷鍚嶇О + unit: undefined, // 鍗曚綅 + standard: undefined, // 鏍囧噯鍊� + selfInspectValue: undefined, // 鑷鍊� + selfInspectResult: undefined, // 鑷鍊� +}); +</script> +<style lang="scss" scoped> +.form_box { +} +.submit_btn { + position: absolute; + bottom: 0; + width: 100%; +} +</style> diff --git a/src/pages/production/wire/selfInspect/index.vue b/src/pages/production/wire/selfInspect/index.vue new file mode 100644 index 0000000..26648f3 --- /dev/null +++ b/src/pages/production/wire/selfInspect/index.vue @@ -0,0 +1,98 @@ +<template> + <view class="page pt-2"> + <CardTitle title="鎷変笣鑷" :hideAction="true" @action="addReport" /> + <view class="list"> + <wd-card type="rectangle" custom-class="round"> + <template #title> + <view class="flex justify-between"> + <view> + <wd-icon name="a-rootlist" color="#0D867F"></wd-icon> + <text class="text-[#252525] ml-2 font-medium">鑷椤圭洰鍚嶇О</text> + </view> + <view class="text-[#A8A8A8]" @click="toEdit">缂栬緫</view> + </view> + </template> + <ProductionCard :data="cardAttr" color="#0D867F" /> + </wd-card> + </view> + <wd-popup v-model="dialog.visible" position="bottom" custom-class="yl-popup"> + <view class="action px-3"> + <wd-button type="text" @click="cancel">鍙栨秷</wd-button> + <wd-button type="text" @click="submit">纭畾</wd-button> + </view> + <SelfInspectForm /> + </wd-popup> + <wd-toast /> + </view> +</template> + +<script setup lang="ts"> +import CardTitle from "@/components/card-title/index.vue"; +import ProductionCard from "../components/ProductionCard.vue"; +import { useToast } from "wot-design-uni"; +import SelfInspectForm from "./form.vue"; + +const toast = useToast(); +const dialog = reactive({ + visible: false, +}); +const cardAttr = ref<any[]>([ + { + label: "鍗曚綅", + value: "n惟路m", + }, + { + label: "鏍囧噯鍊�", + value: "1246", + }, + { + label: "鑷鍊�", + value: "1245", + }, + { + label: "鑷缁撴灉", + value: "涓嶅悎鏍�", + color: "#FF1E1E", + }, +]); +const addReport = () => { + dialog.visible = true; +}; + +const toEdit = () => { + uni.navigateTo({ + url: "/pages/production/selfInspect/edit", + }); +}; +const submit = () => { + toast.show("鎻愪氦"); + dialog.visible = false; +}; + +const cancel = () => { + toast.show("鍙栨秷"); + dialog.visible = false; +}; +</script> + +<style lang="scss" scoped> +.page { + background: #f3f9f8; + .list { + height: calc(100vh - 120px); + margin: 12px; + overflow: scroll; + + :deep() { + .round { + border-radius: 4px; + } + } + } +} + +.action { + display: flex; + justify-content: space-between; +} +</style> -- Gitblit v1.9.3