liuyanpeng vor 1 Jahr
Ursprung
Commit
7b45b95739

+ 1 - 1
package.json

@@ -1,7 +1,7 @@
 {
   "name": "client-eam-v3",
   "description": "Leanwo Prodog Client",
-  "version": "3.0.92",
+  "version": "3.0.93",
   "author": "yangzhijie1488 <yangzhijie1488@163.com>",
   "scripts": {
     "ins": "npm install --registry=http://wuzhixin.vip:4873",

+ 100 - 144
src/components/customer/AssetInstanceSearchDetail.vue

@@ -4,22 +4,16 @@
       <div class="row">
         <div class="col-md-12">
           <h1 class="page-header" style="margin-top: 10px; margin-bottom: 0px">
-            <AuthImage
-              :auth-src="
-                Common.getThumbnailImageSrc(
-                  assetClassName,
-                  showAssetInstance.imageName
-                )
-              "
-              class="image img-thumbnail"
-              style="width: 78px; height: 78px"
-              @click="
+            <AuthImage :auth-src="Common.getThumbnailImageSrc(
+              assetClassName,
+              showAssetInstance.imageName
+            )
+              " class="image img-thumbnail" style="width: 78px; height: 78px" @click="
                 $refs.imagePreview.preview(
                   assetClassName,
                   showAssetInstance.imageName
                 )
-              "
-            />
+                " />
 
             {{ $t("lang.AssetInstanceSearchDetail.assetCardDetails") }}
           </h1>
@@ -307,8 +301,8 @@
                   "lang.AssetInstanceSearchDetail.theAmountOfDepreciationIsWithdrawnThisMonth"
                 )
               }}:{{
-                showAssetInstance.depreciationValueForCurrentMonth
-              }}</strong>
+                  showAssetInstance.depreciationValueForCurrentMonth
+                }}</strong>
             </div>
           </div>
           <div class="col-md-3">
@@ -353,10 +347,10 @@
                   "lang.AssetInstanceSearchDetail.necessaryToMakeAnAppointment"
                 )
               }}:{{
-                showAssetInstance.isNeedAppointment == true
-                  ? $t("lang.AssetInstanceSearchDetail.true")
-                  : $t("lang.AssetInstanceSearchDetail.false")
-              }}</strong>
+                  showAssetInstance.isNeedAppointment == true
+                    ? $t("lang.AssetInstanceSearchDetail.true")
+                    : $t("lang.AssetInstanceSearchDetail.false")
+                }}</strong>
             </div>
           </div>
           <div class="col-md-3">
@@ -539,17 +533,10 @@
           <div class="tab-content div-asset-info">
             <div id="asset-content-1" class="tab-pane fade in active">
               <div v-if="historyEvents != null" class="row div-history-event">
-                <div
-                  v-for="item in historyEvents"
-                  :key="item.id"
-                  class="media col-md-12"
-                >
+                <div v-for="item in historyEvents" :key="item.id" class="media col-md-12">
                   <div class="media-left">
                     <a href="javascript:void(0);">
-                      <img
-                        class="media-object media-img img-thumbnail"
-                        :src="getHistoryIconSrc(item.title)"
-                      />
+                      <img class="media-object media-img img-thumbnail" :src="getHistoryIconSrc(item.title)" />
                     </a>
                   </div>
                   <div class="media-body">
@@ -580,11 +567,7 @@
                   }}</label>
                   <DateTime v-model="endDate" name="datetime" />
                 </div>
-                <button
-                  type="button"
-                  class="btn btn-default"
-                  @click="getAssetImageInfosByEpc"
-                >
+                <button type="button" class="btn btn-default" @click="getAssetImageInfosByEpc">
                   {{ $t("lang.AssetInstanceSearchDetail.determine") }}
                 </button>
               </div>
@@ -608,10 +591,7 @@
                       <td>{{ item.date }}</td>
                       <td>{{ item.location }}</td>
                       <td>
-                        <button
-                          class="btn btn-primary"
-                          @click="showImageUrl(item)"
-                        >
+                        <button class="btn btn-primary" @click="showImageUrl(item)">
                           {{ $t("lang.AssetInstanceSearchDetail.picture") }}
                         </button>
                       </td>
@@ -622,11 +602,8 @@
               <div>
                 <div class="form-group">
                   <div class="pull-right">
-                    <Pagination
-                      v-if="pagination2.last_page > 0"
-                      :pagination="pagination2"
-                      :callback="getAssetImageInfosByEpc"
-                    />
+                    <Pagination v-if="pagination2.last_page > 0" :pagination="pagination2"
+                      :callback="getAssetImageInfosByEpc" />
                   </div>
                 </div>
               </div>
@@ -725,11 +702,7 @@
                   }}</label>
                   <DateTime v-model="searchEndDate" name="datetime" />
                 </div>
-                <button
-                  type="button"
-                  class="btn btn-default"
-                  @click="getAssetInstanceRfidRecordByDate"
-                >
+                <button type="button" class="btn btn-default" @click="getAssetInstanceRfidRecordByDate">
                   {{ $t("lang.AssetInstanceSearchDetail.determine") }}
                 </button>
               </div>
@@ -756,15 +729,12 @@
                     </tr>
                   </thead>
                   <tbody>
-                    <tr
-                      v-for="(item, index) in assetInstanceRfidRecords"
-                      :key="item.id"
-                    >
+                    <tr v-for="(item, index) in assetInstanceRfidRecords" :key="item.id">
                       <td>
                         {{
                           index +
-                            1 +
-                            (pagination.current_page - 1) * pagination.per_page
+                          1 +
+                          (pagination.current_page - 1) * pagination.per_page
                         }}
                       </td>
                       <td>{{ item.scanDate }}</td>
@@ -772,16 +742,11 @@
                       <td>{{ item.position }}</td>
                       <td>{{ item.type }}</td>
                       <td>
