408249787 преди 3 години
родител
ревизия
8d977e0364

+ 2 - 1
src/views/check/checkjob/CheckJob.vue

@@ -262,7 +262,8 @@ export default {
         filter: this.filter,
         status: this.status,
         receiveOvertime: this.receiveOvertime,
-        statusList: this.statusList
+        statusList: this.statusList,
+        sbId: this.$route.query.id
       },
       treeData: [],
       // 表头

+ 3 - 1
src/views/check/checkstandard/CheckStandard.vue

@@ -207,7 +207,9 @@ export default {
       visible: true,
       confirmLoading: false,
       queryParam: {
-        type: this.checkType
+        type: this.checkType,
+        sbId: this.$route.query.id
+
       },
       // 表头
       columns: [

+ 2 - 0
src/views/part/info/PartInfo.vue

@@ -95,6 +95,8 @@ export default {
     return {
       // 查询参数
       queryParam: {
+        sbId: this.$route.query.id
+
       },
       statusMap: {},
       unitMap: {},

+ 2 - 1
src/views/sb/info/SbInfo.vue

@@ -230,7 +230,7 @@
 import { STable, Ellipsis } from '@/components'
 import BaseForm from './modules/BaseForm'
 import BaseFormStatusLog from '@/views/sb/status-log/modules/BaseForm'
-import Detail from './modules/Detail'
+import Detail from './modules/DetailC'
 import DownloadModal from '@/views/download/DownloadModal'
 import PreviewModal from '@/views/preview/PreviewModal'
 import { getSbInfoPage, deleteSbInfos, fetchSbInfo, fetchSbInfos, exportSbInfo } from '@/api/sb/info'
@@ -512,6 +512,7 @@ export default {
             sortName: 'no'
           }
         }
+        console.log(parameter)
         return getSbInfoPage(Object.assign(parameter, this.queryParam))
           .then(res => {
             return res.data

+ 39 - 31
src/views/sb/info/modules/DetailC.vue

@@ -25,11 +25,6 @@
               <a-button style="margin-left: 20px" type="default" @click="handleRepairReportSbInfo()">工单分析</a-button>
               <a-button style="margin-left: 20px" type="default" @click="handleRepairReportSbInfoFee()">费用分析</a-button>
               <a-button style="margin-left: 20px" type="primary" @click="handleCancel()">返回</a-button>
-            <!-- <a-button style="margin-left: 20px" type="default" >检定记录</a-button>
-            <a-button style="margin-left: 20px" type="error" >保养日历</a-button>
-            <a-button style="margin-left: 20px" type="default">工单分析</a-button>
-            <a-button style="margin-left: 20px" type="default">费用分析</a-button>
-            <a-button style="margin-left: 20px" type="primary">返回</a-button> -->
             </span>
           </a-col>
         </a-row>
@@ -52,32 +47,28 @@
               </a-button>
             </a-col>
             <a-col :span="10">
-              <a-button shape="round" type="primary" block>
-                配件记录
+              <a-button shape="round" @click="handleCheckFinish()" block>
+                保养记录
               </a-button>
             </a-col>
             <a-col :span="10">
               <a-button shape="round" block>
-
-                配件记录
+                历史故障
               </a-button>
             </a-col>
             <a-col :span="10">
               <a-button shape="round" block>
-
-                配件记录
+                历史费用
               </a-button>
             </a-col>
             <a-col :span="10">
               <a-button shape="round" block>
-
-                配件记录
+                状态变更记录
               </a-button>
             </a-col>
             <a-col :span="10">
               <a-button shape="round" block>
-
-                配件记录
+                停机记录
               </a-button>
             </a-col>
           </a-row>
@@ -251,7 +242,7 @@ import { queryNumPartInfo } from '@/api/part/info'
 import { queryNumModelbom } from '@/api/sb/modelbom'
 import { queryChildNumSbInfo } from '@/api/sb/info'
 import SparePartUsedSelectTable from '@/views/sqarepartmanage/sparepartused/modules/SparePartUsedSelectTable'
-import SbOilPageTable from '@/views/sb/oil/modules/SbOilPageTable'
+// import SbOilPageTable from '@/views/sb/oil/modules/SbOilPageTable'
 import SbRunFillPageTable from '@/views/sb/run-fill/modules/SbRunFillPageTable'
 import SbInspectionFillPageTable from '@/views/sb/inspection-fill/modules/SbInspectionFillPageTable'
 import DetailSbBom from '@/views/sb/modelbom/modules/DetailSbBom'
@@ -273,7 +264,7 @@ export default {
     RepairApplicationFormTable,
     CheckJobTable,
     SparePartUsedSelectTable,
-    SbOilPageTable,
+    // SbOilPageTable,
     SbRunFillPageTable,
     SbInspectionFillPageTable,
     DetailSbBom,
@@ -422,24 +413,39 @@ export default {
       this.$viewer = viewer
     },
     handleViewBom (record) {
-      this.visible = false
-      const modal = this.$refs.detailSbBomModal
-      modal.base(this.model)
+      // this.visible = false
+      // const modal = this.$refs.detailSbBomModal
+      // modal.base(this.model)
+      const routeUrl = this.$router.resolve({ path: '/sb/modelbom', query: { id: this.model.id } })
+      window.open(routeUrl.href, '_blank')
     },
     handleViewChildSbInfo () {
-      this.visible = false
-      const modal = this.$refs.detailSbInfoModal
-      modal.base(this.model)
+      // this.visible = false
+      // const modal = this.$refs.detailSbInfoModal
+      console.log(this.model)
+      // modal.base(this.model)
+      const routeUrl = this.$router.resolve({ path: '/sb/info/company', query: { parentId: this.model.id } })
+      // let routeUrl = this.$router.resolve(`/share/${96}`)
+      window.open(routeUrl.href, '_blank')
     },
     handleViewCheck (record) {
-      this.visible = false
-      const modal = this.$refs.detailSbCheckModal
-      modal.base(this.model)
+      // this.visible = false
+      // const modal = this.$refs.detailSbCheckModal
+      // modal.base(this.model)
+      const routeUrl = this.$router.resolve({ path: '/check/polling-standard', query: { id: this.model.id } })
+      // let routeUrl = this.$router.resolve(`/share/${96}`)
+      window.open(routeUrl.href, '_blank')
     },
     handleViewCheckJob (record) {
-      this.visible = false
-      const modal = this.$refs.detailSbCheckJobModal
-      modal.base(this.model)
+      // this.visible = false
+      // const modal = this.$refs.detailSbCheckJobModal
+      // modal.base(this.model)
+      const routeUrl = this.$router.resolve({ path: '/check/polling-job', query: { id: this.model.id } })
+      window.open(routeUrl.href, '_blank')
+    },
+    handleCheckFinish () {
+      const routeUrl = this.$router.resolve({ path: '/check/polling-job/finish', query: { id: this.model.id } })
+      window.open(routeUrl.href, '_blank')
     },
     handleMeasure (record) {
       this.visible = false
@@ -527,8 +533,10 @@ export default {
       this.fetchNum()
     },
     partInfoListView () {
-      const modal = this.$refs.partInfoList
-      modal.base({ sbId: this.model.id }, { sbId: this.model.id })
+      // const modal = this.$refs.partInfoList
+      // modal.base({ sbId: this.model.id }, { sbId: this.model.id })
+      const routeUrl = this.$router.resolve({ path: '/part/info', query: { id: this.model.id } })
+      window.open(routeUrl.href, '_blank')
     },
     checkJobTableWaitDoListView () {
       const modal = this.$refs.checkJobTableWaitDo

+ 3 - 2
src/views/sb/modelbom/SbModelBom.vue

@@ -109,6 +109,7 @@ export default {
     return {
       // 查询参数
       queryParam: {
+        id: this.$route.query.id
       },
       depreciationTypeMap: {},
       levelMap: {},
@@ -277,7 +278,7 @@ export default {
     handleEdit (record) {
       selectSpareInfoListByModelId({ id: record.id }).then(res => {
         const modal = this.$refs.baseModal
-        const data = {data:res.data,modelId:record.id}
+        const data = { data: res.data, modelId: record.id }
         modal.base(data)
       })
     },
@@ -324,7 +325,7 @@ export default {
     onExpand (expandedKeys) {
       this.expandedKeys = expandedKeys
       this.autoExpandParent = false
-    },
+    }
 
   }
 }

+ 1 - 1
src/views/sqarepartmanage/sparepartinfo/SparePartInfo.vue

@@ -175,7 +175,7 @@
 <script>
 import { STable, Ellipsis } from '@/components'
 import BaseForm from './modules/BaseForm'
-import Detail from './modules/Detail'
+import Detail from './modules/DetailA'
 import DetailBom from './modules/DetailBom'
 import StoreList from './modules/StoreList'
 import InStoreList from './modules/InStoreList'

+ 270 - 0
src/views/sqarepartmanage/sparepartinfo/modules/DetailA.vue

@@ -0,0 +1,270 @@
+<template>
+  <a-card :title="modalTitle" v-show="visible">
+    <div style="padding: 20px;">
+      <a-row :gutter="48" slot="extra">
+        <a-col :md="48" :sm="48">
+          <span style="float: left">
+            <a-badge :count="5" title="子设备总数" :number-style="{ backgroundColor: '#52c41a' }">
+              <a-button style="margin-left: 20px" type="default">子设备</a-button>
+            </a-badge>
+            <a-badge :count="5" title="设备部位总数" :number-style="{ backgroundColor: '#52c41a' }">
+              <a-button style="margin-left: 20px" type="default">设备部位</a-button>
+            </a-badge>
+            <a-button style="margin-left: 20px" type="default">费用分析</a-button>
+            <a-button style="margin-left: 20px" @click="handleCancel()">返回</a-button>
+
+          </span>
+        </a-col>
+      </a-row>
+    </div>
+    <a-layout>
+      <a-layout-sider :width="329">
+
+        <img-code
+          :src="model.qrCode"
+          :type="2"
+          title="点击重新生成二维码"
+          :code-id="model.id"
+          :width="297"
+          :height="297"></img-code>
+        <a-divider style="background: #D6D6D6" />
+        <a-row type="flex" justify="space-between" :gutter="[16,16]">
+          <a-col :span="10">
+            <a-button shape="round" block>
+              配件记录
+            </a-button>
+          </a-col>
+          <a-col :span="10">
+            <a-button shape="round" type="primary" block>
+              配件记录
+            </a-button>
+          </a-col>
+          <a-col :span="10">
+            <a-button shape="round" block>
+
+              配件记录
+            </a-button>
+          </a-col>
+          <a-col :span="10">
+            <a-button shape="round" block>
+
+              配件记录
+            </a-button>
+          </a-col>
+          <a-col :span="10">
+            <a-button shape="round" block>
+
+              配件记录
+            </a-button>
+          </a-col>
+          <a-col :span="10">
+            <a-button shape="round" block>
+
+              配件记录
+            </a-button>
+          </a-col>
+        </a-row>
+
+      </a-layout-sider>
+      <a-layout-content :style="{ background: '#fff',padding: '20px'}">
+        <a-card >
+          <div style="margin:0; padding:15px 30px; background:#EFEFFB;font-size:16px; color: #1890ff"><b>基础信息</b></div>
+          <a-descriptions bordered :column="3">
+            <a-descriptions-item label="id">{{ model.id }}</a-descriptions-item>
+            <a-descriptions-item label="集团统一编码">{{ model.uniteNo }}</a-descriptions-item>
+            <a-descriptions-item label="自编号">{{ model.zbh }}</a-descriptions-item>
+            <a-descriptions-item label="备件编码">{{ model.no }}</a-descriptions-item>
+            <a-descriptions-item label="备件名称">{{ model.name }}</a-descriptions-item>
+            <a-descriptions-item label="名称编码">{{ model.nameNo }}</a-descriptions-item>
+            <a-descriptions-item label="规格型号">{{ model.ggxh }}</a-descriptions-item>
+            <a-descriptions-item label="规格编码">{{ model.ggNo }}</a-descriptions-item>
+            <a-descriptions-item label="备件类别">{{ model.typeName }}</a-descriptions-item>
+            <a-descriptions-item label="备件等级">{{ BaseTool.Object.getField(levelMap,model.level) }}</a-descriptions-item>
+            <a-descriptions-item label="备件价值">{{ BaseTool.Amount.formatter(model.initialValue) }}</a-descriptions-item>
+            <a-descriptions-item label="生产商">{{ model.producerName }}</a-descriptions-item>
+            <a-descriptions-item label="供应商">{{ model.supplierName }}</a-descriptions-item>
+            <a-descriptions-item label="原厂编号">{{ model.initNo }}</a-descriptions-item>
+            <a-descriptions-item label="计量单位">{{ model.unit }}</a-descriptions-item>
+            <a-descriptions-item label="包装单位">{{ model.unitBz }}</a-descriptions-item>
+            <a-descriptions-item label="折算系数">{{ model.unitRate }}</a-descriptions-item>
+            <a-descriptions-item label="当前库存">{{ model.currentStock }}</a-descriptions-item>
+            <a-descriptions-item label="采购周期">{{ model.purchasePeriod }}天</a-descriptions-item>
+            <a-descriptions-item label="使用周期">{{ model.usePeriod }}月</a-descriptions-item>
+            <a-descriptions-item label="寿命周期">{{ model.agePeriod }}月</a-descriptions-item>
+            <a-descriptions-item label="当前库存">{{ model.currentStock }}</a-descriptions-item>
+            <a-descriptions-item label="最高库存">{{ model.maxStock }}</a-descriptions-item>
+            <a-descriptions-item label="最低库存">{{ model.minStock }}</a-descriptions-item>
+            <a-descriptions-item label="初始库存">{{ model.initStock }}</a-descriptions-item>
+            <a-descriptions-item label="英文名称">{{ model.englishName }}</a-descriptions-item>
+            <a-descriptions-item label="助记码">{{ model.zjm }}</a-descriptions-item>
+            <a-descriptions-item label="产地">{{ BaseTool.Object.getField(cdMap,model.cd) }}</a-descriptions-item>
+            <a-descriptions-item label="用途">{{ BaseTool.Object.getField(ytMap,model.yt) }}</a-descriptions-item>
+            <a-descriptions-item label="用途">{{ BaseTool.Object.getField(specialMap,model.isSpecial) }}</a-descriptions-item>
+            <a-descriptions-item label="参数">{{ model.params }}</a-descriptions-item>
+            <a-descriptions-item label="备注">{{ model.remark }}</a-descriptions-item>
+            <a-descriptions-item label="创建人">{{ model.createdUserName }}</a-descriptions-item>
+            <a-descriptions-item label="更新人">{{ model.updateUserName }}</a-descriptions-item>
+            <a-descriptions-item label="更新日期">{{ model.updateTime }}</a-descriptions-item>
+          </a-descriptions>
+        </a-card>
+        <br>
+        <a-card>
+          <div style="margin:0; padding:15px 30px; background:#EFEFFB;font-size:16px; color: #1890ff"><b>图片信息</b></div>
+          <br>
+          <a-row type="flex" justify="space-between" :gutter="[16,16]">
+            <a-col >
+              <img :src="BaseTool.Constant.FILE_URL + model.image" width="200px" height="200px"/>
+            </a-col>
+          </a-row>
+        </a-card>
+      </a-layout-content>
+    </a-layout>
+  </a-card>
+</template>
+
+<script>
+import DetailList from '@/components/tools/DetailList'
+import { selectSbModelListBySpareId } from '@/api/sb/modelbom'
+const DetailListItem = DetailList.Item
+
+export default {
+  name: 'SparePartInfoDetail',
+  components: {
+    DetailList,
+    DetailListItem
+  },
+  data () {
+    return {
+      confirmLoading: false,
+      mdl: {},
+      modalTitle: null,
+      visible: false,
+      // 下拉框map
+      levelMap: {},
+      unitMap: {},
+      cdMap: {},
+      ytMap: {},
+      specialMap: {},
+      model: {
+        'no': null,
+        'name': null,
+        'ggxh': null,
+        'typeId': null,
+        'level': null,
+        'initialValue': null,
+        'producerId': null,
+        'producerName': null,
+        'supplierId': null,
+        'supplierName': null,
+        'unit': null,
+        'unitBz': null,
+        'unitRate': null,
+        'currentStock': null,
+        'purchasePeriod': null,
+        'usePeriod': null,
+        'agePeriod': null,
+        'maxStock': null,
+        'qrCode': null,
+        'applicationFileList': [],
+        'minStock': null,
+        'image': null,
+        'initStock': null,
+        'params': null,
+        'remark': null,
+        'createdUserId': null,
+        'updateUserId': null,
+        'updateTime': null,
+        'createdUserName': null,
+        'updateUserName': null,
+        'typeName': null
+      },
+      periodTypeMap: {},
+      // 表头
+      columns: [
+        {
+          title: '型号',
+          dataIndex: 'model'
+        },
+        {
+          title: '名称',
+          dataIndex: 'name'
+        },
+        {
+          title: '新号',
+          dataIndex: 'no'
+        },
+        {
+          title: '旧号',
+          dataIndex: 'zbh'
+        },
+        {
+          title: '更换周期',
+          dataIndex: 'period',
+          customRender: (text, record, index) => {
+            return text + this.BaseTool.Table.getMapText(this.periodTypeMap, record.periodType)
+          }
+        },
+        {
+          title: '数量',
+          dataIndex: 'num'
+        },
+        {
+          title: '操作',
+          key: 'action',
+          checked: true,
+          align: 'center',
+          // fixed: 'right',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      data: []
+    }
+  },
+  created () {
+    // 下拉框map
+    this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SPARE_PART_INFO_LEVEL)
+    this.unitMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_UNIT)
+    this.cdMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.PRODUCER_AREA)
+    this.ytMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SPARE_USE_TYPE)
+    this.specialMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
+    this.periodTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_PLAN_PERIOD_TYPE)
+  },
+  methods: {
+    base (record) {
+      this.visible = true
+      this.modalTitle = '详情'
+      this.model = record
+      selectSbModelListBySpareId({ id: record.id }).then(res => {
+        this.data = res.data
+      })
+    },
+    inited (viewer) {
+      this.$viewer = viewer
+      // this.$viewer.index = 0
+      // // 不要他的按钮
+      // this.$viewer.options.button = false
+      // // 不要他的底部缩略图
+      // this.$viewer.options.navbar = false
+      // // 不要他的底部标题
+      // this.$viewer.options.title = false
+      // // 不要他的底部工具栏
+      // this.$viewer.options.toolbar = false
+    },
+    handleCancel () {
+      this.visible = false
+      this.confirmLoading = false
+      this.$emit('ok')
+    }
+
+  }
+}
+</script>
+<style scoped scoped>
+ .ant-layout-sider {
+background: #fff !important;
+padding: 20px 16px !important;
+}
+.ant-card-body{
+  padding: 0  !important;
+}
+</style>