From 0c6be3ee8c154599652fecae4f3bf228c73ef458 Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期三, 10 十二月 2025 21:46:12 +0800
Subject: [PATCH] 1

---
 项目代码/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js |    2 
 项目代码/WIDESEA_WMSClient/src/router/viewGird.js                  |    5 +
 项目代码/WIDESEA_WMSClient/config/buttons.js                       |    9 +
 项目代码/WIDESEA_WMSClient/src/views/outbound/printForm.vue        |  247 +++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 263 insertions(+), 0 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/config/buttons.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/config/buttons.js"
index 1bcc4fb..646ec5c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/config/buttons.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/config/buttons.js"
@@ -226,6 +226,15 @@
     onClick: function () {
     }
 },
+{
+    name: "鏉$爜鎵撳嵃",
+    // icon: 'el-icon-upload2',
+    class: '',
+    value: 'printForm',
+    type: 'primary',
+    onClick: function () {
+    }
+},
 ]
 
 export default buttons
\ No newline at end of file
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js"
index a649213..8be26bc 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js"
@@ -367,6 +367,8 @@
         }
       }
 
+      
+
       var EmptyTrayOutboundBtn = this.buttons.find(x => x.value == "EmptyTrayOutbound");
         if (EmptyTrayOutboundBtn != null) {
           EmptyTrayOutboundBtn.onClick = () => {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/router/viewGird.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/router/viewGird.js"
index 3c3b62e..e4c2aca 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/router/viewGird.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/router/viewGird.js"
@@ -223,6 +223,11 @@
     name: 'StockDetailByMateriel',
     component: () => import('@/views/stock/stockInfoDetailByMaterielSum.vue')
   }
+  ,{
+    path:'/printForm',
+    name: 'printForm',
+    component: () => import('@/views/outbound/printForm.vue') 
+  },
 ]
 
 export default viewgird   
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/printForm.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/printForm.vue"
new file mode 100644
index 0000000..540435a
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/printForm.vue"
@@ -0,0 +1,247 @@
+<template>
+  <div class="print-input-container">
+    <!-- 椤甸潰鏍囬 -->
+    <div class="page-title">鐗╂枡鏍囪瘑鍗℃墦鍗板弬鏁拌緭鍏�</div>
+
+    <!-- 琛ㄥ崟鍖哄煙 -->
+    <el-card class="input-card">
+      <el-form
+        ref="printFormRef"
+        :model="printForm"
+        :rules="formRules"
+        label-width="100px"
+        size="default"
+      >
+        <!-- 鍙屽垪甯冨眬 -->
+        <el-row :gutter="20">
+          <!-- 绗竴鍒� -->
+          <el-col :span="12">
+            <el-form-item label="鏂欏彿" prop="materialCode">
+              <el-input
+                v-model="printForm.materialCode"
+                placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�"
+                clearable
+              />
+            </el-form-item>
+
+            <el-form-item label="鍝佸悕" prop="materialName">
+              <el-input
+                v-model="printForm.materialName"
+                placeholder="璇疯緭鍏ョ墿鏂欏悕绉�"
+                clearable
+              />
+            </el-form-item>
+
+            <el-form-item label="瑙勬牸" prop="specification">
+              <el-input
+                v-model="printForm.specification"
+                placeholder="璇疯緭鍏ョ墿鏂欒鏍�"
+                clearable
+              />
+            </el-form-item>
+
+            <el-form-item label="鎵瑰彿" prop="batchNumber">
+              <el-input
+                v-model="printForm.batchNumber"
+                placeholder="璇疯緭鍏ユ壒鍙凤紙鐢熸垚浜岀淮鐮佺敤锛�"
+                clearable
+              />
+            </el-form-item>
+
+            <el-form-item label="鍘傚尯" prop="factory">
+              <el-input
+                v-model="printForm.factory"
+                placeholder="璇疯緭鍏ュ巶鍖哄悕绉�"
+                clearable
+              />
+            </el-form-item>
+          </el-col>
+
+          <!-- 绗簩鍒� -->
+          <el-col :span="12">
+            <el-form-item label="渚涘簲鍟嗙紪鐮�" prop="supplierCode">
+              <el-input
+                v-model="printForm.supplierCode"
+                placeholder="璇疯緭鍏ヤ緵搴斿晢缂栫爜"
+                clearable
+              />
+            </el-form-item>
+
+            <el-form-item label="閲囪喘鍗曞彿" prop="purchaseOrderNo">
+              <el-input
+                v-model="printForm.purchaseOrderNo"
+                placeholder="璇疯緭鍏ラ噰璐崟鍙�"
+                clearable
+              />
+            </el-form-item>
+
+            <el-form-item label="鏁伴噺/鎬绘暟" prop="quantityTotal">
+              <el-input
+                v-model="printForm.quantityTotal"
+                placeholder="渚嬶細100/5000"
+                clearable
+              />
+            </el-form-item>
+
+            <el-form-item label="鎵规" prop="batch">
+              <el-input
+                v-model="printForm.batch"
+                placeholder="璇疯緭鍏ユ壒娆″彿"
+                clearable
+              />
+            </el-form-item>
+
+            <el-form-item label="鏃ユ湡" prop="date">
+              <el-date-picker
+                v-model="printForm.date"
+                type="date"
+                placeholder="閫夋嫨鏃ユ湡"
+                format="YYYY-MM-DD"
+                value-format="YYYY-MM-DD"
+                clearable
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <!-- 鎵归噺娣诲姞锛堝彲閫夛級 -->
+        <el-form-item label="鎵撳嵃浠芥暟">
+          <el-input-number
+            v-model="printCopyCount"
+            :min="1"
+            :max="50"
+            label="浠芥暟"
+            placeholder="璇疯緭鍏ユ墦鍗颁唤鏁�"
+          />
+        </el-form-item>
+
+        <!-- 鎿嶄綔鎸夐挳 -->
+        <el-form-item class="form-actions">
+          <el-button type="primary" @click="submitForm">纭骞舵墦寮�鎵撳嵃寮圭獥</el-button>
+          <el-button @click="resetForm">閲嶇疆琛ㄥ崟</el-button>
+        </el-form-item>
+      </el-form>
+    </el-card>
+
+    <!-- 寮曞叆鎵撳嵃寮圭獥缁勪欢 -->
+    <print-view ref="printViewRef" />
+  </div>
+</template>
+
+<script>
+// 寮曞叆鎵撳嵃寮圭獥缁勪欢
+import printView from "@/extension/outbound/extend/printView.vue";
+import { ElMessage } from "element-plus";
+
+export default {
+  name: "PrintInputPage",
+  components: { printView },
+  data() {
+    return {
+      // 琛ㄥ崟鏁版嵁锛堝搴攑rintView鎵�闇�鐨勫弬鏁帮級
+      printForm: {
+        materialCode: "", // 鏂欏彿
+        supplierCode: "", // 渚涘簲鍟嗙紪鐮�
+        materialName: "", // 鍝佸悕
+        purchaseOrderNo: "", // 閲囪喘鍗曞彿
+        specification: "", // 瑙勬牸
+        quantityTotal: "", // 鏁伴噺/鎬绘暟
+        batchNumber: "", // 鎵瑰彿锛堜簩缁寸爜鍐呭锛�
+        batch: "", // 鎵规
+        factory: "", // 鍘傚尯
+        date: "", // 鏃ユ湡锛堥粯璁ゅ綋鍓嶆棩鏈燂級
+      },
+      // 鎵撳嵃浠芥暟锛堟敮鎸佹壒閲忕敓鎴愬鏉$浉鍚屾暟鎹級
+      printCopyCount: 1,
+      // 琛ㄥ崟楠岃瘉瑙勫垯
+      formRules: {
+        materialCode: [{ required: true, message: "璇疯緭鍏ユ枡鍙�", trigger: "blur" }],
+        materialName: [{ required: true, message: "璇疯緭鍏ュ搧鍚�", trigger: "blur" }],
+        batchNumber: [{ required: true, message: "璇疯緭鍏ユ壒鍙�", trigger: "blur" }],
+        date: [{ required: true, message: "璇烽�夋嫨鏃ユ湡", trigger: "change" }],
+      },
+    };
+  },
+  mounted() {
+    // 鍒濆鍖栭粯璁ゆ棩鏈熶负褰撳ぉ
+    const today = new Date();
+    this.printForm.date = `${today.getFullYear()}-${(today.getMonth() + 1).toString().padStart(2, "0")}-${today.getDate().toString().padStart(2, "0")}`;
+  },
+  methods: {
+    // 鎻愪氦琛ㄥ崟锛屾墦寮�鎵撳嵃寮圭獥
+    submitForm() {
+      this.$refs.printFormRef.validate((valid) => {
+        if (!valid) {
+          ElMessage.warning("璇峰畬鍠勫繀濉」鍚庢彁浜�");
+          return;
+        }
+
+        try {
+          // 鏋勯�犳墦鍗版暟鎹紙鏀寔澶氫唤锛�
+          const printData = [];
+          for (let i = 0; i < this.printCopyCount; i++) {
+            printData.push({ ...this.printForm });
+          }
+
+          // 璋冪敤printView鐨刼pen鏂规硶锛屼紶閫掑弬鏁板苟鎵撳紑寮圭獥
+          this.$refs.printViewRef.open(printData);
+          ElMessage.success(`宸茬敓鎴� ${this.printCopyCount} 浠芥墦鍗版暟鎹紝鍗冲皢鎵撳紑鎵撳嵃寮圭獥`);
+        } catch (error) {
+          console.error("鎵撳紑鎵撳嵃寮圭獥澶辫触锛�", error);
+          ElMessage.error("鎵撳紑鎵撳嵃寮圭獥澶辫触锛岃閲嶈瘯");
+        }
+      });
+    },
+
+    // 閲嶇疆琛ㄥ崟
+    resetForm() {
+      this.$refs.printFormRef.resetFields();
+      // 閲嶇疆鍚庢仮澶嶉粯璁ゆ棩鏈�
+      const today = new Date();
+      this.printForm.date = `${today.getFullYear()}-${(today.getMonth() + 1).toString().padStart(2, "0")}-${today.getDate().toString().padStart(2, "0")}`;
+      this.printCopyCount = 1;
+    },
+  },
+};
+</script>
+
+<style scoped>
+.print-input-container {
+  padding: 20px;
+  max-width: 1000px;
+  margin: 0 auto;
+}
+
+.page-title {
+  font-size: 20px;
+  font-weight: bold;
+  color: #303133;
+  margin-bottom: 20px;
+  text-align: center;
+}
+
+.input-card {
+  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+}
+
+.form-actions {
+  text-align: center;
+  margin-top: 20px;
+}
+
+.form-actions .el-button {
+  margin: 0 10px;
+  padding: 10px 20px;
+}
+
+/* 閫傞厤灏忓睆骞� */
+@media (max-width: 768px) {
+  .print-input-container {
+    padding: 10px;
+  }
+
+  .el-form-item {
+    margin-bottom: 15px;
+  }
+}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3