Browse Source

完善履历

whj 1 year ago
parent
commit
c3c3357ae4

+ 2 - 1
src/components/Table/index.js

@@ -86,8 +86,9 @@ export default {
       default: false
     },
     onExpand: {
-      type: Function,
+      type: Function | Boolean,
       default: false
+
     }
   }),
   watch: {

+ 12 - 72
src/views/sb/info/SbInfoC.vue

@@ -264,18 +264,11 @@
                   :text="yesNoMap[text]" />
               </span>
               <div slot="expandedRowRender" slot-scope="record" style="width:100%;">
-
-                <a-card title="设备更改记录" :bordered="false" style="width:100%;position: relative; z-inde:9999">
+                <a-card :bordered="false" style="width:100%;position: relative; z-inde:9999">
                   <a slot="extra" @click="addLogBySb(record)">新增</a>
-                  <a-table :columns="childColumns1" :data-source="childMap[1]">
-                  </a-table>
-                </a-card>
-
-                <a-card title="检定记录" :bordered="false" style="width:100%">
-                  <a-table :columns="childColumns2" :data-source="childMap[2]">
+                  <a-table :columns="childColumns1" :data-source="childMap">
                   </a-table>
                 </a-card>
-
               </div>
             </s-table>
           </div>
@@ -399,7 +392,7 @@ export default {
       lineMap: {},
       unitMap: {},
       areaList: {},
-      childMap: {},
+      childMap: [],
       companyList: {},
       projectList: {},
       isChildMap: {},
@@ -643,58 +636,14 @@ export default {
           dataIndex: 'sbName'
         },
         {
-          title: '设备位号',
+          title: '操作类型',
           checked: true,
           width: 200,
-          dataIndex: 'sbPositionNo'
-        },
-        {
-          title: '设备位置',
-          checked: true,
-          width: 200,
-          dataIndex: 'sbPositionName'
-        },
-        {
-          title: '设备类型',
-          checked: true,
-          width: 200,
-          dataIndex: 'typeName'
-        },
-        {
-          title: '规格型号',
-          checked: true,
-          width: 200,
-          dataIndex: 'model'
-        },
-        {
-          title: '更改内容',
-          checked: true,
-          width: 200,
-          dataIndex: 'content'
-        },
-        {
-          title: '操作时间',
-          checked: true,
-          width: 200,
-          dataIndex: 'createdTime'
-        }
-      ],
-      childColumns2: [
-        {
-          title: '序号',
-          dataIndex: 'index',
-          width: 100,
-          checked: true,
+          dataIndex: 'otherType',
           customRender: (text, record, index) => {
-            return index + 1
+            return this.BaseTool.Object.getField(this.otherTypeMap, text)
           }
         },
-        {
-          title: '设备名称',
-          checked: true,
-          width: 200,
-          dataIndex: 'sbName'
-        },
         {
           title: '设备位号',
           checked: true,
@@ -707,31 +656,20 @@ export default {
           width: 200,
           dataIndex: 'positionName'
         },
-        {
-          title: '设备类型',
-          checked: true,
-          width: 200,
-          dataIndex: 'typeName'
-        },
         {
           title: '规格型号',
           checked: true,
           width: 200,
           dataIndex: 'sbModel'
         },
-        {
-          title: '检定有效期',
-          checked: true,
-          width: 200,
-          dataIndex: 'nextCheckDate'
-        },
         {
           title: '操作时间',
           checked: true,
           width: 200,
-          dataIndex: 'updateTime'
+          dataIndex: 'createdTime'
         }
       ],
+      otherTypeMap: {},
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         parameter = {
@@ -766,6 +704,8 @@ export default {
     this.queryParam.parentId = this.$route.query.parentId
     this.queryParam.parentName = this.$route.query.parentName
     this.tableOption()
+    this.otherTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_MEASURE_OTHER_TYPE)
+
     this.depreciationTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_DEPRECIATIONTYPE)
     this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_LEVEL)
     this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_INFO_STATUS)
@@ -1022,10 +962,10 @@ export default {
     },
     onExpand (expanded, record) { // expanded判断展开or收缩操作,record当前行数据
       console.log(expanded, record)
-      this.childMap = {}
+      this.childMap = []
       if (expanded) {
         getLogBySbId({ sbId: record.id }).then(res => {
-          this.childMap = res.data
+          this.childMap = res.data.rows
         })
       }
     },

+ 1 - 0
src/views/sb/info/modules/AddLogForm.vue

@@ -44,6 +44,7 @@ export default {
   },
   created () {
     this.otherTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_MEASURE_OTHER_TYPE)
+    delete this.otherTypeMap[1]
   },
   methods: {
     base (record) {

+ 2 - 4
src/views/sb/resume/PositionNoResume.vue

@@ -33,7 +33,7 @@
       </a-form>
     </div>
 
-    <div class="table-operator" style="margin-bottom: 8px;">
+    <!-- <div class="table-operator" style="margin-bottom: 8px;">
       <a-button v-if="$auth('sb-run-fills-add')" type="primary" icon="plus" @click="$refs.baseFormList.base(null,DictCache.VALUE.FILL_INFO_USE_TYPE.FILL_INFO_USE_TYPE_YUN_XING)">新增</a-button>
       <a-button style="margin-left: 8px" v-if="$auth('sb-run-fills-export')" type="primary" icon="download" @click="doExport">导出</a-button>
       <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('sb-run-fills-del')">
@@ -46,7 +46,7 @@
           批量操作 <a-icon type="down" />
         </a-button>
       </a-dropdown>
-    </div>
+    </div> -->
 
     <s-table
       ref="table"
@@ -56,8 +56,6 @@
       :bordered="this.MyGlobalConstant.BORDERED"
       :columns="columns"
       :data="loadData"
-      :alert="options.alert"
-      :rowSelection="options.rowSelection"
       showPagination="auto"
     >
       <a-table

+ 1 - 1
src/views/sb/resume/SbResume.vue

@@ -123,7 +123,7 @@ export default {
           width: 200,
           dataIndex: 'otherType',
           customRender: (text, record, index) => {
-            return this.otherTypeMap[text]
+            return this.BaseTool.Object.getField(this.otherTypeMap, text)
           }
         },
         {

+ 5 - 0
src/views/sb/scraps/modules/DetailAudit.vue

@@ -150,6 +150,11 @@ export default {
           title: '实际数量',
           dataIndex: 'realNum',
           width: 150
+        },
+        {
+          title: '库存数量',
+          dataIndex: 'storeNum',
+          width: 150
         }
       ]
     }