xiongchao 4 年之前
父節點
當前提交
993e90cfca

+ 1 - 1
public/index.html

@@ -5,7 +5,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>logo.png">
-    <title>重庆对外建设(集团)有限公司</title>
+    <title>HITCH ABB</title>
     <style>#loading-mask{position:fixed;left:0;top:0;height:100%;width:100%;background:#fff;user-select:none;z-index:9999;overflow:hidden}.loading-wrapper{position:absolute;top:50%;left:50%;transform:translate(-50%,-100%)}.loading-dot{animation:antRotate 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;font-size:64px;width:64px;height:64px;box-sizing:border-box}.loading-dot i{width:22px;height:22px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.loading-dot i:nth-child(1){top:0;left:0}.loading-dot i:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.loading-dot i:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.loading-dot i:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}@-webkit-keyframes antSpinMove{to{opacity:1}}</style>
     <!-- require cdn assets css -->
     <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>

+ 1 - 1
src/i18n/en.js

@@ -2,7 +2,7 @@ export const m = {
   // common
   common: {
     language: 'change language',
-    welcome: '重庆对外建设(集团)有限公司',
+    welcome: 'HITCH ABB',
     login: 'Sign In',
     remember: 'Remember password',
     system_name: 'Equipment management system',

+ 2 - 0
src/router/generator-platform-routers.js

@@ -76,6 +76,8 @@ const constantRouterComponents = {
   'SbInfo': () => import('@/views/sb/info/SbInfo'),
   // 测量设备基础信息
   'MeasureSbInfo': () => import('@/views/sb/info/MeasureSbInfo'),
+  // 父子设备树
+  'ParentSbInfo': () => import('@/views/sb/info/ParentSbInfo'),
   // 设别型号库
   'SbModel': () => import('@/views/sb/model/SbModel'),
   // 设备bom

+ 1 - 1
src/utils/domUtil.js

@@ -16,4 +16,4 @@ export const setDocumentTitle = function (title) {
   }
 }
 
-export const domTitle = '重庆对外建设(集团)有限公司'
+export const domTitle = 'HITCH ABB'

+ 1 - 1
src/views/Home.vue

@@ -2,7 +2,7 @@
   <div class="home">
     <div class="banner">
       <img alt="Vue logo" style="width: 64px; height: 64px" src="../assets/logo_custom.png">
-      <h3 style="margin-top: 1rem">重庆对外建设(集团)有限公司</h3>
+      <h3 style="margin-top: 1rem">HITCH ABB</h3>
     </div>
 
     <br/>

+ 1 - 1
src/views/check/checkstandard/modules/DetailSbCheck.vue

@@ -143,7 +143,7 @@ export default {
     base (record) {
       this.visible = true
       this.model = record
-      this.modalTitle = '详情'
+      this.modalTitle = '详情2'
       queryCheckStandard({ sbId: record.id, type: this.checkType }).then(res => {
         this.data = res.data
       })

+ 4 - 52
src/views/sb/info/MeasureSbInfo.vue

@@ -16,62 +16,14 @@
           <div class="table-page-search-wrapper">
             <a-form layout="inline">
               <a-row :gutter="48">
-                <a-col :md="8" :sm="24">
+                <a-col :md="6" :sm="24">
                   <a-form-item label="关键字">
-                    <a-input v-model="queryParam.keyword" placeholder="请输入名称/编码"/>
+                    <a-input v-model="queryParam.keyword" placeholder="请输入名称/设备新号"/>
                   </a-form-item>
                 </a-col>
                 <a-col :md="6" :sm="24">
-                  <a-form-item label="型号">
-                    <a-input v-model="queryParam.model" placeholder="请输入原厂编号"/>
-                  </a-form-item>
-                </a-col>
-                <a-col :md="8" :sm="24">
-                  <a-form-item label="所属区域">
-                    <a-select @change="handleAreaChange" v-model="queryParam.useArea" placeholder="请选择">
-                      <a-select-option
-                        v-for="({deptId, name}) in areaList"
-                        :key="deptId"
-                        :label="name"
-                        :value="deptId">{{ name }}
-                      </a-select-option>
-                    </a-select>
-                  </a-form-item>
-                </a-col>
-                <a-col :md="8" :sm="24">
-                  <a-form-item label="所属公司">
-                    <a-select @change="handleCompanyChange" v-model="queryParam.useCompany" placeholder="请选择">
-                      <a-select-option
-                        v-for="({deptId, name}) in companyList"
-                        :key="deptId"
-                        :label="name"
-                        :value="deptId">{{ name }}
-                      </a-select-option>
-                    </a-select>
-                  </a-form-item>
-                </a-col>
-                <a-col :md="8" :sm="24">
-                  <a-form-item label="所属项目">
-                    <a-select @change="handleProjectChange" v-model="queryParam.useProject" placeholder="请选择">
-                      <a-select-option
-                        v-for="({deptId, name}) in projectList"
-                        :key="deptId"
-                        :label="name"
-                        :value="deptId">{{ name }}
-                      </a-select-option>
-                    </a-select>
-                  </a-form-item>
-                </a-col>
-                <a-col :md="8" :sm="24">
-                  <a-form-item label="所属部门">
-                    <a-select @change="handleDeptChange" v-model="queryParam.useDept" placeholder="请选择">
-                      <a-select-option
-                        v-for="({deptId, name}) in deptList"
-                        :key="deptId"
-                        :label="name"
-                        :value="deptId">{{ name }}
-                      </a-select-option>
-                    </a-select>
+                  <a-form-item label="设备旧号">
+                    <a-input v-model="queryParam.zbh" placeholder="请输入设备旧号"/>
                   </a-form-item>
                 </a-col>
                 <a-col :md="8" :sm="24">

+ 545 - 0
src/views/sb/info/ParentSbInfo.vue

@@ -0,0 +1,545 @@
+<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">
+        <div>
+          <div class="table-page-search-wrapper">
+            <a-form layout="inline">
+              <a-row :gutter="48">
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="关键字">
+                    <a-input v-model="queryParam.keyword" placeholder="请输入名称/设备新号"/>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="设备旧号">
+                    <a-input v-model="queryParam.zbh" placeholder="请输入设备旧号"/>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="8" :sm="24">
+                  <a-form-item label="设备状态">
+                    <a-select @change="handleDeptChange" v-model="queryParam.status" placeholder="请选择">
+                      <a-select-option
+                        v-for="(label,value) in statusMap"
+                        :key="value"
+                        :label="label"
+                        :value="parseInt(value)">{{ label }}
+                      </a-select-option>
+                    </a-select>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="6 || 24" :sm="24">
+                  <span class="table-page-search-submitButtons">
+                    <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+                    <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
+                  </span>
+                </a-col>
+              </a-row>
+            </a-form>
+          </div>
+
+          <div class="table-operator">
+            <a-button v-if="$auth('sb-infos-add')" type="primary" icon="plus" @click="handleAdd">新增</a-button>
+            <a-button style="margin-left: 8px" v-if="$auth('sb-infos-export')" type="primary" icon="download" @click="doExport">导出</a-button>
+            <a-button style="margin-left: 8px" v-if="$auth('sb-infos-export')" type="primary" icon="upload" @click="doImport">初始化导入</a-button>
+            <a-button style="margin-left: 8px" v-if="$auth('sb-infos-export')" type="primary" icon="upload" @click="doImportDe">折旧导入</a-button>
+            <a-button style="margin-left: 8px" v-if="$auth('sb-infos-export')" type="primary" icon="upload" @click="printQcode()">打印</a-button>
+            <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('sb-infos-del')">
+              <a-menu slot="overlay">
+                <a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
+                  <a-menu-item key="1"><a-icon type="delete" /><a>删除</a></a-menu-item>
+                </a-popconfirm>
+              </a-menu>
+              <a-button style="margin-left: 8px">
+                批量操作 <a-icon type="down" />
+              </a-button>
+            </a-dropdown>
+          </div>
+
+          <s-table
+            ref="table"
+            size="default"
+            rowKey="id"
+            :widthSpace="true"
+            :columns="columns"
+            :data="loadData"
+            :alert="options.alert"
+            :rowSelection="options.rowSelection"
+            :scroll="{x: BaseTool.Constant.scrollX, y: BaseTool.Constant.scrollY }"
+            showPagination="auto"
+          >
+            <span slot="action" slot-scope="record">
+              <template>
+                <a @click="handleView(record)">查看</a>
+                <a-divider type="vertical" />
+                <a v-if="$auth('sb-infos-edit')" @click="handleEdit(record)">修改</a>
+                <!--<a-divider type="vertical" />
+                  <a-popconfirm v-if="$auth('sb-infos-del')" title="是否要删除该设备?" @confirm="batchDelete(record.id)">
+                    <a>删除</a>
+                  </a-popconfirm>
+                  <a-divider type="vertical" />
+                  <a @click="handleCopy(record)">复制</a>-->
+                <a-divider v-if="record.status != 2" type="vertical" />
+                <a-popconfirm v-if="record.status != 2" title="是否要启用该设备?" @confirm="handleStart(record)">
+                  <a>启用</a>
+                </a-popconfirm>
+                <a-divider v-if="record.status != 7" type="vertical" />
+                <a-popconfirm v-if="record.status != 7" title="是否要停用该设备?" @confirm="handleStop(record)">
+                  <a>停用</a>
+                </a-popconfirm>
+                <a-divider type="vertical" />
+                <a @click="printQcode(record)">打印</a>
+              </template>
+            </span>
+            <span slot="status" slot-scope="text">
+              <badge
+                :status="DictCache.COLOR.SB_INFO_STATUS[text]"
+                :text="statusMap[text]" />
+            </span>
+          </s-table>
+        </div>
+
+      </a-col>
+    </a-row>
+    <base-form ref="baseModal" @ok="handleOk"/>
+    <detail ref="detailModal" @ok="handleOk"/>
+    <download-modal ref="downloadModal"/>
+    <preview-modal ref="previewModal"/>
+    <import-form-add ref="importModal" @ok="handleOk"/>
+    <print-sb-code ref="printSbCode"/>
+  </a-card>
+
+</template>
+
+<script>
+import { STable, Ellipsis } from '@/components'
+import BaseForm from './modules/BaseForm'
+import Detail from './modules/Detail'
+import DownloadModal from '@/views/download/DownloadModal'
+import PreviewModal from '@/views/preview/PreviewModal'
+import {updateSbInfo, getSbInfoPage, deleteSbInfos, fetchSbInfo, exportSbInfo, getSbInfoTree} from '@/api/sb/info'
+import { queryDept, getDeptsAllByParentId } from '@/api/upms/dept'
+import BaseTool from '../../../utils/tool'
+import { fetchSbTypeTree } from '@/api/sb/type'
+import ImportFormAdd from './modules/ImportFormAdd'
+import PrintSbCode from '@/views/sb/info/modules/PrintSbCode'
+
+export default {
+  name: 'SbInfoList',
+  components: {
+    STable,
+    Ellipsis,
+    BaseForm,
+    Detail,
+    DownloadModal,
+    PreviewModal,
+    PrintSbCode,
+    ImportFormAdd
+  },
+  props: {
+    filter: {
+      type: Number,
+      default: -1
+    }
+  },
+  data () {
+    return {
+      // 查询参数
+      queryParam: {
+        filter: this.filter
+      },
+      depreciationTypeMap: {},
+      visible: true,
+      levelMap: {},
+      unitMap: {},
+      areaList: {},
+      companyList: {},
+      projectList: {},
+      deptList: {},
+      useTypeMap: {},
+      statusMap: {},
+      expandedKeys: [],
+      selectedKeys: [],
+      sourceTypeMap: {},
+      treeData: [],
+      // 表头
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'index',
+          checked: true,
+          customRender: (text, record, index) => {
+            return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
+          }
+        },
+        {
+          title: '设备名称',
+          checked: true,
+          dataIndex: 'name'
+        },
+        {
+          title: '设备编号',
+          dataIndex: 'no',
+          checked: true
+        },
+        {
+          title: '自编号',
+          checked: true,
+          dataIndex: 'zbh'
+        },
+        {
+          title: '车牌号',
+          checked: true,
+          dataIndex: 'cph'
+        },
+        {
+          title: '型号',
+          checked: true,
+          dataIndex: 'model'
+        },
+        {
+          title: '财务编码',
+          dataIndex: 'financingNo'
+        },
+        {
+          title: '设备类型',
+          checked: true,
+          dataIndex: 'type',
+          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',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Object.getField(this.levelMap, text)
+          }
+        },
+        {
+          title: '设备原值',
+          dataIndex: 'initialValue',
+          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'
+        },
+        {
+          title: '投用日期',
+          dataIndex: 'startDate'
+        },
+        {
+          title: '下次检定日期',
+          dataIndex: 'nextCheckDate'
+        },
+        {
+          title: '总行驶里程',
+          dataIndex: 'totalMiles'
+        },
+        {
+          title: '总行驶小时',
+          dataIndex: 'totalHours'
+        },
+        {
+          title: '保修截至日期',
+          dataIndex: 'guaranteeDate'
+
+        },
+        {
+          title: '预计工作年限',
+          dataIndex: 'workYear'
+
+        },
+        {
+          title: '预计报废日期',
+          dataIndex: 'retirementDate'
+
+        },
+        {
+          title: '折旧方式',
+          dataIndex: 'depreciationType',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Object.getField(this.depreciationTypeMap, text)
+          }
+        },
+        {
+          title: '状态',
+          checked: true,
+          dataIndex: 'status',
+          scopedSlots: { customRender: 'status' }
+        },
+        {
+          title: '操作',
+          key: 'action',
+          checked: true,
+          align: 'center',
+          // fixed: 'right',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        parameter = {
+          ...parameter,
+          ...this.queryParam,
+          dataScope: {
+            sortBy: 'desc',
+            sortName: 'update_time'
+          }
+        }
+        return getSbInfoPage(Object.assign(parameter, this.queryParam))
+          .then(res => {
+            return res.data
+          })
+      },
+      selectedRowKeys: [],
+      selectedRows: [],
+
+      options: {
+        alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+        rowSelection: {
+          selectedRowKeys: this.selectedRowKeys,
+          onChange: this.onSelectChange
+        }
+      },
+      optionAlertShow: false
+    }
+  },
+  created () {
+    this.tableOption()
+    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)
+    this.unitMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_UNIT)
+    this.sourceTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBTYPE_SOURCETYPE)
+    this.useTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_USE_TYPE)
+  },
+  methods: {
+    tableOption () {
+      this.setTree()
+      if (!this.optionAlertShow) {
+        this.options = {
+          alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+          rowSelection: {
+            selectedRowKeys: this.selectedRowKeys,
+            onChange: this.onSelectChange,
+            getCheckboxProps: record => ({
+              props: {
+                disabled: false,
+                name: record.id
+              }
+            })
+          }
+        }
+        this.optionAlertShow = true
+      } else {
+        this.options = {
+          alert: false,
+          rowSelection: null
+        }
+        this.optionAlertShow = false
+      }
+    },
+    batchDelete (id) {
+      let ids = []
+      if (this.BaseTool.String.isBlank(id)) {
+        const length = this.selectedRows.length
+        if (length === 0) {
+          this.$message.info('请选择要删除的记录')
+          return
+        }
+        ids = this.selectedRows.map(item => item.id)
+      } else {
+        ids = [id]
+      }
+      deleteSbInfos(ids).then(res => {
+        this.$message.info('删除成功')
+        this.handleOk()
+        this.$refs.table.clearSelected()
+      })
+    },
+    handleEdit (record) {
+      fetchSbInfo({ id: record.id }).then(res => {
+        this.visible = false
+        const modal = this.$refs.baseModal
+        modal.base(res.data)
+      })
+    },
+    printQcode (record) {
+      let recordList = []
+      console.log(record, this.selectedRows)
+      if (this.BaseTool.String.isBlank(record)) {
+        const length = this.selectedRows.length
+        if (length === 0) {
+          this.$message.info('请选择要打印的记录')
+          return
+        }
+        recordList = this.selectedRows
+      } else {
+        recordList = [record]
+      }
+      this.$refs.printSbCode.base(recordList)
+    },
+    handleStart (record) {
+      record.status = 2
+      updateSbInfo(record).then(res => {
+        this.$message.info('已启用')
+      })
+    },
+    handleStop (record) {
+      record.status = 7
+      updateSbInfo(record).then(res => {
+        this.$message.info('已停用')
+      })
+    },
+    handleAdd () {
+      this.visible = false
+      this.$refs.baseModal.base()
+    },
+    handleView (record) {
+      fetchSbInfo({ id: record.id }).then(res => {
+        this.visible = false
+        const modal = this.$refs.detailModal
+        modal.base(res.data)
+      })
+    },
+    handleAreaChange (value) {
+      getDeptsAllByParentId({ deptId: value, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.FEN_GONG_SI }).then(res => {
+        this.companyList = res.data
+      })
+    },
+    handleCompanyChange (value) {
+      getDeptsAllByParentId({ deptId: value, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.XIANG_MU_BU }).then(res => {
+        this.projectList = res.data
+      })
+    },
+    handleProjectChange (value) {
+      getDeptsAllByParentId({ deptId: value, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.BU_MEN }).then(res => {
+        this.deptList = res.data
+      })
+    },
+    handleDeptChange (value) {
+      getDeptsAllByParentId({ deptId: value, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.BAN_ZU }).then(res => {
+        this.groupList = res.data
+      })
+    },
+    handleCopy (record) {
+      this.visible = false
+      fetchSbInfo({ id: record.id }).then(res => {
+        const modal = this.$refs.baseModal
+        res.data.id = null
+        modal.base(res.data)
+      })
+    },
+    handleOk () {
+      this.visible = true
+      this.setTree()
+      this.$refs.table.refresh()
+    },
+    onSelectChange (selectedRowKeys, selectedRows) {
+      this.selectedRowKeys = selectedRowKeys
+      this.selectedRows = selectedRows
+    },
+    resetSearchForm () {
+      this.queryParam = {
+        filter: this.filter
+      }
+      this.visible = true
+      this.$refs.table.refresh(true)
+    },
+    doExport () {
+      const parameter = {
+        ...this.queryParam
+      }
+      exportSbInfo(parameter).then(file => {
+        this.BaseTool.UPLOAD.downLoadExportExcel(file)
+      })
+    },
+    setTree (record = {}) {
+      queryDept({ nature: this.DictCache.VALUE.SYS_DEPT_NATURE.JITUAN }).then(res => {
+        this.areaList = res.data
+      })
+      getSbInfoTree().then(res => {
+        this.treeData = res.data
+      })
+    },
+    onSelect: function (selectedKeys, info) {
+      this.selectedKeys = selectedKeys
+      this.queryParam.id = selectedKeys.length > 0 ? selectedKeys[0] : ''
+      this.$refs.table.refresh(true)
+    },
+    onExpand (expandedKeys) {
+      this.expandedKeys = expandedKeys
+      this.autoExpandParent = false
+    },
+    handleRepairFilePreview (record) {
+      console.log(record, 87878)
+      this.$refs.previewModal.base(record.id, this.DictCache.VALUE.FILE_MODULE.SBINFO_REPAIRFILE)
+    },
+    handleRepairFileDownload (record) {
+      // this.$refs.downloadModal.base(record.id, this.DictCache.VALUE.FILE_MODULE.SBINFO_REPAIRFILE, getDownloadUrl(record.id))
+    },
+    handleUseFilePreview (record) {
+      this.$refs.previewModal.base(record.id, this.DictCache.VALUE.FILE_MODULE.SBINFO_USEFILE)
+    },
+    handleUseFileDownload (record) {
+      // this.$refs.downloadModal.base(record.id, this.DictCache.VALUE.FILE_MODULE.SBINFO_USEFILE, getDownloadUrl(record.id))
+    },
+    handleCheckFilePreview (record) {
+      this.$refs.previewModal.base(record.id, this.DictCache.VALUE.FILE_MODULE.SBINFO_RECHECKFILE)
+    },
+    handleCheckFileDownload (record) {
+      // this.$refs.downloadModal.base(record.id, this.DictCache.VALUE.FILE_MODULE.SBINFO_RECHECKFILE, getDownloadUrl(record.id))
+    },
+    doImport () {
+      if (this.queryParam.useCompany == null) {
+        this.$message.error('请先选择公司')
+        return
+      }
+      if (this.queryParam.useProject == null) {
+        this.$message.error('请先选择项目部')
+        return
+      }
+      this.$refs.importModal.base(this.queryParam.useCompany, this.queryParam.useProject)
+    },
+    doImportDe () {
+      this.queryParam.useCompany = null
+      this.queryParam.useProject = null
+      this.$refs.importModal.base()
+    }
+  }
+}
+</script>