-                        <AuthImage
-                          :auth-src="
-                            showRfidRecordThumbnailImage(
-                              item.className,
-                              item.image
-                            )
-                          "
-                          style="width: 80px; height: 50px"
-                          @click="getImage(item.className, item.image)"
-                        />
+                        <AuthImage :auth-src="showRfidRecordThumbnailImage(
+                          item.className,
+                          item.image
+                        )
+                          " style="width: 80px; height: 50px" @click="getImage(item.className, item.image)" />
                       </td>
                     </tr>
                   </tbody>
@@ -795,11 +760,8 @@
                     }}{{ $t("lang.AssetInstanceSearchDetail.data") }}
                   </div>
                   <div class="pull-right">
-                    <VueBootstrapPagination
-                      v-if="pagination.last_page > 0"
-                      :pagination="pagination"
-                      :callback="getAssetInstanceRfidRecord"
-                    />
+                    <VueBootstrapPagination v-if="pagination.last_page > 0" :pagination="pagination"
+                      :callback="getAssetInstanceRfidRecord" />
                   </div>
                 </div>
               </div>
@@ -873,17 +835,9 @@
     <Modal v-model:show="modal" large="true" @cancel="modal = false">
       <template #header> 历史图片 </template>
       <div class="rowTest">
-        <div
-          v-for="item in imageUrlTest"
-          :key="item.id"
-          style="width: 200px; height: 200px"
-        >
-          <img
-            :authSrc="showThumbnailImage(item)"
-            class="m-image"
-            style="width: 200px; height: 200px"
-            @click="$refs.imagePreview.previewImage(showImage(item))"
-          />
+        <div v-for="item in imageUrlTest" :key="item.id" style="width: 200px; height: 200px">
+          <img :authSrc="showThumbnailImage(item)" class="m-image" style="width: 200px; height: 200px"
+            @click="$refs.imagePreview.previewImage(showImage(item))" />
         </div>
       </div>
     </Modal>
