Преглед на файлове

修改资产详情界面和盘点任务执行的界面。

杨志杰 преди 3 години
родител
ревизия
2bd0a59ad2
променени са 8 файла, в които са добавени 239 реда и са изтрити 158 реда
  1. 1 1
      package.json
  2. 6 0
      public/index.html
  3. 4 13
      src/common/Common.js
  4. 28 16
      src/components/customer/AssetInstanceSearchDetail.vue
  5. 16 15
      src/components/customer/PerformInventoryTasks.vue
  6. 88 50
      src/locales/en-US.json
  7. 89 51
      src/locales/zh-CN.json
  8. 7 12
      src/main.js

+ 1 - 1
package.json

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

+ 6 - 0
public/index.html

@@ -9,9 +9,13 @@
 	<link nonce="*NONCE_TOKEN_CSS*" rel="stylesheet" type="text/css" href="/static/bootstrap/dist/css/bootstrap.css">
 	<link nonce="*NONCE_TOKEN_CSS*" rel="stylesheet" type="text/css" href="/static/bootstrap/dist/css//bootstrap-theme.min.css">
 	<link nonce="*NONCE_TOKEN_CSS*" rel="stylesheet" type="text/css" href="/static/bootstrap3-dialog/dist/css/bootstrap-dialog.css">
+	<link nonce="*NONCE_TOKEN_CSS*" rel="stylesheet" type="text/css" href="/static/colResizable/colResizable-1.6.css">
+	<link nonce="*NONCE_TOKEN_CSS*" rel="stylesheet" type="text/css" href="/static/jQuery-ResizableColumns/jQuery.resizableColumns.css">
 
 	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/jquery/dist/jquery.js"></script>
 	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/jquery.cookie/jquery.cookie.js"></script>
+	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/table-fixer.jquery/table-fixer.jquery.js"></script>
+	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/jQuery-ResizableColumns/jQuery.resizableColumns.js"></script>
 
 	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/moment/moment.js"></script>
 	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/moment/locale/zh-cn.js"></script>
@@ -23,6 +27,8 @@
 	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/vue-i18n/dist/vue-i18n.global.js"></script>
 	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/vuex/dist/vuex.global.js"></script>
 	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/vue-router/dist/vue-router.global.js"></script>
+	
+
 
 	<script nonce="*NONCE_TOKEN*"  type="text/javascript">
 		moment.locale('zh');

+ 4 - 13
src/common/Common.js

@@ -131,32 +131,23 @@ export default {
   },
 
   // 获取图片路径
