From e950c38ba82e5e6bc8b0c50c35e5dbb6a180165a Mon Sep 17 00:00:00 2001
From: 13404089107 <puwei@sinata.cn>
Date: 星期二, 20 五月 2025 16:43:06 +0800
Subject: [PATCH] Merge branch 'main' of http://120.76.84.145:10101/gitblit/r/H5/leshan-laboratory

---
 culture/src/views/strain-library/breeding-record/confirm-storage-dialog.vue |  135 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 135 insertions(+), 0 deletions(-)

diff --git a/culture/src/views/strain-library/breeding-record/confirm-storage-dialog.vue b/culture/src/views/strain-library/breeding-record/confirm-storage-dialog.vue
new file mode 100644
index 0000000..fed7afe
--- /dev/null
+++ b/culture/src/views/strain-library/breeding-record/confirm-storage-dialog.vue
@@ -0,0 +1,135 @@
+<template>
+  <el-dialog
+    :visible.sync="visible"
+    title=""
+    width="520px"
+    :close-on-click-modal="false"
+    custom-class="record-detail-dialog"
+    @close="handleClose"
+  >
+    <div class="dialog-content">
+      <div class="confirm-tip">
+        是否确认该项菌种信息?
+        <span class="danger">确认后将无法再次编辑菌种传代项内容</span>
+      </div>
+      <el-form :model="form" :rules="rules" ref="form" label-position="top">
+        <el-form-item required>
+          <template #label>
+            <span>菌种保藏人签字</span>
+            <el-button type="primary" class="sign-btn" @click="showSignature = true">签名</el-button>
+          </template>
+          <div class="signature-area" :class="{ 'waiting': !form.signature }">
+            <template v-if="form.signature">
+              <img :src="form.signature" alt="菌种保藏人签字" />
+            </template>
+            <template v-else>
+              <span class="waiting-text">等待确认</span>
+            </template>
+          </div>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="footer-btns">
+      <el-button @click="handleClose" style="margin-right: 16px;">取消</el-button>
+      <el-button type="primary" @click="handleConfirm">确认</el-button>
+    </div>
+    <signature-canvas :visible.sync="showSignature" @confirm="handleSignatureConfirm" />
+  </el-dialog>
+</template>
+
+<script>
+import SignatureCanvas from '@/components/SignatureCanvas.vue';
+export default {
+  name: 'ConfirmStorageDialog',
+  components: { SignatureCanvas },
+  props: {
+    visible: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      form: {
+        signature: ''
+      },
+      rules: {
+        signature: [
+          { required: true, message: '请签名', trigger: 'change' }
+        ]
+      },
+      showSignature: false
+    }
+  },
+  methods: {
+    handleClose() {
+      this.$emit('update:visible', false)
+    },
+    handleConfirm() {
+      this.$refs.form.validate(valid => {
+        if (!valid) return
+        this.$emit('confirm', { ...this.form })
+        this.handleClose()
+      })
+    },
+    handleSignatureConfirm(dataUrl) {
+      this.form.signature = dataUrl
+      this.showSignature = false
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.confirm-tip {
+  color: #f5222d;
+  font-size: 16px;
+  margin-bottom: 24px;
+  .danger {
+    margin-left: 12px;
+  }
+}
+.signature-area {
+  height: 120px;
+  width: 100%;
+  background: #F5F7FA;
+  border-radius: 4px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  border: 1px solid #DCDFE6;
+  overflow: hidden;
+  padding: 0;
+}
+.signature-area.waiting {
+  border-style: dashed;
+  background: #FAFAFA;
+}
+.signature-area img {
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+  display: block;
+}
+.waiting-text {
+  color: #909399;
+  font-size: 14px;
+}
+.sign-btn {
+  height: 32px;
+  border-radius: 4px;
+  font-size: 14px;
+  padding: 0 20px;
+  font-weight: 400;
+  margin-left: 12px;
+}
+.footer-btns {
+  display: flex;
+  justify-content: center;
+  padding: 24px;
+  padding-top: 0;
+  .el-button {
+    width: 150px;
+  }
+}
+</style> 
\ No newline at end of file

--
Gitblit v1.7.1