From ce1292c9cf37195b6abd2699dfc5d6cb3e143c9b Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期日, 12 四月 2026 23:38:19 +0800
Subject: [PATCH] feat(MES): 添加MES接口相关实体和DTO JS扩展文件至JSX格式并更新配置

---
 Code/WMS/WIDESEA_WMSClient/src/components/MesConfirmDialog.vue |  273 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 273 insertions(+), 0 deletions(-)

diff --git a/Code/WMS/WIDESEA_WMSClient/src/components/MesConfirmDialog.vue b/Code/WMS/WIDESEA_WMSClient/src/components/MesConfirmDialog.vue
new file mode 100644
index 0000000..50dfb0e
--- /dev/null
+++ b/Code/WMS/WIDESEA_WMSClient/src/components/MesConfirmDialog.vue
@@ -0,0 +1,273 @@
+<template>
+  <el-dialog
+    v-model="visible"
+    :title="dialogTitle"
+    width="500px"
+    :close-on-click-modal="false"
+    @close="handleClose"
+  >
+    <div class="mes-confirm-content">
+      <p class="operation-text">{{ operationText }}</p>
+
+      <div class="info-section">
+        <div class="info-row" v-for="(item, index) in displayInfo" :key="index">
+          <span class="info-label">{{ item.label }}:</span>
+          <span class="info-value">{{ item.value }}</span>
+        </div>
+      </div>
+
+      <div v-if="errorMessage" class="error-message">
+        <el-icon><Warning /></el-icon>
+        <span>{{ errorMessage }}</span>
+      </div>
+    </div>
+
+    <template #footer>
+      <span class="dialog-footer">
+        <el-button @click="handleClose">鍙栨秷</el-button>
+        <el-button
+          type="primary"
+          :loading="loading"
+          @click="handleConfirm"
+        >
+          纭鎵ц
+        </el-button>
+      </span>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+import { defineComponent, ref, computed, watch } from 'vue';
+import { Warning } from '@element-plus/icons-vue';
+
+/**
+ * MES纭瀵硅瘽妗嗙粍浠�
+ * 鐢ㄤ簬鍦ㄦ墽琛孧ES鎿嶄綔锛堣繘绔�/鍑虹珯/缁戝畾/瑙g粦/NG涓婃姤锛夊墠鏄剧ず纭淇℃伅
+ */
+export default defineComponent({
+  name: 'MesConfirmDialog',
+
+  components: {
+    Warning
+  },
+
+  props: {
+    modelValue: {
+      type: Boolean,
+      default: false
+    },
+    /**
+     * 鎿嶄綔绫诲瀷: inbound(杩涚珯) | outbound(鍑虹珯) | bind(缁戝畾) | unbind(瑙g粦) | ngReport(NG涓婃姤)
+     */
+    operationType: {
+      type: String,
+      required: true
+    },
+    /**
+     * 鎵樼洏鐮�
+     */
+    palletCode: {
+      type: String,
+      required: true
+    },
+    /**
+     * 搴撳瓨淇℃伅瀵硅薄锛堢敤浜庤繘绔�/鍑虹珯鎿嶄綔锛�
+     */
+    stockInfo: {
+      type: Object,
+      default: null
+    },
+    /**
+     * 搴撳瓨鏄庣粏淇℃伅瀵硅薄锛堢敤浜庣粦瀹�/瑙g粦/NG涓婃姤鎿嶄綔锛�
+     */
+    detailInfo: {
+      type: Object,
+      default: null
+    }
+  },
+
+  emits: ['update:modelValue', 'confirm'],
+
+  setup(props, { emit }) {
+    const visible = ref(false);
+    const loading = ref(false);
+    const errorMessage = ref('');
+
+    // 鐩戝惉modelValue鍙樺寲锛屽悓姝ュ埌visible
+    watch(
+      () => props.modelValue,
+      (newVal) => {
+        visible.value = newVal;
+        // 瀵硅瘽妗嗘墦寮�鏃堕噸缃敊璇俊鎭�
+        if (newVal) {
+          errorMessage.value = '';
+        }
+      },
+      { immediate: true }
+    );
+
+    // 鐩戝惉visible鍙樺寲锛屽悓姝ュ埌modelValue
+    watch(visible, (newVal) => {
+      emit('update:modelValue', newVal);
+    });
+
+    /**
+     * 鎿嶄綔绫诲瀷閰嶇疆鏄犲皠
+     */
+    const operationConfig = {
+      inbound: { title: '鎵樼洏杩涚珯', text: '鎮ㄥ嵆灏嗘墽琛屾墭鐩樿繘绔欐搷浣�' },
+      outbound: { title: '鎵樼洏鍑虹珯', text: '鎮ㄥ嵆灏嗘墽琛屾墭鐩樺嚭绔欐搷浣�' },
+      bind: { title: '鐢佃姱缁戝畾', text: '鎮ㄥ嵆灏嗘墽琛岀數鑺粦瀹氭搷浣�' },
+      unbind: { title: '鐢佃姱瑙g粦', text: '鎮ㄥ嵆灏嗘墽琛岀數鑺В缁戞搷浣�' },
+      ngReport: { title: 'NG涓婃姤', text: '鎮ㄥ嵆灏嗘墽琛孨G鐢佃姱涓婃姤鎿嶄綔' }
+    };
+
+    /**
+     * 瀵硅瘽妗嗘爣棰�
+     */
+    const dialogTitle = computed(() => {
+      return operationConfig[props.operationType]?.title || '纭鎿嶄綔';
+    });
+
+    /**
+     * 鎿嶄綔鎻愮ず鏂囨湰
+     */
+    const operationText = computed(() => {
+      return operationConfig[props.operationType]?.text || '';
+    });
+
+    /**
+     * 鏄剧ず鐨勪俊鎭垪琛�
+     */
+    const displayInfo = computed(() => {
+      const info = [
+        { label: '鎵樼洏鐮�', value: props.palletCode || '-' }
+      ];
+
+      // 濡傛灉鏈夋槑缁嗕俊鎭紝鏄剧ず鐢佃姱鏁伴噺
+      if (props.detailInfo) {
+        info.push({
+          label: '鐢佃姱鏁伴噺',
+          value: props.detailInfo.sfcCount !== undefined ? props.detailInfo.sfcCount : '-'
+        });
+      }
+
+      // 濡傛灉鏈夊簱瀛樹俊鎭紝鍙互鏄剧ず搴撲綅绛変俊鎭�
+      if (props.stockInfo) {
+        info.push({
+          label: '搴撲綅',
+          value: props.stockInfo.location || '-'
+        });
+      }
+
+      return info;
+    });
+
+    /**
+     * 鍏抽棴瀵硅瘽妗�
+     */
+    const handleClose = () => {
+      visible.value = false;
+      errorMessage.value = '';
+      loading.value = false;
+    };
+
+    /**
+     * 纭鎵ц鎿嶄綔
+     * 瑙﹀彂confirm浜嬩欢锛屼紶閫掓搷浣滃洖璋冨拰閿欒澶勭悊鍑芥暟
+     */
+    const handleConfirm = () => {
+      loading.value = true;
+      errorMessage.value = '';
+
+      // 瑙﹀彂confirm浜嬩欢锛屼紶閫掓搷浣滃弬鏁板拰鍥炶皟鍑芥暟
+      emit('confirm', {
+        operationType: props.operationType,
+        palletCode: props.palletCode,
+        stockInfo: props.stockInfo,
+        detailInfo: props.detailInfo,
+        onSuccess: () => {
+          // 鎿嶄綔鎴愬姛锛氬叧闂璇濇骞堕噸缃姸鎬�
+          visible.value = false;
+          loading.value = false;
+          errorMessage.value = '';
+        },
+        onError: (error) => {
+          // 鎿嶄綔澶辫触锛氭樉绀洪敊璇俊鎭苟淇濇寔瀵硅瘽妗嗘墦寮�
+          errorMessage.value = error || '鎿嶄綔澶辫触锛岃閲嶈瘯';
+          loading.value = false;
+        }
+      });
+    };
+
+    return {
+      visible,
+      loading,
+      errorMessage,
+      dialogTitle,
+      operationText,
+      displayInfo,
+      handleClose,
+      handleConfirm
+    };
+  }
+});
+</script>
+
+<style lang="less" scoped>
+.mes-confirm-content {
+  padding: 10px 0;
+}
+
+.operation-text {
+  font-size: 14px;
+  color: #303133;
+  margin-bottom: 20px;
+  font-weight: 500;
+}
+
+.info-section {
+  background: #f8fafc;
+  border-radius: 8px;
+  padding: 16px;
+  margin-bottom: 16px;
+}
+
+.info-row {
+  display: flex;
+  margin-bottom: 12px;
+  font-size: 14px;
+
+  &:last-child {
+    margin-bottom: 0;
+  }
+}
+
+.info-label {
+  color: #909399;
+  width: 80px;
+  flex-shrink: 0;
+}
+
+.info-value {
+  color: #303133;
+  font-weight: 500;
+}
+
+.error-message {
+  display: flex;
+  align-items: center;
+  gap: 8px;
+  padding: 12px;
+  background: #fef0f0;
+  border: 1px solid #fde2e2;
+  border-radius: 6px;
+  color: #f56c6c;
+  font-size: 14px;
+
+  .el-icon {
+    font-size: 18px;
+  }
+}
+</style>

--
Gitblit v1.9.3