Переглянути джерело

修改盘点上传资产数据样式

王争光 2 роки тому
батько
коміт
e6804f5dbc
2 змінених файлів з 299 додано та 243 видалено
  1. 1 1
      package.json
  2. 298 242
      src/components/customer/AssetInventoryStep5.vue

+ 1 - 1
package.json

@@ -1,7 +1,7 @@
 {
   "name": "client-eam-v3",
   "description": "Leanwo Prodog Client",
-  "version": "3.0.39",
+  "version": "3.0.40",
   "author": "yangzhijie1488 <yangzhijie1488@163.com>",
   "scripts": {
     "dev": "cross-env webpack serve --config ./webpack.dev.js",

+ 298 - 242
src/components/customer/AssetInventoryStep5.vue

@@ -8,7 +8,7 @@
             class="btn btn-success"
             @click="getAssetInstance(false)"
           >
-            {{ $t("lang.AssetInventorySearch.query") }}
+            {{ $t('lang.AssetInventorySearch.query') }}
           </button>
 
           <!-- <button type="button" class="btn btn-info" @click="generateAssetInventoryLine">
@@ -22,19 +22,19 @@
             查看盘点清单(已选择:{{ assetInstancesTempory.length }})
           </button>
           <button type="button" class="btn btn-danger" @click="clearFilter">
-            {{ $t("lang.AssetInventorySearch.empty") }}
+            {{ $t('lang.AssetInventorySearch.empty') }}
           </button>
-          <a-button style="height: 33.5px" type="primary" @click="downloadFile"
-            >下载</a-button
-          >
-          <a-upload
-            v-model:file-list="fileList"
-            :show-upload-list="false"
-            :before-upload="beforeUpload"
-            @change="uploadFileChange"
-          >
-            <a-button type="dashed" style="height: 33.5px"> 上传 </a-button>
-          </a-upload>
+          <!--          <a-button style="height: 33.5px" type="primary" @click="downloadFile">-->
+          <!--            下载-->
+          <!--          </a-button>-->
+          <!--          <a-upload-->
+          <!--            v-model:file-list="fileList"-->
+          <!--            :show-upload-list="false"-->
+          <!--            :before-upload="beforeUpload"-->
+          <!--            @change="uploadFileChange"-->
+          <!--          >-->
+          <!--            <a-button type="dashed" style="height: 33.5px"> 上传</a-button>-->
+          <!--          </a-upload>-->
         </div>
       </div>
       <!-- <div class="grid-item-row2-column1">
@@ -48,9 +48,30 @@
         </div>
       </div> -->
 
-      <div class="grid-item-row1-column2" style="margin-left: 100px">
+      <div class="grid-item-row1-column2">
         <a-form-item label="盘点单名称">
-          <a-input v-model:value="inventorySheetName" size="default" />
+          <a-input v-model:value="inventorySheetName" size="default" style="width: 1365px" />
+          <!--          <a-button type="dashed" style="height: 33.5px; margin-left: 10px"> 上传 </a-button>-->
+          <a-button type="primary" style="height: 33.5px; margin-left: 30px" @click="showModal">上传</a-button>
+          <a-modal
+            v-model:visible="visible" title="上传盘点资产数据" ok-text="确认" cancel-text="取消"
+            @ok="handleOk"
+          >
+            <p>1、请点击【下载】按钮,下载所有的资产数据。</p>
+            <a-button style="height: 33.5px" type="primary" @click="downloadFile">
+              下载
+            </a-button>
+            <p>2、使用Excel打开下载的数据,删除不要盘点的数据,保存Excel。</p>
+            <p>3、点击上传按钮,上传数据。</p>
+            <a-upload
+              v-model:file-list="fileList"
+              :show-upload-list="false"
+              :before-upload="beforeUpload"
+              @change="uploadFileChange"
+            >
+              <a-button type="primary" style="height: 33.5px"> 上传</a-button>
+            </a-upload>
+          </a-modal>
         </a-form-item>
       </div>
       <div class="grid-item-row3-column1">
@@ -60,7 +81,7 @@
               class="panel-heading"
               @click="type == 1 ? (type = 0) : (type = 1)"
             >
-              {{ $t("lang.AssetInventorySearch.ownerDepartment") }}
+              {{ $t('lang.AssetInventorySearch.ownerDepartment') }}
             </div>
             <div v-show="type == 1" class="panel-body">
               <ClientOrganizationTree
@@ -76,7 +97,7 @@
               class="panel-heading"
               @click="type == 3 ? (type = 0) : (type = 3)"
             >
-              {{ $t("lang.AssetInventorySearch.useDepartment") }}
+              {{ $t('lang.AssetInventorySearch.useDepartment') }}
             </div>
             <div v-show="type == 3" class="panel-body">
               <ClientOrganizationTree
@@ -92,7 +113,7 @@
               class="panel-heading"
               @click="type == 2 ? (type = 0) : (type = 2)"
             >
-              {{ $t("lang.AssetInventorySearch.category") }}
+              {{ $t('lang.AssetInventorySearch.category') }}
             </div>
             <div v-show="type == 2" class="panel-body">
               <div>
@@ -110,7 +131,7 @@
               class="panel-heading"
               @click="type == 4 ? (type = 0) : (type = 4)"
             >
-              {{ $t("lang.AssetInventorySearch.project") }}
+              {{ $t('lang.AssetInventorySearch.project') }}
             </div>
             <div v-show="type == 4" class="panel-body">
               <div>
@@ -228,8 +249,8 @@
           <thead>
             <tr>
               <!-- <th style="width: 100px">
-                {{ $t("lang.AssetInventorySearch.serialNumber") }}
-              </th>-->
+            {{ $t("lang.AssetInventorySearch.serialNumber") }}
+          </th>-->
               <th style="width: 50px">
                 <input
                   autocomplete="off"
@@ -239,73 +260,73 @@
                 />
               </th>
               <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.ownerClient") }}
+                {{ $t('lang.AssetInventorySearch.ownerClient') }}
               </th>
               <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.ownerDepartment") }}
+                {{ $t('lang.AssetInventorySearch.ownerDepartment') }}
               </th>
               <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.useClient") }}
+                {{ $t('lang.AssetInventorySearch.useClient') }}
               </th>
               <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.useDepartment") }}
+                {{ $t('lang.AssetInventorySearch.useDepartment') }}
               </th>
               <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.assetName") }}
+                {{ $t('lang.AssetInventorySearch.assetName') }}
               </th>
               <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.assetNumber") }}
+                {{ $t('lang.AssetInventorySearch.assetNumber') }}
               </th>
               <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.cardNumber") }}
+                {{ $t('lang.AssetInventorySearch.cardNumber') }}
               </th>
               <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.type") }}
+                {{ $t('lang.AssetInventorySearch.type') }}
               </th>
               <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.assetClassification") }}
+                {{ $t('lang.AssetInventorySearch.assetClassification') }}
               </th>
               <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.subordinateToTheProject") }}
+                {{ $t('lang.AssetInventorySearch.subordinateToTheProject') }}
               </th>
               <th style="width: 90px">
-                {{ $t("lang.AssetInventorySearch.originalValue") }}
+                {{ $t('lang.AssetInventorySearch.originalValue') }}
               </th>
               <th style="width: 100px">
-                {{ $t("lang.AssetInventorySearch.placeOfPlacement") }}
+                {{ $t('lang.AssetInventorySearch.placeOfPlacement') }}
               </th>
               <th style="width: 100px">
-                {{ $t("lang.AssetInventorySearch.placementLocation") }}
+                {{ $t('lang.AssetInventorySearch.placementLocation') }}
               </th>
               <th style="width: 100px">
-                {{ $t("lang.AssetInventorySearch.unitOfMeasurement") }}
+                {{ $t('lang.AssetInventorySearch.unitOfMeasurement') }}
               </th>
               <th style="width: 100px">
-                {{ $t("lang.AssetInventorySearch.user") }}
+                {{ $t('lang.AssetInventorySearch.user') }}
               </th>
               <th style="width: 100px">
-                {{ $t("lang.AssetInventorySearch.custodianName") }}
+                {{ $t('lang.AssetInventorySearch.custodianName') }}
               </th>
               <th style="width: 100px">
-                {{ $t("lang.AssetInventorySearch.depositoryUserName") }}
+                {{ $t('lang.AssetInventorySearch.depositoryUserName') }}
               </th>
               <th style="width: 100px">
-                {{ $t("lang.AssetInventorySearch.usageStatus") }}
+                {{ $t('lang.AssetInventorySearch.usageStatus') }}
               </th>
               <th style="width: 100px">
-                {{ $t("lang.AssetInventorySearch.userInput") }}
+                {{ $t('lang.AssetInventorySearch.userInput') }}
               </th>
               <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.licensePlate") }}
+                {{ $t('lang.AssetInventorySearch.licensePlate') }}
               </th>
               <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.selfNumbering") }}
+                {{ $t('lang.AssetInventorySearch.selfNumbering') }}
               </th>
               <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.startUseDate") }}
+                {{ $t('lang.AssetInventorySearch.startUseDate') }}
               </th>
               <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.remarks") }}
+                {{ $t('lang.AssetInventorySearch.remarks') }}
               </th>
             </tr>
           </thead>
@@ -316,13 +337,13 @@
               @dblclick="openCurdWindow(assetInstance)"
             >
               <!-- <td>
-                {{
-                  index +
-                    1 +
-                    (_self.pagination.current_page - 1) *
-                    _self.pagination.per_page
-                }}
-              </td>-->
+            {{
+              index +
+                1 +
+                (_self.pagination.current_page - 1) *
+                _self.pagination.per_page
+            }}
+          </td>-->
               <td>
                 <input
                   id="assetInstance.id"
@@ -363,7 +384,7 @@
       <div class="grid-item-row3-column2">
         <div>
           <p class="bg-success m-grid-footer">
-            {{ $t("lang.AssetInventorySearch.totalOfOriginalValue") }}:{{
+            {{ $t('lang.AssetInventorySearch.totalOfOriginalValue') }}:{{
               orginalValueTotal
             }}
           </p>
@@ -372,19 +393,19 @@
       <div class="grid-item-row4-column2">
         <div>
           <div class="pull-left">
-            <span
-              >{{ $t("lang.AssetInventorySearch.the")
-              }}{{ (pagination.current_page - 1) * pagination.per_page + 1 }}-{{
-                pagination.current_page * pagination.per_page
-              }}{{ $t("lang.AssetInventorySearch.strip") }},{{
-                $t("lang.AssetInventorySearch.inTotal")
-              }}{{ pagination.total
-              }}{{ $t("lang.AssetInventorySearch.strip") }},{{
-                $t("lang.AssetInventorySearch.eachPage")
-              }}</span
-            >
+            <span>{{
+              $t('lang.AssetInventorySearch.the')
+            }}{{ (pagination.current_page - 1) * pagination.per_page + 1 }}-{{
+              pagination.current_page * pagination.per_page
+            }}{{ $t('lang.AssetInventorySearch.strip') }},{{
+              $t('lang.AssetInventorySearch.inTotal')
+            }}{{
+              pagination.total
+            }}{{ $t('lang.AssetInventorySearch.strip') }},{{
+              $t('lang.AssetInventorySearch.eachPage')
+            }}</span>
             <PageSizeSelect @page-size-changed="pageSizeChanged" />
-            <span>{{ $t("lang.AssetInventorySearch.strip") }}</span>
+            <span>{{ $t('lang.AssetInventorySearch.strip') }}</span>
           </div>
           <div class="pull-right">
             <VueBootstrapPagination
@@ -426,77 +447,77 @@
           <thead>
             <tr>
               <!-- <th style="width: 100px">
-                {{ $t("lang.AssetInventorySearch.serialNumber") }}
-              </th>-->
+            {{ $t("lang.AssetInventorySearch.serialNumber") }}
+          </th>-->
               <!-- <th style="width: 50px">
-                <input autocomplete="off" type="checkbox" :checked="allChecked" @click="isAllChecked()" />
-              </th> -->
+            <input autocomplete="off" type="checkbox" :checked="allChecked" @click="isAllChecked()" />
+          </th> -->
               <!-- <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.ownerClient") }}
-              </th>
-              <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.ownerDepartment") }}
-              </th>
-              <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.useClient") }}
-              </th>
-              <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.useDepartment") }}
-              </th> -->
+            {{ $t("lang.AssetInventorySearch.ownerClient") }}
+          </th>
+          <th style="width: 130px">
+            {{ $t("lang.AssetInventorySearch.ownerDepartment") }}
+          </th>
+          <th style="width: 130px">
+            {{ $t("lang.AssetInventorySearch.useClient") }}
+          </th>
+          <th style="width: 130px">
+            {{ $t("lang.AssetInventorySearch.useDepartment") }}
+          </th> -->
               <th style="width: 60px">
-                {{ $t("lang.AssetInventorySearch.assetName") }}
+                {{ $t('lang.AssetInventorySearch.assetName') }}
               </th>
               <th style="width: 60px">
-                {{ $t("lang.AssetInventorySearch.assetNumber") }}
+                {{ $t('lang.AssetInventorySearch.assetNumber') }}
               </th>
               <th style="width: 60px">
-                {{ $t("lang.AssetInventorySearch.cardNumber") }}
+                {{ $t('lang.AssetInventorySearch.cardNumber') }}
               </th>
               <!-- <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.type") }}
-              </th> -->
+            {{ $t("lang.AssetInventorySearch.type") }}
+          </th> -->
               <th style="width: 60px">
-                {{ $t("lang.AssetInventorySearch.assetClassification") }}
+                {{ $t('lang.AssetInventorySearch.assetClassification') }}
               </th>
               <th style="width: 60px">
-                {{ $t("lang.AssetInventorySearch.operation") }}
-              </th>
-              <!-- <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.subordinateToTheProject") }}
-              </th>
-              <th style="width: 90px">
-                {{ $t("lang.AssetInventorySearch.originalValue") }}
-              </th>
-              <th style="width: 100px">
-                {{ $t("lang.AssetInventorySearch.placeOfPlacement") }}
-              </th>
-              <th style="width: 100px">
-                {{ $t("lang.AssetInventorySearch.placementLocation") }}
-              </th>
-              <th style="width: 100px">
-                {{ $t("lang.AssetInventorySearch.unitOfMeasurement") }}
-              </th>
-              <th style="width: 100px">
-                {{ $t("lang.AssetInventorySearch.user") }}
-              </th>
-              <th style="width: 100px">
-                {{ $t("lang.AssetInventorySearch.usageStatus") }}
-              </th>
-              <th style="width: 100px">
-                {{ $t("lang.AssetInventorySearch.userInput") }}
-              </th>
-              <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.licensePlate") }}
-              </th>
-              <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.selfNumbering") }}
+                {{ $t('lang.AssetInventorySearch.operation') }}
               </th>
-              <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.startUseDate") }}
-              </th>
-              <th style="width: 130px">
-                {{ $t("lang.AssetInventorySearch.remarks") }}
-              </th> -->
+            <!-- <th style="width: 130px">
+              {{ $t("lang.AssetInventorySearch.subordinateToTheProject") }}
+            </th>
+            <th style="width: 90px">
+              {{ $t("lang.AssetInventorySearch.originalValue") }}
+            </th>
+            <th style="width: 100px">
+              {{ $t("lang.AssetInventorySearch.placeOfPlacement") }}
+            </th>
+            <th style="width: 100px">
+              {{ $t("lang.AssetInventorySearch.placementLocation") }}
+            </th>
+            <th style="width: 100px">
+              {{ $t("lang.AssetInventorySearch.unitOfMeasurement") }}
+            </th>
+            <th style="width: 100px">
+              {{ $t("lang.AssetInventorySearch.user") }}
+            </th>
+            <th style="width: 100px">
+              {{ $t("lang.AssetInventorySearch.usageStatus") }}
+            </th>
+            <th style="width: 100px">
+              {{ $t("lang.AssetInventorySearch.userInput") }}
+            </th>
+            <th style="width: 130px">
+              {{ $t("lang.AssetInventorySearch.licensePlate") }}
+            </th>
+            <th style="width: 130px">
+              {{ $t("lang.AssetInventorySearch.selfNumbering") }}
+            </th>
+            <th style="width: 130px">
+              {{ $t("lang.AssetInventorySearch.startUseDate") }}
+            </th>
+            <th style="width: 130px">
+              {{ $t("lang.AssetInventorySearch.remarks") }}
+            </th> -->
             </tr>
           </thead>
           <tbody>
@@ -505,20 +526,20 @@
               :key="assetInstance.id"
             >
               <!-- <td>
-                {{
-                  index +
-                    1 +
-                    (_self.pagination.current_page - 1) *
-                    _self.pagination.per_page
-                }}
-              </td>-->
+            {{
+              index +
+                1 +
+                (_self.pagination.current_page - 1) *
+                _self.pagination.per_page
+            }}
+          </td>-->
               <!-- <td>
-                <input autocomplete="off" id="assetInstance.id" v-model="checkedIds" type="checkbox" :value="assetInstance.id" />
-              </td> -->
+            <input autocomplete="off" id="assetInstance.id" v-model="checkedIds" type="checkbox" :value="assetInstance.id" />
+          </td> -->
               <!-- <td>{{ assetInstance.clientName }}</td>
-              <td>{{ assetInstance.organizationName }}</td>
-              <td>{{ assetInstance.responseClientName }}</td>
-              <td>{{ assetInstance.responseOrganizationName }}</td> -->
+          <td>{{ assetInstance.organizationName }}</td>
+          <td>{{ assetInstance.responseClientName }}</td>
+          <td>{{ assetInstance.responseOrganizationName }}</td> -->
               <td>{{ assetInstance.name }}</td>
               <td>{{ assetInstance.assetNo }}</td>
               <td>{{ assetInstance.no }}</td>
@@ -530,21 +551,21 @@
                   class="btn btn-danger"
                   @click="deleteCountList(assetInstance.id)"
                 >
-                  {{ $t("lang.AssetInventorySearch.delete") }}
+                  {{ $t('lang.AssetInventorySearch.delete') }}
                 </button>
               </td>
-              <!-- <td>{{ assetInstance.projectItemName }}</td>
-              <td>{{ assetInstance.orginalValue }}</td>
-              <td>{{ assetInstance.savePosition }}</td>
-              <td>{{ assetInstance.locationName }}</td>
-              <td>{{ assetInstance.computationUnitName }}</td>
-              <td>{{ assetInstance.useUserName }}</td>
-              <td>{{ assetInstance.useStatusName }}</td>
-              <td>{{ assetInstance.useUserNameInput }}</td>
-              <td>{{ assetInstance.vehicleNo }}</td>
-              <td>{{ assetInstance.selfNo }}</td>
-              <td>{{ assetInstance.depreciationStartDate }}</td>
-              <td>{{ assetInstance.description }}</td> -->
+            <!-- <td>{{ assetInstance.projectItemName }}</td>
+            <td>{{ assetInstance.orginalValue }}</td>
+            <td>{{ assetInstance.savePosition }}</td>
+            <td>{{ assetInstance.locationName }}</td>
+            <td>{{ assetInstance.computationUnitName }}</td>
+            <td>{{ assetInstance.useUserName }}</td>
+            <td>{{ assetInstance.useStatusName }}</td>
+            <td>{{ assetInstance.useUserNameInput }}</td>
+            <td>{{ assetInstance.vehicleNo }}</td>
+            <td>{{ assetInstance.selfNo }}</td>
+            <td>{{ assetInstance.depreciationStartDate }}</td>
+            <td>{{ assetInstance.description }}</td> -->
             </tr>
           </tbody>
         </table>
@@ -554,20 +575,22 @@
 </template>
 
 <script>
-import Common from "../../common/Common.js";
+import Common from '../../common/Common.js';
 
-import AssetInstanceResource from "../../api/asset/AssetInstanceResource.js";
-import AssetInventoryResource from "../../api/asset/AssetInventoryResource.js";
+import AssetInstanceResource from '../../api/asset/AssetInstanceResource.js';
+import AssetInventoryResource from '../../api/asset/AssetInventoryResource.js';
 
-import AssetInventoryLineResource from "../../api/asset/AssetInventoryLineResource.js";
-import ClientOrganizationTree from "../../widget/ClientOrganizationTree.vue";
-import ProjectItemTree from "../../widget/ProjectItemTree.vue";
-import AssetCategoryTree from "../../widget/AssetCategoryTree.vue";
+import AssetInventoryLineResource from '../../api/asset/AssetInventoryLineResource.js';
+import ClientOrganizationTree from '../../widget/ClientOrganizationTree.vue';
+import ProjectItemTree from '../../widget/ProjectItemTree.vue';
+import AssetCategoryTree from '../../widget/AssetCategoryTree.vue';
+import {ref} from 'vue';
+import {Notify, Uuid} from 'pc-component-v3';
+import {message} from 'ant-design-vue';
 
-import { Notify, Uuid } from "pc-component-v3";
-import { message } from "ant-design-vue";
 
 export default {
+
   components: {
     Date,
 
@@ -576,9 +599,29 @@ export default {
     ClientOrganizationTree,
   },
   // 定义抛出的事件名称
-  emits: ["previous", "next"],
+  emits: ['previous', 'next'],
+
+  /**
+   * 上传按钮的模态框
+   * @returns {{visible: Ref<UnwrapRef<boolean>>, handleOk: handleOk, showModal: showModal}}
+   */
+  // setup() {
+  //   const visible = ref(false);
+  //   const showModal = () => {
+  //     visible.value = true;
+  //   };
+  //   const handleOk = e => {
+  //     visible.value = false;
+  //   };
+  //   return {
+  //     visible,
+  //     showModal,
+  //     handleOk,
+  //   };
+  // },
   data: function () {
     return {
+      visible: ref(false), //模态框状态
       clientOrganizations: [], // 所属部门
       responseClientOrganizations: [], // 使用部门
       categories: [], // 资产类别
@@ -595,7 +638,7 @@ export default {
         custodianId: null,
         depositoryUserId: null,
       },
-      additionalHql: "",
+      additionalHql: '',
       pagination: {
         total: 0,
         per_page: Common.pageSize, // required
@@ -611,59 +654,59 @@ export default {
       assetInventoryResponseOrganizationIds: [], // 盘点单中已经选中的所属部门
       assetInventoryCategoryIds: [], // 盘点单中已经选中的资产类别
       assetInventoryProjectItemIds: [], // 盘点单中已经选择的项目
-      locationWindowNo: "109494",
+      locationWindowNo: '109494',
       locationField: {
-        name: "",
-        listDisplayFieldName: "ar.name",
+        name: '',
+        listDisplayFieldName: 'ar.name',
       },
       locationFieldValue: {
         id: null,
-        displayValue: [""],
-        fieldType: "Key",
+        displayValue: [''],
+        fieldType: 'Key',
       },
       whereClauseSource: {
         customerDataDimensions: [
           {
-            fieldName: "ar.client.id",
-            dataDimensionTypeNo: "202201191757",
-            defaultDataDimensionTypeValueNo: "1",
+            fieldName: 'ar.client.id',
+            dataDimensionTypeNo: '202201191757',
+            defaultDataDimensionTypeValueNo: '1',
           },
         ],
       },
-      userWindowNo: "050408",
+      userWindowNo: '050408',
       userField: {
-        name: "",
-        listDisplayFieldName: "name",
+        name: '',
+        listDisplayFieldName: 'name',
       },
       userFieldValue: {
         id: null,
-        displayValue: [""],
-        fieldType: "Key",
+        displayValue: [''],
+        fieldType: 'Key',
       },
       custodianNameField: {
-        name: "",
-        listDisplayFieldName: "name",
+        name: '',
+        listDisplayFieldName: 'name',
       },
       custodianNameFieldValue: {
         id: null,
-        displayValue: [""],
-        fieldType: "Key",
+        displayValue: [''],
+        fieldType: 'Key',
       },
       userIdWhereClauseSource: {
         customerDataDimensions: [
           {
-            fieldName: "client.id",
-            dataDimensionTypeNo: "202201191757",
-            defaultDataDimensionTypeValueNo: "4",
+            fieldName: 'client.id',
+            dataDimensionTypeNo: '202201191757',
+            defaultDataDimensionTypeValueNo: '4',
           },
         ],
       },
       custodianIdWhereClauseSource: {
         customerDataDimensions: [
           {
-            fieldName: "client.id",
-            dataDimensionTypeNo: "202201191757",
-            defaultDataDimensionTypeValueNo: "4",
+            fieldName: 'client.id',
+            dataDimensionTypeNo: '202201191757',
+            defaultDataDimensionTypeValueNo: '4',
           },
         ],
       },
@@ -700,31 +743,31 @@ export default {
 
     // 可调整表格列宽
     _self.$nextTick(function () {
-      $(".fixed-table").resizableColumns();
+      $('.fixed-table').resizableColumns();
     });
   },
   methods: {
     // 下载文件
     downloadFile: function () {
-      const loginInfo = JSON.parse(localStorage.getItem("#LoginInfo"));
+      const loginInfo = JSON.parse(localStorage.getItem('#LoginInfo'));
       const envClientId = loginInfo.loginClientId;
       $.ajax({
         url: Common.getApiURL(
-          `ExcelReportResource/execute/20231121_164158?processReportNo=20231121_164158&envClientId=${envClientId}`
+          `ExcelReportResource/execute/20231121_164158?processReportNo=20231121_164158&envClientId=${envClientId}`,
         ),
-        type: "get",
+        type: 'get',
         xhrFields: {
-          responseType: "blob",
+          responseType: 'blob',
         },
         beforeSend: function (request) {
           Common.addTokenToRequest(request);
         },
         success: function (data) {
           const blobUrl = window.URL.createObjectURL(data);
-          const link = document.createElement("a");
+          const link = document.createElement('a');
           link.href = blobUrl;
-          link.style.display = "none";
-          link.download = "抽盘数据.xlsx";
+          link.style.display = 'none';
+          link.download = '抽盘数据.xlsx';
           document.body.appendChild(link);
           link.click();
           URL.revokeObjectURL(blobUrl);
@@ -736,34 +779,35 @@ export default {
       });
     },
     // 上传文件事件
-    uploadFileChange: function ({ file }) {
+    uploadFileChange: function ({file}) {
       const _self = this;
       const formData = new FormData();
-      formData.append("file", file);
+      formData.append('file', file);
       $.ajax({
         url: Common.getApiURL(
-          "AssetInstanceResource/assetInstanceLedgerUpload"
+          'AssetInstanceResource/assetInstanceLedgerUpload',
         ),
-        type: "post",
+        type: 'post',
         beforeSend: function (request) {
           Common.addTokenToRequest(request);
         },
         data: formData,
         contentType: false,
         processData: false,
-        success: function ({ errorCode, datas }) {
+        success: function ({errorCode, datas}) {
           if (errorCode === 0) {
             if (datas) {
-              datas.forEach((item) => {
+              datas.forEach(item => {
                 item.name = item.assetName;
                 item.no = item.assetCardNo;
                 item.categoryName = item.assetCategory;
                 _self.assetInstancesTempory.push(item);
               });
             }
-            message.success("上传成功,已加入至盘点清单", 5);
+            message.success('上传成功,已加入至盘点清单', 5);
+            _self.visible = false; // 关闭模态框
           } else {
-            message.error("上传失败");
+            message.error('上传失败');
           }
           _self.loading = false;
         },
@@ -773,6 +817,18 @@ export default {
         },
       });
     },
+
+    //开启上传资产数据模态框
+    showModal: function () {
+      const _self = this;
+      _self.visible = true;
+    },
+    //关闭上传资产数据模态框
+    handleOk: function () {
+      const _self = this;
+      _self.visible = false;
+    },
+
     // 取消默认上传
     beforeUpload: function () {
       return false;
@@ -798,7 +854,7 @@ export default {
     // 自编号为null
     selfNoChange: function () {
       const _self = this;
-      if (_self.filter.selfNo == "") {
+      if (_self.filter.selfNo == '') {
         _self.filter.selfNo = null;
       }
     },
@@ -832,21 +888,21 @@ export default {
       var _self = this;
       if (
         _self.inventorySheetName == null ||
-        _self.inventorySheetName == undefined ||
-        _self.inventorySheetName == ""
+          _self.inventorySheetName == undefined ||
+          _self.inventorySheetName == ''
       ) {
-        Notify.error("错误", "请填写盘点单名称", 1000);
+        Notify.error('错误', '请填写盘点单名称', 1000);
         return;
       }
       if (
         _self.assetInstancesTempory == null ||
-        _self.assetInstancesTempory.length < 1
+          _self.assetInstancesTempory.length < 1
       ) {
-        Notify.error("错误", "请至少选择一条盘点明细", 1000);
+        Notify.error('错误', '请至少选择一条盘点明细', 1000);
         return;
       }
       let assetInventoryLineSaveDtos = [];
-      _self.assetInstancesTempory.forEach((item) => {
+      _self.assetInstancesTempory.forEach(item => {
         assetInventoryLineSaveDtos.push(item.id);
       });
       var param = {
@@ -859,7 +915,7 @@ export default {
         showPage: 6,
         assetInventoryStep3: param,
       };
-      this.$emit("next", data);
+      this.$emit('next', data);
     },
 
     previous: function () {
@@ -868,7 +924,7 @@ export default {
         showPage: 0,
         assetInventoryStep3: undefined,
       };
-      this.$emit("previous", data);
+      this.$emit('previous', data);
     },
     /**
      * 查询盘点单DTO,
@@ -879,11 +935,11 @@ export default {
       var _self = this;
 
       AssetInventoryResource.getOrganizationsAndOrganizationsAndCategory().then(
-        (data) => {
+        data => {
           _self.assetInventoryOrganizationIds = data.organizationIds;
 
           _self.assetInventoryResponseOrganizationIds =
-            data.responseOrganizationIds;
+                data.responseOrganizationIds;
 
           _self.assetInventoryCategoryIds = data.categoryIds;
 
@@ -891,25 +947,25 @@ export default {
 
           // _self.$nextTick(function() {
           _self.$refs.organization.setSelectedIds(
-            _self.assetInventoryOrganizationIds
+            _self.assetInventoryOrganizationIds,
           );
           _self.$refs.responseOrganization.setSelectedIds(
-            _self.assetInventoryResponseOrganizationIds
+            _self.assetInventoryResponseOrganizationIds,
           );
           _self.$refs.assetCategory.setSelectedIds(
-            _self.assetInventoryCategoryIds
+            _self.assetInventoryCategoryIds,
           );
           _self.$refs.projectItem.setSelectedIds(
-            _self.assetInventoryProjectItemIds
+            _self.assetInventoryProjectItemIds,
           );
           // });
 
           // 查询资产卡片的数据
           _self.getAssetInstance(false);
         },
-        (xmlHttpRequest) => {
+        xmlHttpRequest => {
           Common.processException(xmlHttpRequest);
-        }
+        },
       );
     },
     /**
@@ -998,17 +1054,17 @@ export default {
       var projectItemIds = _self.$refs.projectItem.getSelectedIds();
       var organizationIds = _self.$refs.organization.getSelectedIds();
       var responseOrganizationIds =
-        _self.$refs.responseOrganization.getSelectedIds();
+          _self.$refs.responseOrganization.getSelectedIds();
       var categoryIds = _self.$refs.assetCategory.getSelectedIds();
 
       //_self.clearPageData();
 
       // _self.loading=true;
 
-      if (_self.filter.orginalValue1 == "") {
+      if (_self.filter.orginalValue1 == '') {
         _self.filter.orginalValue1 = null;
       }
-      if (_self.filter.orginalValue2 == "") {
+      if (_self.filter.orginalValue2 == '') {
         _self.filter.orginalValue2 = null;
       }
 
@@ -1022,24 +1078,24 @@ export default {
         filter: _self.filter,
         range: {
           start:
-            (_self.pagination.current_page - 1) * _self.pagination.per_page,
+              (_self.pagination.current_page - 1) * _self.pagination.per_page,
           length: _self.pagination.per_page,
         },
-        inventoryStatus: "RANDOM_STOCKTAKING",
+        inventoryStatus: 'RANDOM_STOCKTAKING',
       };
 
       AssetInstanceResource.getByOrganizationAndCategory(obj).then(
-        (data) => {
+        data => {
           if (data.errorCode == 0) {
             _self.redrawAssetInstance(data.data);
             _self.loading = false;
           } else {
-            Notify.error("提示", data.errorMessage, false);
+            Notify.error('提示', data.errorMessage, false);
           }
         },
-        (xmlHttpRequest) => {
+        xmlHttpRequest => {
           Common.processException(xmlHttpRequest);
-        }
+        },
       );
     },
 
@@ -1062,7 +1118,7 @@ export default {
       });
       _self.pagination.total = data.totalSize;
       _self.pagination.last_page = Math.ceil(
-        data.totalSize / data.range.length
+        data.totalSize / data.range.length,
       );
       _self.totalCount = data.totalSize;
       _self.orginalValueTotal = data.totalOrginalValue;
@@ -1108,20 +1164,20 @@ export default {
       this.filter.selfNo = null;
       (this.custodianNameFieldValue = {
         id: null,
-        displayValue: [""],
-        fieldType: "Key",
+        displayValue: [''],
+        fieldType: 'Key',
+      }),
+      (this.userFieldValue = {
+        id: null,
+        displayValue: [''],
+        fieldType: 'Key',
+      }),
+      (this.locationFieldValue = {
+        id: null,
+        displayValue: [''],
+        fieldType: 'Key',
       }),
-        (this.userFieldValue = {
-          id: null,
-          displayValue: [""],
-          fieldType: "Key",
-        }),
-        (this.locationFieldValue = {
-          id: null,
-          displayValue: [""],
-          fieldType: "Key",
-        }),
-        this.initTreeData();
+      this.initTreeData();
       this.getAssetInstance(false);
     },
 
@@ -1162,7 +1218,7 @@ export default {
     fixedTableHeader: function () {
       var _self = this;
       _self.$nextTick(function () {
-        $(".fixed-table").tableFixer({
+        $('.fixed-table').tableFixer({
           head: true,
         });
       });
@@ -1177,12 +1233,12 @@ export default {
      */
     openCurdWindow: function (assetInstance) {
       let url = Common.getRedirectUrl(
-        "#/desktop/window/window-read/view/040701/0/" +
+        '#/desktop/window/window-read/view/040701/0/' +
           assetInstance.id +
-          "?currPage=1&currIndex=1&totalCount=1&uuid=" +
-          Uuid.createUUID()
+          '?currPage=1&currIndex=1&totalCount=1&uuid=' +
+          Uuid.createUUID(),
       );
-      window.open(url, "资产卡片");
+      window.open(url, '资产卡片');
     },
   },
 };