Browse Source

Merge branch 'feature_20250704_陈列SKU图片识别' into uat(dev)

zhujindu 4 months ago
parent
commit
22c613184a
2 changed files with 101 additions and 87 deletions
  1. 66 64
      src/views/historicalVisit/hisvistdeils.vue
  2. 35 23
      src/views/historicalVisit/skuRecognize.vue

+ 66 - 64
src/views/historicalVisit/hisvistdeils.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div class="hisvistdeils">
     <!--        顶部条-->
     <van-nav-bar class="navBar" title="拜访任务详情" left-arrow @click-left="onClickLeft" />
     <!--right-text="保存"-->
@@ -553,83 +553,85 @@ export default {
   top: 50px;
 }
 </style>
-<style>
-.table-headermd {
-  font-size: 1.2rem;
-  text-align: center;
-  position: initial;
-  width: 94% !important;
-  margin: 0 auto;
-  border-right: 0;
-}
+<style lang="scss">
+.hisvistdeils {
+  .table-headermd {
+    font-size: 1.2rem;
+    text-align: center;
+    position: initial;
+    width: 94% !important;
+    margin: 0 auto;
+    border-right: 0;
+  }
 
-.table-headermd .el-table__header,
-.table-headermd .el-table__body {
-  width: 100% !important;
-}
+  .table-headermd .el-table__header,
+  .table-headermd .el-table__body {
+    width: 100% !important;
+  }
 
-.table-headermd col {
-  width: 5.8rem;
-}
+  .table-headermd col {
+    width: 5.8rem;
+  }
 
-.table-headermd col:nth-child(2),
-.table-headermd col:nth-child(4),
-.table-headermd col:nth-child(3) {
-  width: 5rem;
-}
+  .table-headermd col:nth-child(2),
+  .table-headermd col:nth-child(4),
+  .table-headermd col:nth-child(3) {
+    width: 5rem;
+  }
 
-.table-headermd .van-cell {
-  padding: 0 4px;
-  height: 100%;
-}
+  .table-headermd .van-cell {
+    padding: 0 4px;
+    height: 100%;
+  }
 
-.table-headermd th.el-table__cell > .cell {
-  padding: 0 4px;
-}
+  .table-headermd th.el-table__cell > .cell {
+    padding: 0 4px;
+  }
 
-.table-headermd th.el-table__cell {
-  background-color: #1989fa;
-  color: #fff;
-}
+  .table-headermd th.el-table__cell {
+    background-color: #1989fa;
+    color: #fff;
+  }
 
-.table-headermd .el-table__cell {
-  padding: 4px 0;
-}
+  .table-headermd .el-table__cell {
+    padding: 4px 0;
+  }
 
-.table-headermd .tipTitle {
-  overflow: hidden;
-  text-overflow: ellipsis;
-  display: -webkit-box;
-  -webkit-box-orient: vertical;
-  -webkit-line-clamp: 2;
-}
+  .table-headermd .tipTitle {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-box-orient: vertical;
+    -webkit-line-clamp: 2;
+  }
 
-.table-headermd::before {
-  height: 0;
-}
+  .table-headermd::before {
+    height: 0;
+  }
 
-.f-right {
-  text-align: right;
-  margin: 0;
-}
+  .f-right {
+    text-align: right;
+    margin: 0;
+  }
 
-.mg0 {
-  margin: 6px 10px;
-  color: #909090;
-  font-size: 14px;
-}
+  .mg0 {
+    margin: 6px 10px;
+    color: #909090;
+    font-size: 14px;
+  }
 
-.selesetText {
-  margin-bottom: 16px;
-}
+  .selesetText {
+    margin-bottom: 16px;
+  }
 
-.z-cells .van-cell__title {
-  font-weight: bold;
-  color: #4a4a4a;
-}
+  .z-cells .van-cell__title {
+    font-weight: bold;
+    color: #4a4a4a;
+  }
 
-.z-cells .van-cell {
-  padding-bottom: 0;
+  .z-cells .van-cell {
+    padding-bottom: 0;
+  }
 }
 </style>
 <style>

+ 35 - 23
src/views/historicalVisit/skuRecognize.vue

@@ -2,12 +2,13 @@
   <div class="skuRecognize">
     <van-nav-bar class="navBar" title="拜访任务详情" left-arrow @click-left="onClickLeft">
       <template #right>
-        <div
+        <van-button
+          style="height: 30px; padding: 5px; border-radius: 5px"
+          type="info"
           v-if="detail && detail.skuPhotoIdentifyId"
-          class="feedback"
-          @click="feedbackShow = true">
-          识别异常反馈
-        </div>
+          @click="feedbackShow = true"
+          >识别异常反馈</van-button
+        >
       </template>
     </van-nav-bar>
     <div class="content" v-if="detail">
@@ -23,7 +24,7 @@
         </van-row>
       </div>
       <div class="skuDeatil" v-if="detail.skuList">
-        <div class="tableTitle">SKU识别:{{ detail.skuTotal }}个</div>
+        <div class="tableTitle">SKU图像识别结果:{{ detail.skuTotal }}个</div>
         <el-table
           :data="detail.skuList"
           style="width: 100%; border-radius: 10px"
@@ -69,6 +70,7 @@
           rows="2"
           autosize
           type="textarea"
+          :formatter="formatter"
           placeholder="若识别SKU有遗漏、缺失,请在此反馈,本部会根据实际情况优化模型,谢谢!" />
       </div>
       <div class="btnBox">
@@ -138,6 +140,12 @@ export default {
         startPosition: index,
       });
     },
+    formatter(value) {
+      return value.replace(
+        /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,
+        ''
+      );
+    },
     onClickLeft() {
       this.$router.go(-1);
     },
@@ -162,7 +170,7 @@ export default {
       padding-bottom: 10px;
     }
     .tipsTitle {
-      font-size: 14px;
+      font-size: 12px;
       padding-bottom: 10px;
     }
     .tableTitle {
@@ -172,22 +180,6 @@ export default {
       background: #f5f5f5;
     }
     .skuDeatil {
-      .table-headermd {
-        font-size: 12px;
-        text-align: center;
-        position: initial;
-        width: 98% !important;
-        margin: 0 auto;
-        border-right: 0;
-        border-radius: 10px;
-        .el-table__cell {
-          padding: 6px 0 !important;
-        }
-      }
-      .table-headermd th.el-table__cell {
-        background-color: #1989fa;
-        color: #fff;
-      }
     }
     .feedbackHistorical {
       .historicalContent {
@@ -255,3 +247,23 @@ export default {
   }
 }
 </style>
+<style lang="scss">
+.skuDeatil {
+  .table-headermd {
+    font-size: 12px;
+    text-align: center;
+    position: initial;
+    width: 98% !important;
+    margin: 0 auto;
+    border-right: 0;
+    border-radius: 10px;
+    .el-table__cell {
+      padding: 6px 0 !important;
+    }
+  }
+  .table-headermd th.el-table__cell {
+    background-color: #1989fa;
+    color: #fff;
+  }
+}
+</style>