Browse Source

mod:拍摄完毕,进入下一步处理

panqiuyao 8 months ago
parent
commit
c542726c81
1 changed files with 13 additions and 12 deletions
  1. 13 12
      frontend/src/views/Photography/shot.vue

+ 13 - 12
frontend/src/views/Photography/shot.vue

@@ -92,9 +92,14 @@
             </div>
           </span>
           <img class="divider-line" referrerpolicy="no-referrer" src="@/assets/images/Photography/divider-line.png" />
-          <div class="history-warp">
 
-              <div class="history-item clearfix"  v-for="item,index in goodsList" style="padding:10px;">
+
+
+          <div class="history-warp">
+            <div v-if="!goodsList.length" class="fs-14 c-666 mar-top-50">
+              {{ loading ? '数据正在加载中,请稍候...' : '暂无数据,请先进行拍摄'}}
+            </div>
+              <div v-else class="history-item clearfix"  v-for="item,index in goodsList" style="padding:10px;">
                 <div class="flex  between flex-item  c-333">
                   <div class="chaochu flex-item flex left">货号:{{ item.goods_art_no }}</div>
                   <div class="c-666 fs-12">{{ getTime(item.action_time) }}</div>
@@ -140,15 +145,15 @@
           </div>
 
           <!-- 无数据 -->
-          <!-- <div  class="empty-state flex-col justify-between">
+<!--           <div  class="empty-state flex-col justify-between">
             <img
               class="empty-icon"
               referrerpolicy="no-referrer"
               src="@/assets/images/Photography/empty-state-icon.png"
             />
             <span class="empty-text">暂无数据</span>
-          </div> -->
-          <div @click="loading = !loading" class="next-step button--primary1 flex-col"><span
+          </div>-->
+          <div class="next-step button--primary1 flex-col"><span
               class="next-step-text">拍摄完毕,进入下一步处理</span></div>
         </div>
 
@@ -165,6 +170,7 @@ import { ElMessage ,ElMessageBox } from 'element-plus'
 import { getFilePath } from '@/utils/appfun'
 
 
+const loading = ref(false)
 const clientStore = client();
 
 const  goods_art_no_tpl = ref('')
@@ -186,20 +192,15 @@ function saveGoodsArtNo(){
 //获取拍照记录
 async function getPhotoRecords(params?:{}) {
   clientStore.ipc.removeAllListeners(icpList.takePhoto.getPhotoRecords);
+  loading.true = true;
   clientStore.ipc.send(icpList.takePhoto.getPhotoRecords,{
     ...params,
     page:1,
     size:100,
   });
-  console.log({
-    ...params,
-    page:1,
-    size:100,
-  })
   clientStore.ipc.on(icpList.takePhoto.getPhotoRecords, (event, result) => {
 
-    console.log('getPhotoRecords');
-    console.log(result);
+    loading.true = false;
     clientStore.ipc.removeAllListeners(icpList.takePhoto.getPhotoRecords);
     if(result.code === 0){
       goodsList.value = result.data.list