+ 9 - 98
src/views/sb/info/SbInfo.vue

@@ -16,62 +16,14 @@
           <div class="table-page-search-wrapper">
             <a-form layout="inline">
               <a-row :gutter="48">
-                <a-col :md="8" :sm="24">
+                <a-col :md="6" :sm="24">
                   <a-form-item label="关键字">
-                    <a-input v-model="queryParam.keyword" placeholder="请输入名称/编码"/>
+                    <a-input v-model="queryParam.keyword" placeholder="请输入名称/设备新号"/>
                   </a-form-item>
                 </a-col>
                 <a-col :md="6" :sm="24">
-                  <a-form-item label="型号">
-                    <a-input v-model="queryParam.model" placeholder="请输入原厂编号"/>
-                  </a-form-item>
-                </a-col>
-                <a-col :md="8" :sm="24">
-                  <a-form-item label="所属区域">
-                    <a-select @change="handleAreaChange" v-model="queryParam.useArea" placeholder="请选择">
-                      <a-select-option
-                        v-for="({deptId, name}) in areaList"
-                        :key="deptId"
-                        :label="name"
-                        :value="deptId">{{ name }}
-                      </a-select-option>
-                    </a-select>
-                  </a-form-item>
-                </a-col>
-                <a-col :md="8" :sm="24">
-                  <a-form-item label="所属公司">
-                    <a-select @change="handleCompanyChange" v-model="queryParam.useCompany" placeholder="请选择">
-                      <a-select-option
-                        v-for="({deptId, name}) in companyList"
-                        :key="deptId"
-                        :label="name"
-                        :value="deptId">{{ name }}
-                      </a-select-option>
-                    </a-select>
-                  </a-form-item>
-                </a-col>
-                <a-col :md="8" :sm="24">
-                  <a-form-item label="所属项目">
-                    <a-select @change="handleProjectChange" v-model="queryParam.useProject" placeholder="请选择">
-                      <a-select-option
-                        v-for="({deptId, name}) in projectList"
-                        :key="deptId"
-                        :label="name"
-                        :value="deptId">{{ name }}
-                      </a-select-option>
-                    </a-select>
-                  </a-form-item>
-                </a-col>
-                <a-col :md="8" :sm="24">
-                  <a-form-item label="所属部门">
-                    <a-select @change="handleDeptChange" v-model="queryParam.useDept" placeholder="请选择">
-                      <a-select-option
-                        v-for="({deptId, name}) in deptList"
-                        :key="deptId"
-                        :label="name"
-                        :value="deptId">{{ name }}
-                      </a-select-option>
-                    </a-select>
+                  <a-form-item label="设备旧号">
+                    <a-input v-model="queryParam.zbh" placeholder="请输入设备旧号"/>
                   </a-form-item>
                 </a-col>
                 <a-col :md="8" :sm="24">
