xiongchao 3 年之前
父节点
当前提交
d0fbde0f64
共有 3 个文件被更改,包括 65 次插入88 次删除
  1. 6 6
      src/views/sb/info/MeasureSbInfo.vue
  2. 52 75
      src/views/sb/info/ParentSbInfo.vue
  3. 7 7
      src/views/sb/info/SbInfo.vue

+ 6 - 6
src/views/sb/info/MeasureSbInfo.vue

@@ -75,7 +75,7 @@
             :data="loadData"
             :alert="options.alert"
             :rowSelection="options.rowSelection"
-            :scroll="{x: BaseTool.Constant.scrollX, y: BaseTool.Constant.scrollY }"
+            :scroll="{x: 1000 }"
             showPagination="auto"
           >
             <span slot="action" slot-scope="record">
@@ -192,14 +192,14 @@ export default {
         {
           title: '设备编号',
           dataIndex: 'no',
-          width: 100,
+          width: 120,
           checked: true
         },
         {
           title: '设备类型',
           checked: true,
           dataIndex: 'type',
-          width: 100,
+          width: 120,
           customRender: (text, record, index) => {
             return record.typeName
           }
@@ -208,7 +208,7 @@ export default {
           title: '设备等级',
           checked: true,
           dataIndex: 'level',
-          width: 100,
+          width: 120,
           customRender: (text, record, index) => {
             return this.BaseTool.Object.getField(this.levelMap, text)
           }
@@ -224,13 +224,13 @@ export default {
         {
           title: '购置日期',
           dataIndex: 'buyDate',
-          width: 100,
+          width: 120,
           checked: true
         },
         {
           title: '投用日期',
           dataIndex: 'startDate',
-          width: 100,
+          width: 120,
           checked: true
         },
         {

+ 52 - 75
src/views/sb/info/ParentSbInfo.vue

@@ -1,17 +1,7 @@
 <template>
   <a-card :bordered="false">
     <a-row :gutter="8" v-show="visible">
-      <a-col :span="4">
-        <a-tree
-          @expand="onExpand"
-          :expandedKeys="expandedKeys"
-          :autoExpandParent="true"
-          @select="onSelect"
-          :selectedKeys="selectedKeys"
-          :treeData="treeData"
-        />
-      </a-col>
-      <a-col :span="20">
+      <a-col :span="24">
         <div>
           <div class="table-page-search-wrapper">
             <a-form layout="inline">
@@ -73,7 +63,7 @@
             :data="loadData"
             :alert="options.alert"
             :rowSelection="options.rowSelection"
-            :scroll="{x: BaseTool.Constant.scrollX, y: BaseTool.Constant.scrollY }"
+            :scroll="{x: 1000}"
             showPagination="auto"
           >
             <span slot="action" slot-scope="record">
@@ -154,7 +144,8 @@ export default {
     return {
       // 查询参数
       queryParam: {
-        filter: this.filter
+        filter: this.filter,
+        isChild: this.DictCache.VALUE.SB_IS_CHILD.IS_PARENT
       },
       depreciationTypeMap: {},
       visible: true,
@@ -175,6 +166,7 @@ export default {
         {
           title: '序号',
           dataIndex: 'index',
+          width: 100,
           checked: true,
           customRender: (text, record, index) => {
             return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
@@ -183,52 +175,35 @@ export default {
         {
           title: '设备名称',
           checked: true,
+          width: 200,
           dataIndex: 'name'
         },
         {
           title: '设备编号',
           dataIndex: 'no',
+          width: 100,
           checked: true
         },
         {
-          title: '自编号',
-          checked: true,
-          dataIndex: 'zbh'
-        },
-        {
-          title: '车牌号',
-          checked: true,
-          dataIndex: 'cph'
-        },
-        {
-          title: '型号',
-          checked: true,
-          dataIndex: 'model'
-        },
-        {
-          title: '财务编码',
-          dataIndex: 'financingNo'
+          title: '设备编号',
+          dataIndex: 'no',
+          width: 120,
+          checked: true
         },
         {
           title: '设备类型',
           checked: true,
           dataIndex: 'type',
+          width: 120,
           customRender: (text, record, index) => {
             return record.typeName
           }
         },
-      /*  {
-          title: '自定义类型',
-          checked: true,
-          dataIndex: 'useType',
-          customRender: (text, record, index) => {
-            return this.BaseTool.Object.getField(this.useTypeMap, text)
-          }
-        },*/
         {
           title: '设备等级',
           checked: true,
           dataIndex: 'level',
+          width: 120,
           customRender: (text, record, index) => {
             return this.BaseTool.Object.getField(this.levelMap, text)
           }
@@ -236,67 +211,69 @@ export default {
         {
           title: '设备原值',
           dataIndex: 'initialValue',
+          width: 100,
           customRender: (text, record, index) => {
             return this.BaseTool.Amount.formatter(text)
           }
         },
-        {
-          title: '计量单位',
-          dataIndex: 'unit',
-          customRender: (text, record, index) => {
-            return BaseTool.Object.getField(this.unitMap, text)
-          }
-        },
-        {
-          title: '保管人',
-          dataIndex: 'saveUser'
-        },
         {
           title: '购置日期',
-          dataIndex: 'buyDate'
+          dataIndex: 'buyDate',
+          width: 120,
+          checked: true
         },
         {
           title: '投用日期',
-          dataIndex: 'startDate'
-        },
-        {
-          title: '下次检定日期',
-          dataIndex: 'nextCheckDate'
-        },
-        {
-          title: '总行驶里程',
-          dataIndex: 'totalMiles'
-        },
-        {
-          title: '总行驶小时',
-          dataIndex: 'totalHours'
+          dataIndex: 'startDate',
+          width: 120,
+          checked: true
         },
         {
-          title: '保修截至日期',
-          dataIndex: 'guaranteeDate'
-
+          title: '检定日期',
+          dataIndex: 'checkDate',
+          width: 150,
+          checked: true
         },
         {
-          title: '预计工作年限',
-          dataIndex: 'workYear'
-
+          title: '检定周期',
+          dataIndex: 'checkPeriod',
+          width: 100,
+          checked: true,
+          customRender: (text, record, index) => {
+            if (record.nextCheckDate == null) {
+              return '未知'
+            } else {
+              return text + '月'
+            }
+          }
         },
         {
-          title: '预计报废日期',
-          dataIndex: 'retirementDate'
-
+          title: '检定有效期',
+          dataIndex: 'nextCheckDate',
+          width: 150,
+          fixed: 'right',
+          checked: true
         },
         {
-          title: '折旧方式',
-          dataIndex: 'depreciationType',
+          title: '检定截止',
+          dataIndex: 'restDay',
+          width: 100,
+          fixed: 'right',
+          checked: true,
           customRender: (text, record, index) => {
-            return this.BaseTool.Object.getField(this.depreciationTypeMap, text)
+            if (record.nextCheckDate == null) {
+              return '未知'
+            } else {
+              return this.BaseTool.Date.getCountBetween(new Date(), record.nextCheckDate, 1) + '天'
+            }
           }
         },
         {
           title: '状态',
           checked: true,
           dataIndex: 'status',
+          width: 100,
+          fixed: 'right',
           scopedSlots: { customRender: 'status' }
         },
         {

+ 7 - 7
src/views/sb/info/SbInfo.vue

@@ -100,7 +100,7 @@
             :data="loadData"
             :alert="options.alert"
             :rowSelection="options.rowSelection"
-            :scroll="{x: BaseTool.Constant.scrollX, y: BaseTool.Constant.scrollY }"
+            :scroll="{x: 1000}"
             showPagination="auto"
           >
             <span slot="action" slot-scope="record">
@@ -218,7 +218,7 @@ export default {
         {
           title: '序号',
           dataIndex: 'index',
-          width: 50,
+          width: 100,
           checked: true,
           customRender: (text, record, index) => {
             return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
@@ -233,14 +233,14 @@ export default {
         {
           title: '设备编号',
           dataIndex: 'no',
-          width: 100,
+          width: 120,
           checked: true
         },
         {
           title: '设备类型',
           checked: true,
           dataIndex: 'type',
-          width: 100,
+          width: 120,
           customRender: (text, record, index) => {
             return record.typeName
           }
@@ -249,7 +249,7 @@ export default {
           title: '设备等级',
           checked: true,
           dataIndex: 'level',
-          width: 100,
+          width: 120,
           customRender: (text, record, index) => {
             return this.BaseTool.Object.getField(this.levelMap, text)
           }
@@ -265,13 +265,13 @@ export default {
         {
           title: '购置日期',
           dataIndex: 'buyDate',
-          width: 100,
+          width: 120,
           checked: true
         },
         {
           title: '投用日期',
           dataIndex: 'startDate',
-          width: 100,
+          width: 120,
           checked: true
         },
         {