|
|
|
|
@ -1,10 +1,10 @@
|
|
|
|
|
<template>
|
|
|
|
|
<template>
|
|
|
|
|
<view class="page-container">
|
|
|
|
|
<NavBar :title="t('moldCheck.addTitle')" />
|
|
|
|
|
|
|
|
|
|
<scroll-view scroll-y class="detail-scroll">
|
|
|
|
|
<view class="content-section">
|
|
|
|
|
<!-- 妯″叿淇℃伅 -->
|
|
|
|
|
<!-- 模具信息 -->
|
|
|
|
|
<view class="section-card">
|
|
|
|
|
<view class="section-header">
|
|
|
|
|
<view class="section-icon">
|
|
|
|
|
@ -52,7 +52,7 @@
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<!-- 浠诲姟淇℃伅 -->
|
|
|
|
|
<!-- 任务信息 -->
|
|
|
|
|
<view class="section-card">
|
|
|
|
|
<view class="section-header">
|
|
|
|
|
<view class="section-icon">
|
|
|
|
|
@ -77,9 +77,8 @@
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<!-- 鐐规椤瑰垪琛?-->
|
|
|
|
|
<view v-if="!inspectionItems.length" class="hint">{{ t('moldCheck.noItems') }}</view>
|
|
|
|
|
<view v-else class="inspection-section">
|
|
|
|
|
<!-- 点检项列表 -->
|
|
|
|
|
<view v-if="selectedTemplate" class="inspection-section">
|
|
|
|
|
<view class="inspection-toolbar">
|
|
|
|
|
<text class="inspection-toolbar-title">{{ t('moldCheck.resultListTitle') }}</text>
|
|
|
|
|
<view :class="['edit-toggle-btn', ticketResultEditable ? 'active' : '']" @click="toggleTicketResultEditable">
|
|
|
|
|
@ -183,7 +182,7 @@
|
|
|
|
|
<view :class="['action-btn', 'submit-btn', submitLoading ? 'action-btn-disabled' : '']" @click="handleSubmit">{{ t('moldCheck.submit') }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<!-- 妯″叿閫夋嫨寮圭獥 -->
|
|
|
|
|
<!-- 模具选择弹窗 -->
|
|
|
|
|
<view v-if="showMoldPicker" class="picker-mask" @click="closeMoldPicker">
|
|
|
|
|
<view class="picker-popup" @click.stop>
|
|
|
|
|
<view class="picker-header">
|
|
|
|
|
@ -215,7 +214,7 @@
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<!-- 妯℃澘閫夋嫨寮圭獥 -->
|
|
|
|
|
<!-- 模板选择弹窗 -->
|
|
|
|
|
<view v-if="showTemplatePicker" class="picker-mask" @click="closeTemplatePicker">
|
|
|
|
|
<view class="picker-popup" @click.stop>
|
|
|
|
|
<view class="picker-header">
|
|
|
|
|
@ -298,12 +297,12 @@ onLoad(async (query) => {
|
|
|
|
|
const moldId = String(query?.id || '')
|
|
|
|
|
|
|
|
|
|
if (moldId) {
|
|
|
|
|
// 浠庡垪琛ㄩ〉浼犲叆浜嗘ā鍏稩D
|
|
|
|
|
// 从列表页传入了模具ID
|
|
|
|
|
const urlCode = query?.code ? decodeURIComponent(query.code) : ''
|
|
|
|
|
const urlName = query?.name ? decodeURIComponent(query.name) : ''
|
|
|
|
|
|
|
|
|
|
if (urlCode || urlName) {
|
|
|
|
|
// 鍒楄〃椤典紶鍏ヤ簡妯″叿鍩烘湰淇℃伅
|
|
|
|
|
// 列表页传入了模具基本信息
|
|
|
|
|
moldInfo.id = moldId
|
|
|
|
|
moldInfo.code = urlCode
|
|
|
|
|
moldInfo.name = urlName
|
|
|
|
|
@ -317,7 +316,7 @@ onLoad(async (query) => {
|
|
|
|
|
await loadMoldInfo(moldId)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 濡傛灉娌℃湁浼犲叆妯″叿ID锛岀敤鎴烽渶瑕侀€氳繃妯″叿閫夋嫨鍣ㄩ€夋嫨
|
|
|
|
|
// 如果没有传入模具ID,用户需要通过模具选择器选择
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
async function loadMoldInfo(id) {
|
|
|
|
|
@ -732,10 +731,10 @@ async function handleSubmit() {
|
|
|
|
|
.image-upload { width: 140rpx; height: 140rpx; border-radius: 16rpx; border: 2rpx dashed #cbd5e1; background: #f8fafc; display: flex; align-items: center; justify-content: center; }
|
|
|
|
|
.image-upload-icon { font-size: 60rpx; color: #94a3b8; line-height: 1; }
|
|
|
|
|
.hint { padding: 48rpx 0; text-align: center; color: #9ca3af; font-size: 26rpx; }
|
|
|
|
|
.action-bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 20rpx; padding: 20rpx 24rpx calc(20rpx + env(safe-area-inset-bottom)); background: #f5f7fb; }
|
|
|
|
|
.action-btn { flex: 1; height: 88rpx; border-radius: 18rpx; display: flex; align-items: center; justify-content: center; font-size: 30rpx; font-weight: 600; }
|
|
|
|
|
.back-btn { background: #ffffff; color: #1f7cff; border: 1rpx solid #bfdbfe; }
|
|
|
|
|
.submit-btn { background: linear-gradient(135deg, #1f7cff, #3b82f6); color: #ffffff; }
|
|
|
|
|
.action-bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 18rpx; padding: 18rpx 24rpx calc(18rpx + env(safe-area-inset-bottom)); background: #ffffff; box-shadow: 0 -8rpx 24rpx rgba(15, 23, 42, 0.06); }
|
|
|
|
|
.action-btn { flex: 1; height: 84rpx; border-radius: 16rpx; display: flex; align-items: center; justify-content: center; font-size: 30rpx; font-weight: 600; }
|
|
|
|
|
.back-btn { background: #eef2f7; color: #475569; }
|
|
|
|
|
.submit-btn { background: #1f4b79; color: #ffffff; }
|
|
|
|
|
.action-btn-disabled { background: #94a3b8; }
|
|
|
|
|
.picker-mask { position: fixed; left: 0; right: 0; top: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); z-index: 100; display: flex; align-items: flex-end; }
|
|
|
|
|
.picker-popup { width: 100%; background: #ffffff; border-radius: 24rpx 24rpx 0 0; padding-bottom: env(safe-area-inset-bottom); }
|
|
|
|
|
|