-  getImageSrc: function (className, imageName) {
-    var accountId = localStorage.getItem('#accountId');   
+  getImageSrc: function (className, imageName) {  
     if (imageName == null) {
       return null;
     }
-    if (imageName != null && imageName[0] == '/') {
-      return this.getFileServerUrl() + 'Files/' + accountId + '/Images/' + className + imageName;
-    } else {
-      return this.getFileServerUrl() + 'Files/' + accountId + '/Images/' + className + '/' + imageName;
-    }
+    return '/api/file/imageDownload?className=' + className + '&fileName=' + imageName;
   },
 
 
   // 获取略缩图图片路径
   getThumbnailImageSrc: function (className, imageName) {
-    var accountId = localStorage.getItem('#accountId');
     if (imageName == null) {
       return null;
     }
-    if (imageName != null && imageName[0] == '/') {
-      return this.getFileServerUrl() + 'Files/' + accountId + '/Images/' + className + '/thumbnail' + imageName;
-    } else {
-      return this.getFileServerUrl() + 'Files/' + accountId + '/Images/' + className + '/thumbnail/' + imageName;
-    }
+    return '/api/file/thumbnailImageDownload?className=' + className + '&fileName=' + imageName;
   },
 
+
   /**
    * 获取附件的路径
    * @param  {[type]} className [description]

+ 28 - 16
src/components/customer/AssetInstanceSearchDetail.vue

@@ -13,7 +13,6 @@
               "
               class="image img-thumbnail"
               style="width: 78px; height: 78px"
-              onerror="common.imgNotFound(this)"
               @click="
                 $refs.imagePreview.preview(
                   assetClassName,
@@ -535,7 +534,7 @@
           </ul>
           <div class="tab-content div-asset-info">
             <div id="asset-content-1" class="tab-pane fade in active">
-              <div class="row div-history-event">
+              <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 class="media-left">
                     <a href="javascript:void(0);">
@@ -843,7 +842,7 @@
 
 <script>
 import Common from '../../common/Common.js';
-
+import { Notify } from 'pc-component-v3';
 
 
 
@@ -995,7 +994,7 @@ export default {
     findAssetInstance: function (assetInstanceId) {
       var _self = this;
       $.ajax({
-        url: Common.getApiURL('AssetInstanceResource/findAssetInstanceById'),
+        url: Common.getApiURL('AssetInstanceResource/findAssetInstanceById1'),
         type: 'post',
         data: JSON.stringify({
           'assetInstanceId': assetInstanceId,
@@ -1005,7 +1004,11 @@ export default {
           Common.addTokenToRequest(request);
         },
         success: function (data) {
-          _self.showItem(data);
+          if(data.errorCode === 0){
+            _self.showItem(data.data);
+          }else{
+            Notify.error('查询错误', data.errorMessage, true);
+          }
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
           Common.processException(XMLHttpRequest, textStatus, errorThrown);
@@ -1054,14 +1057,14 @@ export default {
           Common.addTokenToRequest(request);
         },
         success: function (data) {
-          console.log(JSON.stringify(data));
-          if (data != undefined) {
-            //_self.imageInfos = _self.getUniqueImageInfos(data.resultList);
-            _self.imageInfos = data.resultList;
-            _self.pagination2.total = data.maxCount;
+          if(data.errorCode === 0){
+            _self.imageInfos = data.datas;
+            _self.pagination2.total = data.total;
             _self.pagination2.last_page = Math.ceil(
               _self.pagination2.total / _self.pagination2.per_page,
             );
+          }else{
+            Notify.error('查询错误', data.errorMessage, true);
           }
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
@@ -1233,8 +1236,13 @@ export default {
           Common.addTokenToRequest(request);
         },
         success: function (data) {
-          console.log(JSON.stringify(data));
-          _self.imageUrlTest = data;
+          
+          if(data.errorCode === 0){
+            _self.imageUrlTest = data.datas;
+          }else{
+            Notify.error('查询错误', data.errorMessage, true);
+          }
+
           _self.modal = true;
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
@@ -1258,8 +1266,12 @@ export default {
           Common.addTokenToRequest(request);
         },
         success: function (data) {
-          console.log(JSON.stringify(data));
-          _self.historyEvents = data;
+          if(data.errorCode === 0){
+            _self.historyEvents = data.datas;
+          }else{
+            Notify.error('查询错误', data.errorMessage, true);
+          }
+          
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
           Common.processException(XMLHttpRequest, textStatus, errorThrown);
@@ -1268,7 +1280,7 @@ export default {
     },
     // 获取图标
     getHistoryIconSrc: function (title) {
-      var iconSrc = '../../../static/image/';
+      var iconSrc = '/static/assets/client-eam/image-asset-instance-change/';
       switch (title) {
       case '资产盘点':
         iconSrc += 'inventory.png';
@@ -1307,7 +1319,7 @@ export default {
         iconSrc += 'assetLocation.png';
         break;
       case '部门转移':
-        iconSrc += 'organization.png';
+        iconSrc += 'organization.jpg';
         break;
       case '项目调整':
         iconSrc += 'projectAdjust.png';

+ 16 - 15
src/components/customer/PerformInventoryTasks.vue

@@ -67,11 +67,12 @@
           </thead>
           <tbody>
             <tr v-for="(assetInventoryLine, index) in assetInventoryLines" :key="assetInventoryLine.assetInventoryLineId">
-              <td>{{ assetInventoryLine['资产名称'] }}</td>
-              <td>{{ assetInventoryLine['资产编号'] }}</td>
-              <td>{{ assetInventoryLine['卡片编号'] }}</td>
+              <td>{{ assetInventoryLine['assetName'] }}</td>
+              <td>{{ assetInventoryLine['assetNo'] }}</td>
+              <td>{{ assetInventoryLine['cardNo'] }}</td>
               <td>
                 <select v-model="assetInventoryLine.useStatusId" class="form-control" placeholder="盘点使用状态">
+                  <option />
                   <option v-for="useStatus in useStatusList" :key="useStatus.id" :value="useStatus.id">
                     {{ useStatus.text }}
                   </option>
@@ -89,17 +90,17 @@
                   人工确认
                 </button>
               </td>
-              <td>{{ assetInventoryLine['账面位置'] }}</td>
-              <td>{{ assetInventoryLine['账面使用状态'] }}</td>
-              <td>{{ assetInventoryLine['规格型号'] }}</td>
-              <td>{{ assetInventoryLine['类别名称'] }}</td>
-              <td>{{ assetInventoryLine['责任人'] }}</td>
-              <td>{{ assetInventoryLine['使用人'] }}</td>
-              <td>{{ assetInventoryLine['保管人'] }}</td>
-              <td>{{ assetInventoryLine['所属单位'] }}</td>
-              <td>{{ assetInventoryLine['所属部门'] }}</td>
-              <td>{{ assetInventoryLine['使用单位'] }}</td>
-              <td>{{ assetInventoryLine['使用部门'] }}</td>
+              <td>{{ assetInventoryLine['locationName'] }}</td>
+              <td>{{ assetInventoryLine['useStatusName'] }}</td>
+              <td>{{ assetInventoryLine['assetType'] }}</td>
+              <td>{{ assetInventoryLine['assetCategoryName'] }}</td>
+              <td>{{ assetInventoryLine['custodianUserName'] }}</td>
+              <td>{{ assetInventoryLine['useUserName'] }}</td>
+              <td>{{ assetInventoryLine['depositoryUserName'] }}</td>
+              <td>{{ assetInventoryLine['clientName'] }}</td>
+              <td>{{ assetInventoryLine['organizationName'] }}</td>
+              <td>{{ assetInventoryLine['userClientName'] }}</td>
+              <td>{{ assetInventoryLine['useOrganizationName'] }}</td>
               <td>
                 <button class="btn btn-link" @click="openCurdWindow(assetInventoryLine)">
                   查看
@@ -380,7 +381,7 @@ export default {
        */
     updateAssetInventoryLine: function(assetInventoryLine, index) {
       let _self = this;
-      if ((assetInventoryLine.description == null || assetInventoryLine.description === '') &&
+      if ((assetInventoryLine.description == null || assetInventoryLine.description === '') ||
           ((assetInventoryLine.useStatusId == null || assetInventoryLine.useStatusId === ''))) {
         Notify.error('错误', '请填写"盘点使用状态"和"备注"信息\'。');
         return;

+ 88 - 50
src/locales/en-US.json

@@ -391,56 +391,94 @@
       "remarks": "Remarks"
     },
     "AssetInstanceSearchDetail": {
-      "assetCardDetails": "Asset Card Details",
-      "ownerClient": "Owner Client",
-      "ownerDepartment": "Owner Department",
-      "book": "Book",
-      "period": "Period",
-      "balancingSegment": "Balancing Segment",
-      "assetName": "Asset Name",
-      "assetNumber": "Asset Number",
-      "barcode": "Barcode",
-      "epc": "epc",
-      "categoryName": "Category Name",
-      "location": "Location",
-      "originalValue": "OriginalValue",
-      "quantity": "Quantity",
-      "acquisitionDate": "Acquisition Date",
-      "netWorth": "Net Worth",
-      "lifeYearMonth": "Life Year Month",
-      "costCenter": "Cost Center",
-      "cost": "Cost",
-      "assetCostAccount": "Asset Cost Account",
-      "depreciationAmount": "Depreciation Amount",
-      "account": "Account",
-      "ytdDepreciation": "Ytd Depreciation",
-      "ltdDepreciation": "Ltd Depreciation",
-      "reserveAccount": "Reserve Account",
-      "nbvPeriodEnd": "nbv Period End",
-      "method": "Method",
-      "serialNo": "Serial Number",
-      "tagNumber": "Tag Number",
-      "lifeCycle": "Life Cycle",
-      "currentLocation": "Current Location",
-      "historicalPosition": "Historical Position",
-      "historicalPosition1": "Historical Position One",
-      "inAndOutRecords": "In And Out Records",
-      "time": "Time",
-      "startTime": "Start Time",
-      "endTime": "End Time",
-      "enterTime": "Enter Time",
-      "leaveTime": "Leave Time",
-      "determine": "Determine",
-      "serialNumber": "Serial Number",
-      "place": "Place",
-      "picture": "Picture",
-      "scanTime": "Scan Time",
-      "scanner": "Scanner",
-      "totalQueries": "Total Queries",
-      "data": "Data",
-      "strip": "Strip",
-      "true": "True",
-      "false": "False"
+      "assetCardDetails": "Asset Card Details", 
+    "ownerClient": "Owner Client", 
+    "ownerDepartment": "Owner Department", 
+    "useClient": "Use Client", 
+    "useDepartment": "Use Department", 
+    "assetName": "Asset Name", 
+    "assetNumber": "Asset No", 
+    "originalAssetNumber": "Original Asset No", 
+    "cardName": "Card Name", 
+    "cardNumber": "Card No", 
+    "barcode": "Barcode", 
+    "epc": "EPC", 
+    "noteName": "Note Name", 
+    "type": "Type", 
+    "categoryName": "Category Name", 
+    "projectName": "Project Name", 
+    "placeOfPlacement": "Place Of Placement", 
+    "placementLocation": "Placement Room", 
+    "originalValue": "Original Value", 
+    "unitOfMeasurement": "Unit Of Measurement", 
+    "subscriber": "Subscriber", 
+    "purchaser": "Purchaser", 
+    "receiver": "Receiver", 
+    "use": "Use", 
+    "custodian": "Custodian", 
+    "personLiable": "Person Liable", 
+    "usageStatus": "Usage Status", 
+    "quantity": "Quantity", 
+    "validUntil": "Valid Until", 
+    "technicalIndex": "Technical Index", 
+    "waysToIncrease": "Ways To Increase", 
+    "depreciationMethod": "Depreciation Method", 
+    "serviceMonths": "Service Months", 
+    "startUseDate": " Start Use Date", 
+    "totalAmountOfWork": "Total Amount Of Work", 
+    "accruedMonth": "Accrued Month", 
+    "netResidualValueRate": "Net Residual Value Rate", 
+    "netResidualValue": "Net Residual Value", 
+    "accumulatedDepreciation": " Accumulated Depreciation", 
+    "monthlyDepreciationRate": "Monthly Depreciation Rate", 
+    "theAmountOfDepreciationIsWithdrawnThisMonth": "The Amount Of Depreciation Is Withdrawn This Month", 
+    "netWorth": "Net Worth", 
+    "pictureURL": "Picture URL", 
+    "invoicePictureAddress": "Invoice Picture Address", 
+    "otherPictureWebsites": "Other Picture Websites", 
+    "remarks": "Remarks", 
+    "necessaryToMakeAnAppointment": "Necessary To Make An Appointment", 
+    "needToMaintain": "Need To Maintain", 
+    "supplier": "Supplier", 
+    "manufacturer": "Manufacturer", 
+    "maintenanceUnit": "Maintenance Unit", 
+    "factoryNumber": "Factory No", 
+    "detailedParameters": "Detailed Parameters", 
+    "operatingProcedures": "Operating Procedures", 
+    "purchaseDate": "Purchase Date", 
+    "financialEntryDate": "Financial Entry Date", 
+    "contractNo": "Contract No", 
+    "invoiceNumber": "Invoice No", 
+    "warrantyDeadline": "Warranty Deadline", 
+    "importTime": "Import Time", 
+    "accountingSubjects": "Accounting Subjects", 
+    "userInput": "User(Input)", 
+    "licensePlate": "License Plate", 
+    "selfNumbering": "Self No", 
+    "computerName": "Computer Name", 
+    "ipAddress": "IP Address", 
+    "macAddress": "MAC Address", 
+    "lifeCycle": "Life Cycle", 
+    "currentLocation": "Current Location", 
+    "historicalPosition": "Historical Position", 
+    "historicalPosition1": "Historical Position One", 
+    "inAndOutRecords": "In And Out Records", 
+    "time": "Time", 
+    "startTime": "Start Time", 
+    "endTime": "End Time", 
+    "enterTime": "Enter Time", 
+    "leaveTime": "Leave Time", 
+    "determine": "Determine", 
+    "serialNumber": "Serial No", 
+    "place": "Place", 
+    "picture": "Picture", 
+    "scanTime": "Scan Time", 
+    "scanner": "Scanner", 
+    "totalQueries": "Total Queries", 
+    "data": "Data", 
+    "strip": "Strip", 
+    "true": "True", 
+    "false": "False"
     },
     "AssetInventorySearch": {
       "generateAssetCountDetails": "Generate Asset Count Details",

+ 89 - 51
src/locales/zh-CN.json

@@ -478,57 +478,95 @@
       "userInput": "(录入)",
       "remarks": "备注"
     },
-    "AssetInstanceSearchDetail": {
-      "assetCardDetails": "资产卡片详细信息",
-      "ownerDepartment": "所属部门",
-      "book": "账套",
-      "period": "期间",
-      "balancingSegment": "公司代码",
-      "assetName": "资产名称",
-      "assetNumber": "资产编号",
-      "barcode": "二维码",
-      "epc": "电子编码",
-      "categoryName": "类别名称",
-      "location": "地点",
-      "originalValue": "原值",
-      "quantity": "数量",
-      "acquisitionDate": "启用日期",
-      "netWorth": "净值",
-      "lifeYearMonth": "折旧年限",
-      "costCenter": "成本中心",
-      "cost": "资产成本",
-      "assetCostAccount": "原值会计科目",
-      "depreciationAmount": "本期折旧金额",
-      "account": "折旧会计科目",
-      "ytdDepreciation": "本年度折旧额",
-      "ltdDepreciation": "总折旧额",
-      "reserveAccount": "累计折旧会计科目",
-      "nbvPeriodEnd": "期末净现值",
-      "method": "折旧方法",
-      "serialNo": "序列号",
-      "tagNumber": "标签编号",
-      "lifeCycle": "生命周期",
-      "currentLocation": "当前位置",
-      "historicalPosition": "历史位置",
-      "historicalPosition1": "历史位置1",
-      "inAndOutRecords": "进出记录",
-      "time": "时间",
-      "enterTime": "进入时间",
-      "leaveTime": "离开时间",
-      "startTime": "开始时间",
-      "endTime": "结束时间",
-      "determine": "确定",
-      "serialNumber": "序号",
-      "place": "地点",
-      "picture": "图片",
-      "scanTime": "扫描时间",
-      "scanner": "扫描人",
-      "position": "扫描位置",
-      "totalQueries": "共查询到",
-      "data": "数据",
-      "strip": "条",
-      "true": "是",
-      "false": "否"
+    "AssetInstanceSearchDetail": { "assetCardDetails": "资产卡片详细信息", 
+    "ownerClient": "所属单位", 
+    "ownerDepartment": "所属部门", 
+    "useClient": "使用单位", 
+    "useDepartment": "使用部门", 
+    "assetName": "资产名称", 
+    "assetNumber": "资产编号", 
+    "originalAssetNumber": "原资产编号", 
+    "cardName": "卡片名称", 
+    "cardNumber": "卡片编号", 
+    "barcode": "二维码", 
+    "epc": "电子编码", 
+    "noteName": "备注名", 
+    "type": "规格型号", 
+    "categoryName": "类别名称", 
+    "projectName": "项目名称", 
+    "placeOfPlacement": "放置地点", 
+    "placementLocation": "放置房间", 
+    "originalValue": "原值", 
+    "unitOfMeasurement": "计量单位", 
+    "subscriber": "申购人", 
+    "purchaser": "采购人", 
+    "receiver": "领用人", 
+    "use": "使用人", 
+    "custodian": "保管人", 
+    "personLiable": "责任人", 
+    "usageStatus": "使用状况", 
+    "quantity": "数量", 
+    "validUntil": "有效日期至", 
+    "technicalIndex": "技术指标", 
+    "waysToIncrease": "增加方式", 
+    "depreciationMethod": "折旧方法", 
+    "serviceMonths": "使用月限", 
+    "startUseDate": "开始使用日期", 
+    "totalAmountOfWork": "工作总量", 
+    "accruedMonth": "已计提月份", 
+    "netResidualValueRate": "净残值率", 
+    "netResidualValue": "净残值", 
+    "accumulatedDepreciation": "累计折旧", 
+    "monthlyDepreciationRate": "月折旧率", 
+    "theAmountOfDepreciationIsWithdrawnThisMonth": "本月计提折旧额", 
+    "netWorth": "净值", 
+    "pictureURL": "图片网址", 
+    "invoicePictureAddress": "发票图片地址", 
+    "otherPictureWebsites": "其他图片网址", 
+    "remarks": "备注", 
+    "necessaryToMakeAnAppointment": "需预约", 
+    "needToMaintain": "需保养", 
+    "supplier": "供应商", 
+    "manufacturer": "制造商", 
+    "maintenanceUnit": "维保单位", 
+    "factoryNumber": "出厂编号", 
+    "detailedParameters": "详细参数", 
+    "operatingProcedures": "操作规程", 
+    "purchaseDate": "购置(出厂)日期", 
+    "financialEntryDate": "财务入账日期", 
+    "contractNo": "合同编号", 
+    "invoiceNumber": "发票编号", 
+    "warrantyDeadline": "保修截止日期", 
+    "importTime": "导入时间", 
+    "accountingSubjects": "会计科目", 
+    "userInput": "使用人(录入)", 
+    "licensePlate": "车牌号码", 
+    "selfNumbering": "自编号", 
+    "computerName": "计算机名称", 
+    "ipAddress": "IP地址", 
+    "macAddress": "MAC地址", 
+    "lifeCycle": "生命周期", 
+    "currentLocation": "当前位置", 
+    "historicalPosition": "历史位置", 
+    "historicalPosition1": "历史位置1", 
+    "inAndOutRecords": "进出记录", 
+    "time": "时间", 
+    "enterTime": "进入时间", 
+    "leaveTime": "离开时间", 
+    "startTime": "开始时间", 
+    "endTime": "结束时间", 
+    "determine": "确定", 
+    "serialNumber": "序号", 
+    "place": "地点", 
+    "picture": "图片", 
+    "scanTime": "扫描时间", 
+    "scanner": "扫描人", 
+    "position": "扫描位置", 
+    "totalQueries": "共查询到", 
+    "data": "数据", 
+    "strip": "条", 
+    "true": "是", 
+    "false": "否"
     },
     "AssetInventorySearch": {
       "generateAssetCountDetails": "生成资产盘点明细",

+ 7 - 12
src/main.js

@@ -44,16 +44,13 @@ let router = createRouter({
 });
 
 
-function render(props = {}) {
-  const { container } = props;
-  instance = createApp(App);
-  instance.use(Antd);
-  instance.use(i18n);
-  instance.use(router);
-  instance.use(VTooltip);
-  instance.use(PcClientComponent);
-  instance.mount('#app-client-eam');
-}
+instance = createApp(App);
+instance.use(Antd);
+instance.use(i18n);
+instance.use(router);
+instance.use(VTooltip);
+instance.use(PcClientComponent);
+instance.mount('#app-client-eam');
 
 
 /**
@@ -117,5 +114,3 @@ function render(props = {}) {
 //     next();
 //   }
 // });
-
-render({});