瀏覽代碼

3.0.43 资产盘点归档集成到盘点流程中、修复批量变动模块字段显示异常

liuyanpeng 2 年之前
父節點
當前提交
1933d39655

+ 1 - 1
package.json

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

+ 5 - 0
src/components/customer/AssetInventory.vue

@@ -31,6 +31,11 @@
             :description="$t('lang.AssetInventory.inventoryDataProcessingDesc')"
             @click="openRouter('/eam/inventoryDataProcessing')"
           />
+          <a-step
+            title="盘点数据归档"
+            description="对历史盘点数据进行归档"
+            @click="openRouter('/eam/RunDataArchive')"
+          />
         </a-steps>
       </div>
     </section>

+ 4 - 23
src/components/customer/AssetInventoryStep5.vue

@@ -50,7 +50,7 @@
 
       <div class="grid-item-row1-column2">
         <a-form-item label="盘点单名称">
-          <a-input v-model:value="inventorySheetName" size="default" style="width: 1130px" />
+          <a-input v-model:value="inventorySheetName" size="default" style="width: 766px" />
           <!--          <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
@@ -584,7 +584,6 @@ import AssetInventoryLineResource from '../../api/asset/AssetInventoryLineResour
 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';
 
@@ -601,27 +600,9 @@ export default {
   // 定义抛出的事件名称
   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), //模态框状态
+      visible: false, //模态框状态
       clientOrganizations: [], // 所属部门
       responseClientOrganizations: [], // 使用部门
       categories: [], // 资产类别