@@ -99,8 +51,6 @@
           <div class="table-operator">
             <a-button v-if="$auth('sb-infos-add')" type="primary" icon="plus" @click="handleAdd">新增</a-button>
             <a-button style="margin-left: 8px" v-if="$auth('sb-infos-export')" type="primary" icon="download" @click="doExport">导出</a-button>
-            <a-button style="margin-left: 8px" v-if="$auth('sb-infos-export')" type="primary" icon="upload" @click="doImport">初始化导入</a-button>
-            <a-button style="margin-left: 8px" v-if="$auth('sb-infos-export')" type="primary" icon="upload" @click="doImportDe">折旧导入</a-button>
             <a-button style="margin-left: 8px" v-if="$auth('sb-infos-export')" type="primary" icon="upload" @click="printQcode()">打印</a-button>
             <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('sb-infos-del')">
               <a-menu slot="overlay">
@@ -236,19 +186,14 @@ export default {
           dataIndex: 'name'
         },
         {
-          title: '设备编号',
+          title: '号',
           dataIndex: 'no',
           checked: true
         },
         {
-          title: '自编号',
-          checked: true,
-          dataIndex: 'zbh'
-        },
-        {
-          title: '车牌号',
-          checked: true,
-          dataIndex: 'cph'
+          title: '旧号',
+          dataIndex: 'zbh',
+          checked: true
         },
         {
           title: '规格型号',
@@ -256,7 +201,7 @@ export default {
           dataIndex: 'model'
         },
         {
-          title: '财务编码',
+          title: '资产编码',
           dataIndex: 'financingNo'
         },
         {
@@ -309,40 +254,6 @@ export default {
           title: '投用日期',
           dataIndex: 'startDate'
         },
-        {
-          title: '下次检定日期',
-          dataIndex: 'nextCheckDate'
-        },
-        {
-          title: '总行驶里程',
-          dataIndex: 'totalMiles'
-        },
-        {
-          title: '总行驶小时',
-          dataIndex: 'totalHours'
-        },
-        {
-          title: '保修截至日期',
-          dataIndex: 'guaranteeDate'
-
-        },
-        {
-          title: '预计工作年限',
-          dataIndex: 'workYear'
-
-        },
-        {
-          title: '预计报废日期',
-          dataIndex: 'retirementDate'
-
-        },
-        {
-          title: '折旧方式',
-          dataIndex: 'depreciationType',
-          customRender: (text, record, index) => {
-            return this.BaseTool.Object.getField(this.depreciationTypeMap, text)
-          }
-        },
         {
           title: '状态',
           checked: true,

File diff suppressed because it is too large
+ 134 - 662
src/views/sb/info/modules/BaseForm.vue


+ 24 - 82
src/views/sb/info/modules/Detail.vue

@@ -1,16 +1,16 @@
 <template>
-  <a-card :bordered="false" class="card" :title="modalTitle">
+  <a-card :bordered="false" v-show="visibleDetail" class="card" :title="modalTitle">
     <div v-show="visible">
       <a-row :gutter="48" slot="extra">
         <a-col :md="48" :sm="48">
           <span class="table-page-search-submitButtons" style="float: right">
-<!--            <a-button style="margin-left: 8px" type="primary" @click="handleViewBom()">备件BOM</a-button>
-            <a-button style="margin-left: 8px" type="primary" @click="handleViewCheck()">保养项目</a-button>-->
+            <a-button style="margin-left: 8px" type="primary" @click="handleViewBom()">备件BOM</a-button>
+            <a-button style="margin-left: 8px" type="primary" @click="handleViewCheck()">保养项目</a-button>
             <a-button style="margin-left: 8px" @click="handleCancel()">返回</a-button>
           </span>
         </a-col>
       </a-row>
-      <title-divider title="型号信息" width="90px"></title-divider>
+      <title-divider title="图片信息" width="90px"></title-divider>
       <detail-list title="" :col="3">
         <detail-list-item v-show="model.sbFileList!=null && model.sbFileList.length>0">
           <a-upload
@@ -20,87 +20,43 @@
           >
           </a-upload>
         </detail-list-item>
-        <detail-list-item term="型号">{{ model.model }}</detail-list-item>
-        <detail-list-item term="名称型号">{{ model.nameModel }}</detail-list-item>
-        <detail-list-item term="设备名称">{{ model.name }}</detail-list-item>
-        <detail-list-item term="设备类型">{{ model.typeName }}</detail-list-item>
-        <detail-list-item term="自定义类型">{{ BaseTool.Object.getField(useTypeMap,model.useType) }}</detail-list-item>
-        <detail-list-item term="设备等级">{{ BaseTool.Object.getField(levelMap,model.level) }}</detail-list-item>
-        <detail-list-item term="生产商">{{ model.producerName }}</detail-list-item>
-        <detail-list-item term="计量单位">{{ model.unit }}</detail-list-item>
-        <detail-list-item term="设备原值">{{ BaseTool.Amount.formatter(model.initialValue) }}</detail-list-item>
-        <detail-list-item term="当前价值">{{ BaseTool.Amount.formatter(model.currentValue) }}</detail-list-item>
-        <detail-list-item term="已折旧价值">{{ BaseTool.Amount.formatter(model.cutValue) }}</detail-list-item>
-        <detail-list-item term="净残值率">{{ BaseTool.Amount.formatter(model.rate) }}</detail-list-item>
-        <detail-list-item term="折旧总计月份">{{ BaseTool.Amount.formatter(model.month) }}</detail-list-item>
-        <detail-list-item term="已计提月份">{{ BaseTool.Amount.formatter(model.usedMonth) }}</detail-list-item>
+        <detail-list-item>
+          <img-code :src="model.qrCode" :code-id="model.id" :width="200"></img-code>
+        </detail-list-item>
+
       </detail-list>
 
       <title-divider title="基本信息" width="90px"></title-divider>
       <detail-list title="" :col="3">
-        <detail-list-item term="设备编号">{{ model.no }}</detail-list-item>
-        <detail-list-item term="财务编码">{{ model.financingNo }}</detail-list-item>
-        <detail-list-item term="卡片编号">{{ model.cardNo }}</detail-list-item>
-        <detail-list-item term="制造号(车架号)">{{ model.zzh }}</detail-list-item>
-        <detail-list-item term="发动机型号">{{ model.fdjxh }}</detail-list-item>
-        <detail-list-item term="发动机号">{{ model.fdjh }}</detail-list-item>
-        <detail-list-item term="车牌号">{{ model.cph }}</detail-list-item>
-        <detail-list-item term="底盘号">{{ model.dph }}</detail-list-item>
-        <detail-list-item term="自重">{{ model.zz }}</detail-list-item>
-        <!--<detail-list-item term="最近维修时间">{{ model.lastRepaireTime }}</detail-list-item>
-        <detail-list-item term="维修次数">{{ model.repaireTimes }}</detail-list-item>
-        <detail-list-item term="最近保养时间">{{ model.lastBaoyangTime }}</detail-list-item>
-        <detail-list-item term="最近保养里程">{{ model.lastBaoyangMiles }}</detail-list-item>
-        <detail-list-item term="最近保养台时">{{ model.lastBaoyangHours }}</detail-list-item>
-        <detail-list-item term="保养次数">{{ model.baoyangTimes }}</detail-list-item>-->
-        <detail-list-item term="燃料类别">{{ BaseTool.Object.getField(rlTypeMap,model.rlType) }}</detail-list-item>
-        <detail-list-item term="颜色">{{ BaseTool.Object.getField(colorMap,model.color) }}</detail-list-item>
-        <detail-list-item term="座位数">{{ model.seatNumber }}</detail-list-item>
-        <detail-list-item term="助记码">{{ model.zjm }}</detail-list-item>
+        <detail-list-item term="设备(新号)">{{ model.no }}</detail-list-item>
+        <detail-list-item term="设备(旧号)">{{ model.zbh }}</detail-list-item>
+        <detail-list-item term="设备描述">{{ model.name }}</detail-list-item>
+        <detail-list-item term="型号">{{ model.model }}</detail-list-item>
+        <detail-list-item term="ABC 标识">{{ BaseTool.Object.getField(levelMap,model.level) }}</detail-list-item>
+        <detail-list-item term="设备类型">{{ model.typeName }}</detail-list-item>
+        <detail-list-item term="自定义类型">{{ BaseTool.Object.getField(useTypeMap,model.useType) }}</detail-list-item>
+        <detail-list-item term="生产商">{{ model.producerName }}</detail-list-item>
 
-        <!--<detail-list-item term="预计工作年限">{{ model.workYear }}</detail-list-item>
-        <detail-list-item term="预计报废日期">{{ model.retirementDate }}</detail-list-item>
-        <detail-list-item term="折旧方式">{{ BaseTool.Object.getField(depreciationTypeMap,model.depreciationType) }}</detail-list-item>
-        <detail-list-item term="创建人">{{ model.createdUserName }}</detail-list-item>-->
+        <detail-list-item term="大小尺寸">{{ model.zz }}</detail-list-item>
+        <detail-list-item term="系列号">{{ model.zzh }}</detail-list-item>
         <detail-list-item term="状态"><badge :status="DictCache.COLOR.SB_INFO_STATUS[model.status]" :text="statusMap[model.status]"></badge></detail-list-item>
         <detail-list-item term="备注">{{ model.remark }}</detail-list-item>
       </detail-list>
 
       <title-divider title="使用信息" width="90px"></title-divider>
       <detail-list title="" :col="3">
-
-        <detail-list-item term="使用区域">{{ model.useAreaName }}</detail-list-item>
-        <detail-list-item term="使用公司">{{ model.useCompanyName }}</detail-list-item>
-        <detail-list-item term="使用项目部">{{ model.useProjectName }}</detail-list-item>
-        <detail-list-item term="使用部门">{{ model.useDeptName }}</detail-list-item>
-        <detail-list-item term="使用班组">{{ model.useGroupName }}</detail-list-item>
-        <detail-list-item term="当前部门">{{ model.saveDeptName }}</detail-list-item>
         <detail-list-item term="使用人">{{ model.saveUserName }}</detail-list-item>
         <detail-list-item term="维修人">{{ model.repairUserName }}</detail-list-item>
-        <detail-list-item term="总行驶里程">{{ model.totalMiles }}</detail-list-item>
-        <detail-list-item term="总行驶小时">{{ model.totalHours }}</detail-list-item>
-      </detail-list>
-      <title-divider title="保险信息" width="90px"></title-divider>
-      <detail-list title="" :col="3">
-        <detail-list-item term="保险公司">{{ model.bxgs }}</detail-list-item>
-        <detail-list-item term="交保单号">{{ model.jbdh }}</detail-list-item>
-        <detail-list-item term="商保单号">{{ model.sbdh }}</detail-list-item>
       </detail-list>
       <title-divider title="日期信息" width="90px"></title-divider>
       <detail-list title="" :col="3">
-        <detail-list-item term="上牌日期">{{ model.spDate }}</detail-list-item>
-        <detail-list-item term="交保到期日">{{ model.jbdDate }}</detail-list-item>
-        <detail-list-item term="商保到期日">{{ model.sbdDate }}</detail-list-item>
-        <detail-list-item term="首保日期">{{ model.sbDate }}</detail-list-item>
         <detail-list-item term="购置日期">{{ model.buyDate }}</detail-list-item>
         <detail-list-item term="投用日期">{{ model.startDate }}</detail-list-item>
-        <!--<detail-list-item term="下次检定日期">{{ model.nextCheckDate }}</detail-list-item>
-        <detail-list-item term="保修截至日期">{{ model.guaranteeDate }}</detail-list-item>-->
+
       </detail-list>
 
       <title-divider title="生产商" width="90px"></title-divider>
       <detail-list title="" :col="3" >
-        <detail-list-item v-if="firmProducer != null" term="编码">{{ firmProducer.account }}</detail-list-item>
         <detail-list-item v-if="firmProducer != null" term="名称">{{ firmProducer.name }}</detail-list-item>
         <detail-list-item v-if="firmProducer != null" term="等级">{{ BaseTool.Object.getField(firmProducerLevelMap,firmProducer.level) }}</detail-list-item>
         <detail-list-item v-if="firmProducer != null" term="联系人">{{ firmProducer.contactPerson }}</detail-list-item>
@@ -131,10 +87,8 @@
           >
           </a-upload>
         </detail-list-item>
-
-        <detail-list-item><img-code :src="model.qrCode" :code-id="model.id" :width="200"></img-code></detail-list-item>
-      </detail-list>
-      <title-divider title="运行数据" width="90px"></title-divider>
+       </detail-list>
+      <title-divider title="相关数据" width="90px"></title-divider>
       <q-tabs :activeKey="activeKey" @change="changeTab">
         <q-tab-pane key="1" tab="报修记录">
           <repair-application-form-table :type="2" :table-params="{sbId: model.id, sbName: model.name}" ref="repairApplicationFormTable" />
@@ -145,21 +99,6 @@
         <q-tab-pane key="3" tab="保养记录">
           <check-job-table :type="2" :check-type="2" :table-params="{sbId: model.id}" ref="spotJobTable" />
         </q-tab-pane>
-        <!--<q-tab-pane key="4" tab="润滑记录">
-          <check-job-table :type="2" :check-type="3" :table-params="{sbId: model.id}" ref="pollingJobTable" />
-        </q-tab-pane>
-        <q-tab-pane key="5" tab="点检记录">
-            <check-job-table :type="2" :check-type="1" :table-params="{sbId: model.id}" ref="spotCheckJobTable" />
-          </q-tab-pane>-->
-        <q-tab-pane key="6" tab="加油记录">
-          <sb-oil-page-table :filter="0" :table-params="{sbId: model.id}" ref="sbOilPageTable" />
-        </q-tab-pane>
-        <q-tab-pane key="7" tab="运行记录">
-          <sb-run-fill-page-table :filter="0" :table-params="{sbId: model.id}" ref="sbRunFillPageTable" />
-        </q-tab-pane>
-        <q-tab-pane key="8" tab="巡检记录">
-          <sb-inspection-fill-page-table :filter="0" :table-params="{sbId: model.id}" ref="sbInspectionFillPageTable" />
-        </q-tab-pane>
       </q-tabs>
     </div>
     <detail-sb-bom ref="detailSbBomModal" @ok="handleOk"/>
@@ -200,6 +139,7 @@ export default {
       mdl: {},
       modalTitle: null,
       visible: false,
+      visibleDetail: false,
       activeKey: '3',
       collapseActiveKey: '1',
       model: {
@@ -314,6 +254,7 @@ export default {
     },
     base (record) {
       this.visible = true
+      this.visibleDetail = true
       this.modalTitle = '详情'
       this.model = record
       this.activeKey = '1'
@@ -361,6 +302,7 @@ export default {
     },
     handleCancel (values) {
       this.visible = false
+      this.visibleDetail = false
       this.confirmLoading = false
       this.$emit('ok', values)
     },

+ 1 - 11
src/views/sb/info/modules/SbInfoSelectModal.vue

@@ -131,17 +131,7 @@ export default {
           checked: true
         },
         {
-          title: '自编号',
-          checked: true,
-          dataIndex: 'zbh'
-        },
-        {
-          title: '车牌号',
-          checked: true,
-          dataIndex: 'cph'
-        },
-        {
-          title: '规格型号',
+          title: '型号',
           checked: true,
           dataIndex: 'model'
         },

+ 1 - 1
src/views/sb/modelbom/modules/DetailSbBom.vue

@@ -152,7 +152,7 @@ export default {
     base (record) {
       this.visible = true
       this.model = record
-      this.modalTitle = '详情'
+      this.modalTitle = '详情Bom'
       selectSpareInfoListBySbId({ id: record.id }).then(res => {
         this.data = res.data
       })

Some files were not shown because too many files changed in this diff