@@ -1011,9 +965,9 @@ export default {
     openCurdWindow: function (assetInstance) {
       let url = Common.getRedirectUrl(
         '#/desktop/window/window-read/view/040701/0/' +
-          assetInstance.assetInstanceId +
-          '?currPage=1&currIndex=1&totalCount=1&uuid=' +
-          Uuid.createUUID(),
+        assetInstance.assetInstanceId +
+        '?currPage=1&currIndex=1&totalCount=1&uuid=' +
+        Uuid.createUUID(),
       );
       window.open(url, '资产卡片');
     },
@@ -1074,12 +1028,12 @@ export default {
       $('#ImgZoomInImage').css(
         'left',
         $(window).scrollLeft() +
-          ($(window).width() - $('#ImgZoomInImage').width()) / 2,
+        ($(window).width() - $('#ImgZoomInImage').width()) / 2,
       );
       $('#ImgZoomInImage').css(
         'top',
         $(window).scrollTop() +
-          ($(window).height() - $('#ImgZoomInImage').height()) / 2,
+        ($(window).height() - $('#ImgZoomInImage').height()) / 2,
       );
       $('#ImgZoomInBG').show();
       $('#ImgZoomInImage').show();
@@ -1262,6 +1216,7 @@ export default {
      * 返回缩略图的路径
      */
     showThumbnailImage: function (imageName) {
+      if (!imageName) return
       //return this.imageServerBaseUrl + "\\" + imageName;
       //usb摄像头
       var newImages = imageName.split('\\');
@@ -1287,7 +1242,7 @@ export default {
       }
       return Common.getThumbnailImageSrc(className, imageName);
     },
-    
+
     /**
      * 返回预览图的路径
      */
@@ -1302,6 +1257,7 @@ export default {
      * 返回大图的路径
      */
     showImage: function (imageName) {
+      if (!imageName) return;
       //return this.imageServerBaseUrl + "\\" + imageName;
       //usb摄像头
       var newImages = imageName.split('\\');
@@ -1371,66 +1327,66 @@ export default {
     getHistoryIconSrc: function (title) {
       var iconSrc = '/static/assets/client-eam/image-asset-instance-change/';
       switch (title) {
-      case '资产盘点':
-        iconSrc += 'inventory.png';
-        break;
-      case '资产归还':
-        iconSrc += 'stockin.png';
-        break;
-      case '资产领用':
-        iconSrc += 'stockout.png';
-        break;
-      case '资产报失':
-        iconSrc += 'lost.png';
-        break;
-      case '资产报失找回':
-        iconSrc += 'lostReteieve.png';
-        break;
-      case '资产保养':
-        iconSrc += 'maintain.png';
-        break;
-      case '资产维修':
-        iconSrc += 'repair.png';
-        break;
-      case '资产卡片报废':
-        iconSrc += 'scrap.png';
-        break;
-      case '资产计量':
-        iconSrc += 'count.png';
-        break;
-      case '类别调整':
-        iconSrc += 'category.png';
-        break;
-      case '资产基础信息调整':
-        iconSrc += 'assetInstance.png';
-        break;
-      case '位置调整':
-        iconSrc += 'assetLocation.png';
-        break;
-      case '部门转移':
-        iconSrc += 'organization.jpg';
-        break;
-      case '项目调整':
-        iconSrc += 'projectAdjust.png';
-        break;
-      case '资产编号调整':
-        iconSrc += 'numberAdjustment.png';
-        break;
-      case '残值率调整':
-        iconSrc += 'resizingRateAdjustment.png';
-        break;
-      case '折旧方法调整':
-        iconSrc += 'depreciationMethodAdjustment.png';
-        break;
-      case '人员调整':
-        iconSrc += 'personnelAdjustment.png';
-        break;
-      case '原值减少':
-        iconSrc += 'originalCostReduction.png';
-        break;
-      case '原值增加':
-        iconSrc += 'originalCostIncreases.png';
-        break;
+        case '资产盘点':
+          iconSrc += 'inventory.png';
+          break;
+        case '资产归还':
+          iconSrc += 'stockin.png';
+          break;
+        case '资产领用':
+          iconSrc += 'stockout.png';
+          break;
+        case '资产报失':
+          iconSrc += 'lost.png';
+          break;
+        case '资产报失找回':
+          iconSrc += 'lostReteieve.png';
+          break;
+        case '资产保养':
+          iconSrc += 'maintain.png';
+          break;
+        case '资产维修':
+          iconSrc += 'repair.png';
+          break;
+        case '资产卡片报废':
+          iconSrc += 'scrap.png';
+          break;
+        case '资产计量':
+          iconSrc += 'count.png';
+          break;
+        case '类别调整':
+          iconSrc += 'category.png';
+          break;
+        case '资产基础信息调整':
+          iconSrc += 'assetInstance.png';
+          break;
+        case '位置调整':
+          iconSrc += 'assetLocation.png';
+          break;
+        case '部门转移':
+          iconSrc += 'organization.jpg';
+          break;
+        case '项目调整':
+          iconSrc += 'projectAdjust.png';
+          break;
+        case '资产编号调整':
+          iconSrc += 'numberAdjustment.png';
+          break;
+        case '残值率调整':
+          iconSrc += 'resizingRateAdjustment.png';
+          break;
+        case '折旧方法调整':
+          iconSrc += 'depreciationMethodAdjustment.png';
+          break;
+        case '人员调整':
+          iconSrc += 'personnelAdjustment.png';
+          break;
+        case '原值减少':
+          iconSrc += 'originalCostReduction.png';
+          break;
+        case '原值增加':
+          iconSrc += 'originalCostIncreases.png';
+          break;
       }
       return iconSrc;
     },

+ 202 - 246
src/components/customer/AssetInstanceSearchDetailV2.vue

@@ -5,22 +5,18 @@
         <div class="col-md-12">
           <h1 class="page-header" style="margin-top: 10px; margin-bottom: 0px">
             <AuthImage
-              :auth-src="
-                Common.getThumbnailImageSrc(
-                  assetClassName,
-                  showAssetInstance.imageName
-                )
-              "
-              class="image img-thumbnail"
-              style="width: 78px; height: 78px"
-              @click="
+              :auth-src="Common.getThumbnailImageSrc(
+                assetClassName,
+                showAssetInstance.imageName
+              )
+              " class="image img-thumbnail" style="width: 78px; height: 78px" @click="
                 $refs.imagePreview.preview(
                   assetClassName,
                   showAssetInstance.imageName
                 )
               "
             />
-  
+
             {{ $t("lang.AssetInstanceSearchDetail.assetCardDetails") }}
           </h1>
         </div>
@@ -503,12 +499,15 @@
           </div>
           <div class="col-md-3">
             <div>
-              <strong>父设备名称:</strong><a-button type="link" @click="openParentCurd(showAssetInstance.parentId)">{{ showAssetInstance.parentName }}</a-button>
+              <strong>父设备名称:</strong><a-button type="link" @click="openParentCurd(showAssetInstance.parentId)">
+                {{
+                  showAssetInstance.parentName }}
+              </a-button>
             </div>
           </div>
         </div>
       </div>
-  
+
       <div class="row">
         <div class="col-md-12 div-asset-info">
           <ul id="myTab" class="nav nav-tabs">
@@ -544,17 +543,10 @@
           <div class="tab-content div-asset-info">
             <div id="asset-content-1" class="tab-pane fade in active">
               <div v-if="historyEvents != null" class="row div-history-event">
-                <div
-                  v-for="item in historyEvents"
-                  :key="item.id"
-                  class="media col-md-12"
-                >
+                <div v-for="item in historyEvents" :key="item.id" class="media col-md-12">
                   <div class="media-left">
                     <a href="javascript:void(0);">
-                      <img
-                        class="media-object media-img img-thumbnail"
-                        :src="getHistoryIconSrc(item.title)"
-                      />
+                      <img class="media-object media-img img-thumbnail" :src="getHistoryIconSrc(item.title)" />
                     </a>
                   </div>
                   <div class="media-body">
@@ -585,11 +577,7 @@
                   }}</label>
                   <DateTime v-model="endDate" name="datetime" />
                 </div>
-                <button
-                  type="button"
-                  class="btn btn-default"
-                  @click="getAssetImageInfosByEpc"
-                >
+                <button type="button" class="btn btn-default" @click="getAssetImageInfosByEpc">
                   {{ $t("lang.AssetInstanceSearchDetail.determine") }}
                 </button>
               </div>
@@ -613,10 +601,7 @@
                       <td>{{ item.date }}</td>
                       <td>{{ item.location }}</td>
                       <td>
-                        <button
-                          class="btn btn-primary"
-                          @click="showImageUrl(item)"
-                        >
+                        <button class="btn btn-primary" @click="showImageUrl(item)">
                           {{ $t("lang.AssetInstanceSearchDetail.picture") }}
                         </button>
                       </td>
@@ -628,8 +613,7 @@
                 <div class="form-group">
                   <div class="pull-right">
                     <Pagination
-                      v-if="pagination2.last_page > 0"
-                      :pagination="pagination2"
+                      v-if="pagination2.last_page > 0" :pagination="pagination2"
                       :callback="getAssetImageInfosByEpc"
                     />
                   </div>
@@ -730,11 +714,7 @@
                   }}</label>
                   <DateTime v-model="searchEndDate" name="datetime" />
                 </div>
-                <button
-                  type="button"
-                  class="btn btn-default"
-                  @click="getAssetInstanceRfidRecordByDate"
-                >
+                <button type="button" class="btn btn-default" @click="getAssetInstanceRfidRecordByDate">
                   {{ $t("lang.AssetInstanceSearchDetail.determine") }}
                 </button>
               </div>
@@ -761,10 +741,7 @@
                     </tr>
                   </thead>
                   <tbody>
-                    <tr
-                      v-for="(item, index) in assetInstanceRfidRecords"
-                      :key="item.id"
-                    >
+                    <tr v-for="(item, index) in assetInstanceRfidRecords" :key="item.id">
                       <td>
                         {{
                           index +
@@ -778,11 +755,8 @@
                       <td>{{ item.type }}</td>
                       <td>
                         <AuthImage
-                          :auth-src="
-                            getRecordPicture(item.position, item.image)
-                          "
-                          style="width: 80px; height: 50px"
-                          @click="getImage(item.position, item.image)"
+                          :auth-src="getRecordPicture(item.position, item.image)
+                          " style="width: 80px; height: 50px" @click="getImage(item.position, item.image)"
                         />
                       </td>
                     </tr>
@@ -798,8 +772,7 @@
                   </div>
                   <div class="pull-right">
                     <VueBootstrapPagination
-                      v-if="pagination.last_page > 0"
-                      :pagination="pagination"
+                      v-if="pagination.last_page > 0" :pagination="pagination"
                       :callback="getAssetInstanceRfidRecord"
                     />
                   </div>
@@ -809,34 +782,23 @@
             <div id="asset-content-6" class="tab-pane fade in">
               <div style="margin-bottom: 8px">
                 <label>资产名称:</label><a-input
-                  v-model:value="childrenName"
-                  style="width: 20%"
+                  v-model:value="childrenName" style="width: 20%"
                   @press-enter="queryAssetChildren"
                 />
                 <label>资产编号:</label><a-input
-                  v-model:value="childrenNo"
-                  style="width: 20%"
+                  v-model:value="childrenNo" style="width: 20%"
                   @press-enter="queryAssetChildren"
                 />
                 <label>唯一识别号:</label><a-input
-                  v-model:value="childrenNumber"
-                  style="width: 20%"
+                  v-model:value="childrenNumber" style="width: 20%"
                   @press-enter="queryAssetChildren"
                 />
-                <button
-                  type="button"
-                  class="btn btn-default"
-                  style="margin-top: -6px"
-                  @click="queryAssetChildren"
-                >
+                <button type="button" class="btn btn-default" style="margin-top: -6px" @click="queryAssetChildren">
                   查询
                 </button>
               </div>
               <div class="table-responsive" style="height: 400px">
-                <table
-                  style="overflow: scroll; overflow-y: auto"
-                  class="table table-striped table-bordered"
-                >
+                <table style="overflow: scroll; overflow-y: auto" class="table table-striped table-bordered">
                   <thead>
                     <tr height="40px">
                       <th>序号</th>
@@ -847,11 +809,7 @@
                     </tr>
                   </thead>
                   <tbody>
-                    <tr
-                      v-for="(item, index) in allAssetChildren"
-                      :key="item.id"
-                      @dblclick="openCurdWindow(item)"
-                    >
+                    <tr v-for="(item, index) in allAssetChildren" :key="item.id" @dblclick="openCurdWindow(item)">
                       <td>
                         {{
                           index +
@@ -875,34 +833,28 @@
     <Modal v-model:show="modal" large="true" @cancel="modal = false">
       <template #header> 历史图片 </template>
       <div class="rowTest">
-        <div
-          v-for="item in imageUrlTest"
-          :key="item.id"
-          style="width: 200px; height: 200px"
-        >
+        <div v-for="item in imageUrlTest" :key="item.id" style="width: 200px; height: 200px">
           <img
-            :authSrc="showThumbnailImage(item)"
-            class="m-image"
-            style="width: 200px; height: 200px"
+            :authSrc="showThumbnailImage(item)" class="m-image" style="width: 200px; height: 200px"
             @click="$refs.imagePreview.previewImage(showImage(item))"
           />
         </div>
       </div>
     </Modal>
-  
+
     <ImagePreview ref="imagePreview" />
     <Loading v-if="loading" />
   </div>
 </template>
-  
+
 <script>
 import Common from '../../common/Common.js';
 import { Notify, Uuid } from 'pc-component-v3';
 import AuthImage from '../../widget/AuthImage.vue';
 import dayjs from 'dayjs';
-  
+
 import AssetInstanceRfidRecordResource from '../../api/asset/AssetInstanceRfidRecordResource.js';
-  
+
 export default {
   components: {
     AuthImage,
@@ -958,11 +910,11 @@ export default {
       allAssetChildren: [],
     };
   },
-  
+
   computed: {},
-  
+
   watch: {},
-  
+
   mounted: function () {
     var _self = this;
     _self.assetInstanceId = _self.$route.query.assetInstanceId;
@@ -971,11 +923,11 @@ export default {
     this.getCameraNo();
     $('#right-container').css('background-color', '#ffffff');
   },
-  
+
   beforeUnmount: function () {
     $('#right-container').css('background-color', '#f7f7f7');
   },
-  
+
   methods: {
     // 查询子资产清单
     queryAssetChildren: function () {
@@ -1012,12 +964,12 @@ export default {
        * 打开资产卡片的CURD窗口
        */
     openParentCurd: function (parentId) {
-      if(parentId){
+      if (parentId) {
         let url = Common.getRedirectUrl(
           '#/desktop/window/window-read/view/040701/0/' +
-            parentId +
-              '?currPage=1&currIndex=1&totalCount=1&uuid=' +
-              Uuid.createUUID(),
+          parentId +
+          '?currPage=1&currIndex=1&totalCount=1&uuid=' +
+          Uuid.createUUID(),
         );
         window.open(url, '资产卡片');
       }
@@ -1025,13 +977,14 @@ export default {
     openCurdWindow: function (assetInstance) {
       let url = Common.getRedirectUrl(
         '#/desktop/window/window-read/view/040701/0/' +
-            assetInstance.assetInstanceId +
-            '?currPage=1&currIndex=1&totalCount=1&uuid=' +
-            Uuid.createUUID(),
+        assetInstance.assetInstanceId +
+        '?currPage=1&currIndex=1&totalCount=1&uuid=' +
+        Uuid.createUUID(),
       );
       window.open(url, '资产卡片');
     },
     getImage: function (position, imageName) {
+      if (!imageName) return;
       // const url = this.showBigImage(className, imageName);
       let encodedImageName = imageName.replace(/\\/g, '%5C');
       let url = `api/CaptureResource/getPropassPicture?position=${position}&image=${encodedImageName}`;
@@ -1044,39 +997,39 @@ export default {
       wdate.setMonth(wdate.getMonth() - 1);
       var y = wdate.getFullYear();
       var m =
-          wdate.getMonth() + 1 < 10
-            ? '0' + (wdate.getMonth() + 1)
-            : wdate.getMonth() + 1;
+        wdate.getMonth() + 1 < 10
+          ? '0' + (wdate.getMonth() + 1)
+          : wdate.getMonth() + 1;
       var d = wdate.getDate() < 10 ? '0' + wdate.getDate() : wdate.getDate();
       var h =
-          (wdate.getHours() < 10 ? '0' + wdate.getHours() : wdate.getHours()) +
-          ':';
+        (wdate.getHours() < 10 ? '0' + wdate.getHours() : wdate.getHours()) +
+        ':';
       var mm =
-          (wdate.getMinutes() < 10
-            ? '0' + wdate.getMinutes()
-            : wdate.getMinutes()) + ':';
+        (wdate.getMinutes() < 10
+          ? '0' + wdate.getMinutes()
+          : wdate.getMinutes()) + ':';
       var dd =
-          wdate.getSeconds() < 10 ? '0' + wdate.getSeconds() : wdate.getSeconds();
+        wdate.getSeconds() < 10 ? '0' + wdate.getSeconds() : wdate.getSeconds();
       var formatwdate = y + '-' + m + '-' + d + ' ' + h + mm + dd;
       console.log('前一个月的时间' + formatwdate);
       _self.eventOriginalEndDate = dayjs().format('YYYY-MM-DD HH:mm:ss');
       _self.eventOriginalStartDate = formatwdate;
     },
-  
+
     //放大图片
     enlargeImg: function (event, item) {
       var _self = this;
       var imageSrc = Common.getFileServerUrl() + 'Files\\UsbCamera\\' + item;
       // eslint-disable-next-line
-        var bgstr =
-          // eslint-disable-next-line
-          '<div id="ImgZoomInBG" style=" background:#000000; filter:Alpha(Opacity=70); opacity:0.7; position:fixed; left:0; top:0; z-index:10000; width:100%; height:100%; display:none;"><iframe src="about:blank" frameborder="5px" scrolling="yes" style="width:100%; height:100%;"></iframe></div>';
-        //				alert($(event.target).attr('src'));
-  
+      var bgstr =
+        // eslint-disable-next-line
+        '<div id="ImgZoomInBG" style=" background:#000000; filter:Alpha(Opacity=70); opacity:0.7; position:fixed; left:0; top:0; z-index:10000; width:100%; height:100%; display:none;"><iframe src="about:blank" frameborder="5px" scrolling="yes" style="width:100%; height:100%;"></iframe></div>';
+      //				alert($(event.target).attr('src'));
+
       var imgstr =
-          '<img id="ImgZoomInImage" src="' +
-          imageSrc +
-          '" onclick=$(\'#ImgZoomInImage\').hide();$(\'#ImgZoomInBG\').hide(); style="cursor:pointer; display:none; position:absolute; z-index:10001;" />';
+        '<img id="ImgZoomInImage" src="' +
+        imageSrc +
+        '" onclick=$(\'#ImgZoomInImage\').hide();$(\'#ImgZoomInBG\').hide(); style="cursor:pointer; display:none; position:absolute; z-index:10001;" />';
       if ($('#ImgZoomInBG').length < 1) {
         $('body').append(bgstr);
       }
@@ -1090,17 +1043,17 @@ export default {
       $('#ImgZoomInImage').css(
         'left',
         $(window).scrollLeft() +
-            ($(window).width() - $('#ImgZoomInImage').width()) / 2,
+        ($(window).width() - $('#ImgZoomInImage').width()) / 2,
       );
       $('#ImgZoomInImage').css(
         'top',
         $(window).scrollTop() +
-            ($(window).height() - $('#ImgZoomInImage').height()) / 2,
+        ($(window).height() - $('#ImgZoomInImage').height()) / 2,
       );
       $('#ImgZoomInBG').show();
       $('#ImgZoomInImage').show();
     },
-  
+
     findAssetInstance: function (assetInstanceId) {
       var _self = this;
       $.ajax({
@@ -1125,7 +1078,7 @@ export default {
         },
       });
     },
-  
+
     /**
        * 显示资产卡片详细信息
        */
@@ -1133,24 +1086,24 @@ export default {
       this.showAssetInstance = assetInstance;
       // 查询生命周期数据
       this.getHistoryEvent();
-  
+
       // 查询历史位置
       this.getAssetImageInfosByEpc();
-  
+
       // 查询进出记录
       this.getAssetInstanceRfidRecord();
-  
+
       // 查询历史位置1
       // this.queryPageSingleEpcOriginalByTime();
     },
-  
+
     // 查询历史位置
     getAssetImageInfosByEpc: function () {
       var _self = this;
       var sendData = {
         epc: _self.showAssetInstance.epc,
         start:
-            (_self.pagination2.current_page - 1) * _self.pagination2.per_page,
+          (_self.pagination2.current_page - 1) * _self.pagination2.per_page,
         length: _self.pagination2.per_page,
       };
       if (_self.startDate != null && _self.startDate.length > 0) {
@@ -1183,7 +1136,7 @@ export default {
         },
       });
     },
-  
+
     /**
        * 查询资产进出数据
        * @author LeiGuoXian
@@ -1215,7 +1168,7 @@ export default {
         },
       );
     },
-  
+
     /**
        * 根据开始时间结束时间进行查询
        * @author LeiGuoXian
@@ -1226,14 +1179,14 @@ export default {
       _self.pagination.current_page = 1;
       _self.getAssetInstanceRfidRecord();
     },
-  
+
     //去掉地点相同的位置,保留最后出现的
     getUniqueImageInfos: function (data) {
       var arr = [];
       for (var i = 0; i < data.length; i++) {
         var newItem = data[i];
         var newLocation = newItem.location;
-  
+
         var hasSameLocation = false;
         for (var j = 0; j < arr.length; j++) {
           var oldItem = arr[j];
@@ -1243,13 +1196,13 @@ export default {
             break;
           }
         }
-  
+
         var arrLen = arr.length;
         var lastLocation = undefined;
         if (arrLen >= 1) {
           lastLocation = arr[arrLen - 1].location;
         }
-  
+
         if (!hasSameLocation) {
           arr.push(newItem);
         } else if (hasSameLocation && newLocation != lastLocation) {
@@ -1266,18 +1219,19 @@ export default {
       }
       return arr;
     },
-  
+
     callbackFun: function () {
       if (this.showAssetInstance == undefined || this.showAssetInstance == '') {
         return;
       }
       this.showItem(this.showAssetInstance);
     },
-  
+
     /**
        * 返回缩略图的路径
        */
     showThumbnailImage: function (imageName) {
+      if (!imageName) return;
       //return this.imageServerBaseUrl + "\\" + imageName;
       //usb摄像头
       var newImages = imageName.split('\\');
@@ -1287,19 +1241,20 @@ export default {
       //return Common.getFileServerUrl() + "Files\\UsbCamera\\" + imageName;
       return (
         Common.getFileServerUrl() +
-          'Files\\UsbCamera\\' +
-          newFile +
-          '\\thumbnail\\' +
-          newImage
+        'Files\\UsbCamera\\' +
+        newFile +
+        '\\thumbnail\\' +
+        newImage
       );
     },
-  
+
     getRecordPicture: function (position, imageName) {
+      if (!imageName) return;
       let encodedImageName = imageName.replace(/\\/g, '%5C');
       let url = `api/CaptureResource/getPropassPicture?position=${position}&image=${encodedImageName}`;
       return url;
     },
-  
+
     /**
        * 返回缩略图的路径
        */
@@ -1307,7 +1262,7 @@ export default {
       if (imageName == null) {
         return;
       }
-  
+
       // var accountId = localStorage.getItem('#accountId');
       // var url1 = imageName.substring(0, imageName.indexOf('/'));
       // var url2 = imageName.substring(imageName.indexOf('/'), imageName.length);
@@ -1335,20 +1290,21 @@ export default {
       var url2 = imageName.substring(imageName.indexOf('/'), imageName.length);
       return (
         Common.getFileServerUrl() +
-          'Files/' +
-          accountId +
-          '/Images/' +
-          className +
-          '/' +
-          url1 +
-          url2
+        'Files/' +
+        accountId +
+        '/Images/' +
+        className +
+        '/' +
+        url1 +
+        url2
       );
     },
-  
+
     /**
        * 返回大图的路径
        */
     showImage: function (imageName) {
+      if(!imageName) return;
       //return this.imageServerBaseUrl + "\\" + imageName;
       //usb摄像头
       var newImages = imageName.split('\\');
@@ -1358,7 +1314,7 @@ export default {
       return Common.getFileServerUrl() + 'Files\\UsbCamera\\' + imageName;
       // return Common.getFileServerUrl() + "Files\\UsbCamera\\" + newFile + "\\thumbnail\\" + newImage;
     },
-  
+
     //显示九张抓拍图片
     showImageUrl: function (item) {
       var _self = this;
@@ -1379,7 +1335,7 @@ export default {
           } else {
             Notify.error('查询错误', data.errorMessage, true);
           }
-  
+
           _self.modal = true;
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
@@ -1481,7 +1437,7 @@ export default {
       }
       return iconSrc;
     },
-  
+
     getCameraNo: function () {
       var _self = this;
       $.ajax({
@@ -1555,103 +1511,103 @@ export default {
   },
 };
 </script>
-  <style scoped>
-  .table-footer-left {
-    float: left;
-    margin: 0px;
-  }
-  
-  .image {
-    width: 100%;
-  }
-  
-  .m-img {
-    max-width: 100%;
-  }
-  
-  .box {
-    margin-bottom: 14px;
-  }
-  
-  .box-title {
-    margin-bottom: 6px;
-  }
-  
-  .a-title {
-    text-decoration: underline;
-    font-size: 1.2em;
-    color: #5b3bcd;
-  }
-  
-  .p-tooltip {
-    color: #999;
-    font-size: 12px;
-    line-height: 42px;
-    margin: 0px;
-  }
-  
-  .asset-detail div {
-    word-wrap: break-word;
-    padding: 0px;
-  }
-  
-  .div-asset-info {
-    margin-top: 15px;
-    margin-bottom: 15px;
-  }
-  
-  .m-image {
-    height: 648px;
-    width: 432px;
-  }
-  
-  .modal-img-box {
-    text-align: center;
-  }
-  
-  .div-history-event ul {
-    list-style-type: circle;
-  }
-  
-  .div-history-event li {
-    margin-bottom: 10px;
-    font-size: 18px;
-    border-bottom: 1px solid #dcd6d6;
-  }
-  
-  .div-history-event p {
-    margin: 3px 0px;
-    font-size: 14px;
-  }
-  
-  .event-title {
-    font-weight: bold;
-  }
-  
-  .event-time {
-    color: #aaa;
-    font-size: 0.9em;
-  }
-  
-  .no-padding-left {
-    padding-left: 0px;
-  }
-  
-  .media-img {
-    width: 45px;
-    height: 45px;
-  }
-  
-  .img-thumbnail {
-    cursor: pointer;
-  }
-  
-  .time-box {
-    margin-bottom: 15px;
-  }
-  
-  .rowTest {
-    display: flex;
-    flex-wrap: wrap;
-  }
-  </style>
+<style scoped>
+.table-footer-left {
+  float: left;
+  margin: 0px;
+}
+
+.image {
+  width: 100%;
+}
+
+.m-img {
+  max-width: 100%;
+}
+
+.box {
+  margin-bottom: 14px;
+}
+
+.box-title {
+  margin-bottom: 6px;
+}
+
+.a-title {
+  text-decoration: underline;
+  font-size: 1.2em;
+  color: #5b3bcd;
+}
+
+.p-tooltip {
+  color: #999;
+  font-size: 12px;
+  line-height: 42px;
+  margin: 0px;
+}
+
+.asset-detail div {
+  word-wrap: break-word;
+  padding: 0px;
+}
+
+.div-asset-info {
+  margin-top: 15px;
+  margin-bottom: 15px;
+}
+
+.m-image {
+  height: 648px;
+  width: 432px;
+}
+
+.modal-img-box {
+  text-align: center;
+}
+
+.div-history-event ul {
+  list-style-type: circle;
+}
+
+.div-history-event li {
+  margin-bottom: 10px;
+  font-size: 18px;
+  border-bottom: 1px solid #dcd6d6;
+}
+
+.div-history-event p {
+  margin: 3px 0px;
+  font-size: 14px;
+}
+
+.event-title {
+  font-weight: bold;
+}
+
+.event-time {
+  color: #aaa;
+  font-size: 0.9em;
+}
+
+.no-padding-left {
+  padding-left: 0px;
+}
+
+.media-img {
+  width: 45px;
+  height: 45px;
+}
+
+.img-thumbnail {
+  cursor: pointer;
+}
+
+.time-box {
+  margin-bottom: 15px;
+}
+
+.rowTest {
+  display: flex;
+  flex-wrap: wrap;
+}
+</style>

+ 1 - 1
src/components/customer/AssetInventoryStep2.vue

@@ -3,7 +3,7 @@
     <div class="grid-item-1">
       <div>
         <a-radio-group v-model:value="value">
-          <a-radio :style="radioStyle" :value="1">全公司盘点,每个部门生成一个盘点单。</a-radio>
+          <a-radio :style="radioStyle" :value="1">全单位盘点,每个部门生成一个盘点单。</a-radio>
           <a-radio :style="radioStyle" :value="2">对一个部门进行盘点。</a-radio>
           <a-radio :style="radioStyle" :value="3">抽盘。</a-radio>
           <a-radio :style="radioStyle" :value="7">AGV盘点。</a-radio>

+ 1 - 1
src/components/customer/AssetInventoryStep3.vue

@@ -5,7 +5,7 @@
         :label-col="{ span: 4 }"
         :wrapper-col="{ span: 16 }"
       >
-        <a-form-item label="盘点单名称" extra="全公司范围内每个部门一个盘点单" class="m-form-item">
+        <a-form-item label="盘点单名称" extra="全单位范围内每个部门一个盘点单" class="m-form-item">
           <a-input v-model:value="inventorySheetName" size="default" />
         </a-form-item>
 

+ 13 - 2
src/components/customer/AssetInventoryStep5.vue

@@ -153,7 +153,16 @@
                 :info-window-no="userWindowNo" :field="userField" :field-value="userFieldValue" :display-name="userField.listDisplayFieldName"
                 :where-clause-source="userIdWhereClauseSource" @value-changed="userValueChanged"
               />
-
+              <div>资产编号</div>
+              <input
+                v-model="filter.assetNo" style="
+                  width: 268px;
+                  height: 32px;
+                  border: 1px solid #ccc;
+                  border-radius: 4px;
+                "
+                autocomplete="off" @input="selfNoChange"
+              />
               <div>放置位置</div>
               <!--              <SearchWidget
                 :info-window-no="locationWindowNo"
@@ -170,7 +179,7 @@
               <div>图号</div>
               <input
                 v-model="filter.selfNo" style="
-                  width: 250px;
+                  width: 268px;
                   height: 32px;
                   border: 1px solid #ccc;
                   border-radius: 4px;
@@ -543,6 +552,7 @@ export default {
         custodianId: null,
         depositoryUserId: null,
         locationIds: [],
+        assetNo:'',
       },
       locationData: [],
       additionalHql: '',
@@ -1125,6 +1135,7 @@ export default {
       this.filter.custodianId = null;
       this.filter.depositoryUserId = null;
       this.filter.selfNo = null;
+      this.filter.assetNo = null;
       this.filter.locationIds = [];
       (this.custodianNameFieldValue = {
         id: null,

+ 3 - 3
src/components/customer/AssetInventoryStep6.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <a-result v-if="isShow" status="success" title="操作成功!" sub-title="恭喜您,全公司部门生成盘点单成功.">
+    <a-result v-if="isShow" status="success" title="操作成功!" sub-title="恭喜您,全单位部门生成盘点单成功.">
       <template #extra>
         <div style="text-align: left; margin-bottom: 20px;">
           <a-table :columns="columns" :data-source="organizationNames">
@@ -25,7 +25,7 @@
       </template>
     </a-result>
 
-    <a-result v-else title="全公司范围内每个部门生成一个盘点单">
+    <a-result v-else title="全单位范围内每个部门生成一个盘点单">
       <template #extra>
         <a-button key="console" type="primary" @click="end">确认生成盘点单</a-button>
       </template>
@@ -152,7 +152,7 @@ export default {
               };
               _self.organizationNames.push(organizationName);
             });
-            Notify.success('成功', '全公司生成盘点单成功', 2000);
+            Notify.success('成功', '全单位生成盘点单成功', 2000);
           }
           
           _self.isShow = true;

+ 3 - 1
src/components/inventory1/InventoryPage1.vue

@@ -24,7 +24,7 @@
         </template>
       </template>
       <template #footer>
-        <p>
+        <p v-if="isHave">
           无盈亏资产:<span class="red_info">{{ footerDatas.checkdQuantity }}</span> 件,您还有
           <span class="red_info">{{ footerDatas.checkLossQuantity }}</span> 件资产未盘点
         </p>
@@ -48,6 +48,7 @@ import InventorySelect from './InventorySelect.vue';
 import { message } from 'ant-design-vue';
 import CommonTable from '../../common/CommonTable.vue';
 
+const isHave = ref(false);
 const tableDatas = ref([]);
 const footerDatas = ref({
   checkdQuantity: '',
@@ -56,6 +57,7 @@ const footerDatas = ref({
 
 // 获取盘点计划ID
 const getPlanInfo = planId => {
+  if(planId) isHave.value = true;
   getAllOrgData(planId);
 };
 

+ 31 - 2
src/components/inventory1/InventoryPage2.vue

@@ -1,21 +1,31 @@
 <template>
   <div style="position: relative;">
-    <InventorySelect style="position: absolute;top: 0.6rem;left: 32rem;" :size="'small'" @get-plan-id="getPlanInfo" />
+    <InventorySelect class="select-inventory" :size="'small'" :class="{ 'hide': !isHave }" @get-plan-id="getPlanInfo" />
     <div class="grid-item-row2-column2">
       <component :is="dynamicComponent" v-bind="dynamicComponentParam" />
     </div>
   </div>
+  <a-card v-if="!isHave" style="width: 100%;position: absolute; top: 4rem;display: flex;justify-content: center;">
+    <a-empty>
+      <template #description>
+        <span>
+          暂无盘点数据
+        </span>
+      </template>
+    </a-empty>
+  </a-card>
 </template>
 <script setup>
 import { ref, defineAsyncComponent } from 'vue';
 import InventorySelect from './InventorySelect.vue';
 
+const isHave = ref(false);
 const dynamicComponent = ref(null);
 const dynamicComponentParam = ref(null);
 
 // 获取盘点计划ID
 const getPlanInfo = id => {
-
+  if (id) isHave.value = true;
   const asyncComponent = defineAsyncComponent({
     // 加载函数
     loader: () => import('pc-component-v3').then(module => module.InfoWindow),
@@ -50,4 +60,23 @@ const getPlanInfo = id => {
 :deep(.grid-item-row2-column2) {
   height: calc(100vh - 200px) !important;
 }
+
+.select-inventory {
+  position: absolute;
+  top: 4.2rem;
+  left: 10rem;
+}
+
+@media (max-width: 768px) {
+  .select-inventory {
+    position: absolute;
+    top: 4.2rem;
+    left: 10rem;
+    font-size: 10px;
+  }
+}
+
+.hide {
+  display: none
+}
 </style>

+ 30 - 2
src/components/inventory1/InventoryPage3.vue

@@ -1,19 +1,29 @@
 <template>
   <div style="position: relative;">
-    <InventorySelect style="position: absolute;top: 0.6rem;left: 32rem;" :size="'small'" @get-plan-id="getPlanInfo" />
+    <InventorySelect class="select-inventory" :class="{ 'hide': !isHave }" :size="'small'" @get-plan-id="getPlanInfo" />
     <component :is="dynamicComponent" v-bind="dynamicComponentParam" />
   </div>
+  <a-card v-if="!isHave" style="width: 100%;position: absolute; top: 4rem;display: flex;justify-content: center;">
+    <a-empty>
+      <template #description>
+        <span>
+          暂无盘点数据
+        </span>
+      </template>
+    </a-empty>
+  </a-card>
 </template>
 <script setup>
 import { ref, defineAsyncComponent } from 'vue';
 import InventorySelect from './InventorySelect.vue';
 
+const isHave = ref(false);
 const dynamicComponent = ref(null);
 const dynamicComponentParam = ref(null);
 
 // 获取盘点计划ID
 const getPlanInfo = id => {
-
+  if (id) isHave.value = true;
   const asyncComponent = defineAsyncComponent({
     // 加载函数
     loader: () => import('pc-component-v3').then(module => module.InfoWindow),
@@ -42,4 +52,22 @@ const getPlanInfo = id => {
 :deep(.flex-header) {
   flex: 0 0 40px !important;
 }
+
+.select-inventory {
+  position: absolute;
+  top: 4.2rem;
+  left: 10rem;
+}
+
+@media (max-width: 768px) {
+  .select-inventory {
+    position: absolute;
+    top: 4.2rem;
+    left: 10rem;
+    font-size: 10px;
+  }
+}
+.hide {
+  display: none
+}
 </style>

+ 4 - 4
src/components/inventory1/InventorySelect.vue

@@ -3,10 +3,10 @@
     盘点基准日:
     <a-select
       v-model:value="planId" placeholder="请选择盘点日期" style="width: 126px" show-search option-filter-prop="label"
-      :options="datas.map(item => ({ value: item.id, label: item.accountDate }))" :allow-clear="true" :size="size"
+      :options="datas.map(item => ({ value: item.id, label: item.accountDate }))" :size="size"
       @change="selectedChanged"
     />
-    盘点工作完成时间: {{ plannedStartDate }} 至 {{ plannedEndDate }} 发起人: {{ createUserName }}
+    <span v-if="planId"> 盘点工作完成时间: {{ plannedStartDate }} 至 {{ plannedEndDate }} 发起人: {{ createUserName }}</span>
   </a-space>
 </template>
 
@@ -16,7 +16,7 @@ import { SqlApi } from 'pc-component-v3';
 import Common from '../../common/Common';
 import { ref, defineEmits, defineProps, onMounted } from 'vue';
 
-const emits = defineEmits(['getPlanId','getFooterInfo']);
+const emits = defineEmits(['getPlanId', 'getFooterInfo']);
 
 const props = defineProps({
 
@@ -71,7 +71,7 @@ const queryDetail = planId => {
         plannedStartDate.value = successData.result.plannedStartDate;
         plannedEndDate.value = successData.result.plannedEndDate;
         createUserName.value = successData.result.createUserName;
-        emits('getFooterInfo',successData.result);
+        emits('getFooterInfo', successData.result);
       }
     } else {
       message.warning(successData.errorMessage);