@@ -794,7 +775,7 @@ export default {
         data: formData,
         contentType: false,
         processData: false,
-        success: function ({errorCode, datas}) {
+        success: function ({errorCode, datas,errorMessage}) {
           if (errorCode === 0) {
             if (datas) {
               datas.forEach(item => {
@@ -807,7 +788,7 @@ export default {
             message.success('上传成功,已加入至盘点清单', 5);
             _self.visible = false; // 关闭模态框
           } else {
-            message.error('上传失败');
+            message.error(errorMessage);
           }
           _self.loading = false;
         },

+ 101 - 0
src/components/customer/RunDataArchive.vue

@@ -0,0 +1,101 @@
+<template>
+  <div class="grid-container">
+    <div class="grid-item-1">
+      <div>
+        <Navbar
+          title="盘点数据归档"
+          :is-go-back="false"
+        />
+      </div>
+      <div id="step-container" style="margin-top: 20px">
+        <section>
+          <a-steps :current="pageInformation.currentStep">
+            <a-step title="选择归档操作" />
+            <a-step title="数据归档" />
+          </a-steps>
+        </section>
+      </div>
+      <a-divider />
+      <section>
+        <RunDataArchiveStep
+          v-if="pageInformation.showPage == 0"
+          :current-step="pageInformation"
+          @next="nextStep"
+        />
+      </section>
+    </div>
+  </div>
+</template>
+
+<script>
+import RunDataArchiveStep from './RunDataArchiveStep.vue';
+
+export default {
+  components: {
+    RunDataArchiveStep,
+  },
+  data: function () {
+    return {
+      pageInformation: {
+        currentStep: 0,
+        showPage: 0,
+        assetInventoryStep3: undefined,
+      },
+    };
+  },
+
+  methods: {
+    nextStep: function (data) {
+      var _self = this;
+      _self.pageInformation = data;
+      Object.assign(this.pageInformation, data);
+    },
+    previousStep: function (data) {
+      var _self = this;
+      _self.pageInformation = data;
+    },
+   
+
+    mounted: function () {},
+  },
+};
+</script>
+<style scoped>
+.grid-container {
+  display: grid;
+  grid-template-rows: 8% 8% 84%;
+  grid-template-columns: 100%;
+  width: 100%;
+  /*视口被均分为 100 单位的 vh 占据整个窗口,扣掉顶部 topNav 的距离后,计算得到 responseOrganizationSelect 的高度*/
+  height: calc(100vh - 130px);
+  margin-top: 10px;
+}
+
+.grid-item-1 {
+  grid-row: 1/2;
+}
+
+.grid-item-2 {
+  grid-row: 2/3;
+}
+
+.grid-item-3 {
+  grid-row: 3/4;
+}
+
+.box {
+  border: 1px #ccc solid;
+  margin-bottom: 15px;
+  padding-top: 10px;
+  border-radius: 5px;
+  background-color: #ffffff;
+}
+
+.label {
+  float: left;
+}
+
+.div-form {
+  margin-bottom: 10px;
+}
+</style>

+ 116 - 0
src/components/customer/RunDataArchiveStep.vue

@@ -0,0 +1,116 @@
+<template>
+  <div class="grid-container">
+    <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="2">查看历史归档数据</a-radio>
+        </a-radio-group>
+      </div>
+      <a-divider />
+      <a-button type="primary" @click="previousStep">上一步</a-button>
+      <a-button style="float: right;" type="primary" @click="next">下一步</a-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import { Notify } from 'pc-component-v3';
+
+export default {
+
+  components: {
+    
+    
+  },
+  props: {
+    currentStep: {
+      type: Object,
+      default(){
+        return {};
+      },
+    },
+  },
+  emits: ['next'],
+  data: function() {
+    return {
+      value: undefined,
+      radioStyle: {
+        size: 'large',
+        display: 'flex',
+        height: '60px',
+        lineHeight: '60px',
+      },
+      isShow: false,
+      step: undefined,
+    };
+  },
+
+  methods: {
+    next: function() {
+      var _self = this;
+      if(_self.value == undefined || _self.value == null){
+        Notify.error('错误','未选择数据归档操作',1000);
+        return;
+      }
+      // var data = {
+      //   currentStep: 1,
+      //   showPage: _self.value,
+      //   assetInventoryStep3: undefined,
+      // };
+      if(_self.value == 1){
+        this.$router.push({path:'/desktop/dataArchive',query:{businessName:'资产盘点'}});
+      } else {
+        this.$router.push({path:'/desktop/info/20231117_152804'});
+      }
+    },
+    previousStep: function() {
+      var _self = this;
+      _self.$router.push('/eam/assetInventory');
+    },
+
+    mounted: function() {
+
+    },
+  },
+};
+</script>
+<style scoped>
+  .grid-container {
+    display: grid;
+    grid-template-rows: 8% 8% 84%;
+    grid-template-columns: 100%;
+    width: 100%;
+    /*视口被均分为 100 单位的 vh 占据整个窗口,扣掉顶部 topNav 的距离后,计算得到 responseOrganizationSelect 的高度*/
+    height: calc(100vh - 130px);
+    margin-top: 10px;
+  }
+
+  .grid-item-1 {
+    grid-row: 1/2;
+  }
+
+  .grid-item-2 {
+    grid-row: 2/3;
+  }
+
+  .grid-item-3 {
+    grid-row: 3/4;
+  }
+
+  .box {
+    border: 1px #ccc solid;
+    margin-bottom: 15px;
+    padding-top: 10px;
+    border-radius: 5px;
+    background-color: #ffffff;
+  }
+
+  .label {
+    float: left;
+  }
+
+  .div-form {
+    margin-bottom: 10px;
+  }
+</style>

+ 2 - 1
src/index.js

@@ -40,7 +40,7 @@ import PerformInventoryTasks from './components/customer/PerformInventoryTasks.v
 import InventoryDataProcessing from './components/customer/InventoryDataProcessing.vue';
 import AssetLabelPrint from './components/customer/AssetLabelPrint.vue';
 import InventoryAssetInstanceSearch from './customer/InventoryAssetInstanceSearch.vue';
-
+import RunDataArchive from './components/customer/RunDataArchive.vue';
 export {
   langZhCn,
   langEnUs,
@@ -81,4 +81,5 @@ export {
   InventoryDataProcessing,
   AssetLabelPrint,
   InventoryAssetInstanceSearch,
+  RunDataArchive,
 };

+ 11 - 1
src/locales/zh-CN.json

@@ -1033,7 +1033,17 @@
       "serialNumber": "序列号",
       "tagNumber": "标签编号",
       "balancingSegment": "公司代码",
-      "description": "资产名称"
+      "description": "资产名称",
+      "ownerDepartment": "所属单位部门",
+      "useDepartment": "使用单位部门",
+      "projectName": "项目名称",
+      "originalValue": "原值",
+      "placeOfPlacement": "原放置位置",
+      "aLocationToBePlacedIn":"放置位置",
+      "startDate": "开始使用日期",
+      "user": "使用人",
+      "specificationUser": "规格使用人(输入)",
+      "usageStatus": "使用状况"
     },
     "AssetBatchOperationQueue": {
       "book": "账套",

+ 4 - 0
src/router/index.js

@@ -33,6 +33,7 @@ const ManuallyConfirmCountingData = () => import(/* webpackChunkName: "component
 const PerformInventoryTasks = () => import(/* webpackChunkName: "component-33" */ '../components/customer/PerformInventoryTasks.vue');
 const InventoryDataProcessing = () => import(/* webpackChunkName: "component-34" */ '../components/customer/InventoryDataProcessing.vue');
 const AssetLabelPrint = () => import(/* webpackChunkName: "component-35" */ '../components/customer/AssetLabelPrint.vue');
+const RunDataArchive = () => import(/* webpackChunkName: "component-35" */ '../components/customer/RunDataArchive.vue');
 const routes = [
 
   { path: '/eam/hello-world', component: HelloWorld },
@@ -290,6 +291,9 @@ const routes = [
   {
     path: '/eam/assetLabelPrint', component: AssetLabelPrint,
   },
+  {
+    path: '/eam/runDataArchive', component: RunDataArchive,
+  },
 ];