Sfoglia il codice sorgente

feat: 优化异常停泊区
- 核对异常,提示需人工手动完成
- 确认无误,提示需要移动料车并放置到对应货位上

liuyanpeng 5 mesi fa
parent
commit
80d8dbf25c

+ 84 - 4
src/agv-process/AbnormalManagement.vue

@@ -52,7 +52,7 @@
         <div class="modal-content-row">
           <div class="modal-text">
             <h3>人工核对</h3>
-            <p>您是否已检查<span class="highlight">【{{ positionName }}】</span>的工装/设备,<br />确认无误并准备取走料车?</p>
+            <p>您是否已检查<span class="highlight">【{{ positionName }}】</span>的工装/设备,<br />请先核对工装/设备是否正确,如果确认无误,请点击【确认无误】按钮,否则请点击【核对异常】按钮。</p>
           </div>
           <div class="modal-icon">
             <div class="icon-box">
@@ -111,7 +111,30 @@
         
         <div class="modal-footer">
           <button class="modal-btn cancel-btn" @click="cancelTask">取消</button>
-          <button class="modal-btn confirm-btn" @click="takeAway">确认取走</button>
+          <button class="modal-btn confirm-btn" @click="showErrorDialog">核对异常</button>
+          <button class="modal-btn take-away-btn" @click="showConfirmDialog">确认无误</button>
+        </div>
+      </div>
+    </div>
+
+    <!-- 通用确认对话框 -->
+    <div v-if="confirmDialog.visible" class="tech-modal-overlay" @click.self="closeConfirmDialog">
+      <div class="tech-modal">
+        <div class="modal-content-row">
+          <div class="modal-text">
+            <h3>{{ confirmDialog.title }}</h3>
+            <p>{{ confirmDialog.content }}</p>
+          </div>
+          <div class="modal-icon">
+            <div class="icon-box">
+              <i :class="confirmDialog.icon" />
+            </div>
+          </div>
+        </div>
+        
+        <div class="modal-footer">
+          <button class="modal-btn cancel-btn" @click="closeConfirmDialog">取消</button>
+          <button class="modal-btn" :class="confirmDialog.action === 'error' ? 'confirm-btn' : 'take-away-btn'" @click="handleConfirm">继续</button>
         </div>
       </div>
     </div>
@@ -143,6 +166,13 @@ const loading = ref(false);
 const stations = ref([]);
 
 const visible = ref(false);
+const confirmDialog = ref({
+    visible: false,
+    title: '',
+    content: '',
+    icon: '',
+    action: null,
+});
 
 const positionName = ref('');
 const positionNo = ref('');
@@ -179,13 +209,14 @@ const openStation = station => {
 };
 
 // 根据还料货位和料车编号生成归还单和调度任务
-const takeAway = async () => {
+const takeAway = async isError => {
 
     loading.value = true;
     try {
         const params = {
             positionNo: positionNo.value,
             taskId: taskId.value,
+            abnormal: isError,
         };
         const res = await takeAwayAbnormalCar(params);
         if (res.errorCode === 0) {
@@ -209,6 +240,45 @@ const cancelTask = () => {
     visible.value = false;
     selectedStation.value = null;
 };
+
+// 显示确认无误对话框
+const showConfirmDialog = () => {
+    confirmDialog.value = {
+        visible: true,
+        title: '确认无误',
+        content: '您需要移动料车并放置到对应货位上,请确认是否继续,确认则点击【继续】按钮,否则请点击【取消】按钮。',
+        icon: 'fas fa-check-circle',
+        action: 'confirm',
+    };
+};
+
+// 显示核对异常对话框
+const showErrorDialog = () => {
+    confirmDialog.value = {
+        visible: true,
+        title: '核对异常',
+        content: '需要您人为介入,手动完成该工装/设备的出入库操作,请确认是否继续,确认则点击【继续】按钮,否则请点击【取消】按钮。',
+        icon: 'fas fa-exclamation-triangle',
+        action: 'error',
+    };
+};
+
+// 关闭确认对话框
+const closeConfirmDialog = () => {
+    confirmDialog.value.visible = false;
+};
+
+// 处理确认按钮点击
+const handleConfirm = async () => {
+    const action = confirmDialog.value.action;
+    confirmDialog.value.visible = false;
+    
+    if (action === 'confirm') {
+        await takeAway(false);
+    } else if (action === 'error') {
+        await takeAway(true);
+    }
+};
 // 获取还料位数据
 const getStations = async () => {
     loading.value = true;
@@ -529,7 +599,7 @@ onMounted(() => {
 }
 
 .confirm-btn {
-  background: linear-gradient(90deg, #1e90ff 0%, #00bfff 100%);
+  background: linear-gradient(90deg, #dc3545 0%, #ff6b6b 100%);
   border: none;
   color: #fff;
 }
@@ -538,6 +608,16 @@ onMounted(() => {
   box-shadow: 0 0 20px rgba(30, 144, 255, 0.5);
 }
 
+.take-away-btn {
+   background: linear-gradient(90deg, #1e90ff 0%, #00bfff 100%);
+  border: none;
+  color: #fff;
+}
+
+.take-away-btn:hover {
+  box-shadow: 0 0 20px rgba(30, 144, 255, 0.5);
+}
+
 /* ========== RFID详细信息样式 ========== */
 .rfid-details {
   padding: 0 30px 20px;

+ 1 - 1
src/gate/ControlGate.vue

@@ -73,7 +73,7 @@
           </button>
 
           <!-- 左闸机开门 -->
-          <button class="control-btn left-btn" :disabled="loading" @click="handleControl('SHOTOPEN', '闸机开', false)">
+          <button class="control-btn left-btn" :disabled="loading" @click="handleControl('SHOTOPEN', '闸机开', false)">
             <div class="btn-icon">
               <i class="fas fa-arrow-left" />
             </div>

+ 1 - 1
src/stock-in/InConfirm.vue

@@ -373,7 +373,7 @@ onMounted(() => {
         // 将临时数组的数据赋值给epcs
         // 执行获取列表
 
-        // addEpc([ { 'epc': 'FFF000000000000000000001' }, { 'epc': 'FFF000000000000000000002' }]);
+        // addEpc([ { 'epc': 'EEE000000640804317955613' }, { 'epc': 'FFF000000000000000000001' }, { 'epc': 'AAA000000000000000000002' }]);
 
         getList();
     }, 1000);

+ 1 - 19
src/stock-out/OutboundConfirm.vue

@@ -493,25 +493,7 @@ onMounted(() => {
     // 创建全局唯一定时器,每2秒执行一次
     timer = setInterval(() => {
         getStockOutList();
-        // addEpc([{
-        //     'epc': 'FFF000000000000000000001',
-        // },
-        // {
-        //     'epc': 'AAA000000000000000000002',
-        // },
-        // {
-        //     'epc': 'EEE000000637713102889024',
-        // },
-        // {
-        //     'epc': 'EEE000000640804317954113',
-        // },
-        // {
-        //     'epc': 'EEE000000639032505671744',
-        // },
-        // {
-        //     'epc': 'EEE000000640804317955613',
-        // },
-        // ]);
+        // addEpc([ { 'epc': 'EEE000000640804317955613' }, { 'epc': 'FFF000000000000000000001' },{ 'epc': 'AAA000000000000000000002' }]);
     }, 1000);
 });