guarantee-lsq 2 years ago
parent
commit
71e94590d9

+ 42 - 0
src/api/workplace/backlog.js

@@ -220,3 +220,45 @@ export function getWorkPlace () {
     }
   })
 }
+/**
+ * page func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function getRepairTicketList () {
+  return axios({
+    url: '/index/workPlace/repair/ticket/list',
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+/**
+ * page func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function getOutStoreTicketList () {
+  return axios({
+    url: '/index/workPlace/outStore/ticket/list',
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+/**
+ * page func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function putTicketList (parameter) {
+  return axios({
+    url: `/index/ticket/print/${parameter.type}/${parameter.id} `,
+    method: 'Put'
+  })
+}

+ 9 - 3
src/views/hidden/hidden/modules/BaseForm.vue

@@ -1,6 +1,12 @@
 <template>
-  <a-card :bordered="false" v-show="visible" class="card" :title="modalTitle">
-    <a-row :gutter="48" slot="extra">
+  <a-modal
+    :title="modalTitle"
+    :width="1000"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    class="ant-modal2"
+    @cancel="handleCancel">
+    <a-row :gutter="48" slot="footer">
       <a-col :md="48" :sm="48">
         <span class="table-page-search-submitButtons" style="float: right">
           <a-button :loading="confirmLoading" type="primary" @click="save()">保存</a-button>
@@ -234,7 +240,7 @@
       </row-list>
     </a-form>
     <sb-info-select-modal ref="sbInfoSelectModal" @selected="handleSbSelectd"/>
-  </a-card>
+  </a-modal>
 </template>
 
 <script>

+ 77 - 23
src/views/workplace/backlog/Workbench.vue

@@ -5,27 +5,27 @@
         <a-icon type="bar-chart" />&nbsp;快捷按钮
       </div>
       <a-row type="flex" justify="space-around" align="center" style="padding:30px">
-        <a-col v-if="roles.includes('REPAIR_MANAGE')||roles.includes('Maintenance_Leader')||roles.includes('Maintenance')" :span="4" class="btn1 btn">
+        <a-col v-if="roles.includes('REPAIR_MANAGE')||roles.includes('Maintenance_Leader')||roles.includes('Maintenance')" :span="4" class="btn1 btn" @click="$refs.repairForm.base()">
           <my-icon type="icon-baoxiu-xuanzhong-copy" class="icon"/>
           <span>报修</span>
         </a-col>
-        <a-col v-if="isSuper!==1&&(roles.includes('Maintenance_Leader')||roles.includes('Maintenance'))" :span="4" >
+        <a-col v-if="isSuper!==1&&(roles.includes('Maintenance_Leader')||roles.includes('Maintenance'))" :span="4" @click="$refs.prinTicketList.base()">
           <a-badge :count="dataInfo.repairTicketPrintNum" class="btn1 btn" style="background: linear-gradient(90deg, #FFDB5C, #FEB464);">
             <my-icon type="icon-fapiao" class="icon"/>
             <span>打印票证</span>
           </a-badge>
         </a-col>
-        <a-col v-if="isSuper!==1&&(roles.includes('Maintenance_Leader')||roles.includes('Maintenance'))" :span="4" class="btn1 btn" style="background: linear-gradient(90deg, #9ADDD6, #91B8ED);">
+        <a-col v-if="isSuper!==1&&(roles.includes('Maintenance_Leader')||roles.includes('Maintenance'))" :span="4" class="btn1 btn" style="background: linear-gradient(90deg, #9ADDD6, #91B8ED);" @click="$refs.sparePickForm.base()">
           <my-icon type="icon-shengchanlingliaoyutuiliao" class="icon"/>
           <span>领料</span>
         </a-col>
-        <a-col v-if="isSuper!==1&&(roles.includes('Maintenance_Leader')||roles.includes('Maintenance'))" :span="4" >
+        <a-col v-if="isSuper!==1&&(roles.includes('Maintenance_Leader')||roles.includes('Maintenance'))" :span="4" @click="$refs.prinOutStoreTicketList.base()">
           <a-badge :count="dataInfo.outStorePrintNum" class="btn1 btn" style="background: linear-gradient(90deg, #FC8C8F, #F76BD3)">
             <my-icon type="icon-gongdan" class="icon"/>
             <span>打印出库单</span>
           </a-badge>
         </a-col>
-        <a-col v-if="roles.includes('REPAIR_MANAGE')||roles.includes('Maintenance_Leader')||roles.includes('Maintenance')" :span="4" class="btn1 btn" style="background: linear-gradient(90deg, #F084BF, #A971E8);">
+        <a-col v-if="roles.includes('REPAIR_MANAGE')||roles.includes('Maintenance_Leader')||roles.includes('Maintenance')" :span="4" class="btn1 btn" style="background: linear-gradient(90deg, #F084BF, #A971E8);" @click="$refs.hiddenForm.base()">
           <my-icon type="icon-tixingshixin" class="icon"/>
           <span>隐患</span>
         </a-col>
@@ -36,7 +36,7 @@
         <my-icon type="icon-daibanshixiang" />&nbsp;待办事项
       </div>
       <div class="backlog">
-        <div class="btn" v-if="roles.includes('Maintenance_Leader')||roles.includes('Maintenance')">
+        <div class="btn" v-if="roles.includes('Maintenance_Leader')||roles.includes('Maintenance')" @click="handleView(1)">
           <a-badge :count="dataInfo.repairNum" >
             <div class="icon">
               <my-icon type="icon-weixiuguanli"/>
@@ -44,7 +44,7 @@
           </a-badge>
           <div>维修</div>
         </div>
-        <div class="btn" v-if="roles.includes('Maintenance_Leader')||roles.includes('Maintenance')">
+        <div class="btn" v-if="roles.includes('Maintenance_Leader')||roles.includes('Maintenance')" @click="handleView(2)">
           <a-badge :count="dataInfo.fillCheckNum" >
             <div class="icon" style="background:#F59A23;">
               <my-icon type="icon-xunjianjianyan"/>
@@ -52,7 +52,7 @@
           </a-badge>
           <div>巡检</div>
         </div>
-        <div class="btn" v-if="roles.includes('MM')||roles.includes('REPAIR_MANAGE')">
+        <div class="btn" v-if="roles.includes('MM')||roles.includes('REPAIR_MANAGE')" @click="handleView(3)">
           <a-badge :count="dataInfo.verifyRepairNum" >
             <div class="icon">
               <my-icon type="icon-weixiuguanli"/>
@@ -60,7 +60,7 @@
           </a-badge>
           <div>维修审批</div>
         </div>
-        <div class="btn" v-if="roles.includes('REPAIR_MANAGE')">
+        <div class="btn" v-if="roles.includes('REPAIR_MANAGE')" @click="handleView(4)">
           <a-badge :count="dataInfo.fillCheckNum" >
             <div class="icon" style="background:#F59A23;">
               <my-icon type="icon-xunjianjianyan"/>
@@ -68,7 +68,7 @@
           </a-badge>
           <div>巡检待审</div>
         </div>
-        <div class="btn" v-if="roles.includes('REPAIR_MANAGE')">
+        <div class="btn" v-if="roles.includes('REPAIR_MANAGE')" @click="handleView(5)">
           <a-badge :count="dataInfo.jljdNum" >
             <div class="icon" style="background:#02A7F0;">
               <my-icon type="icon-shenpiliuchengguanli"/>
@@ -76,7 +76,7 @@
           </a-badge>
           <div>仪表待检定</div>
         </div>
-        <div class="btn" v-if="roles.includes('REPAIR_MANAGE')">
+        <div class="btn" v-if="roles.includes('REPAIR_MANAGE')" @click="handleView(6)">
           <a-badge :count="dataInfo.verifyOutStoreNum" >
             <div class="icon" style="background:#EC808D;">
               <my-icon type="icon-baobiao"/>
@@ -84,7 +84,7 @@
           </a-badge>
           <div>出库待审</div>
         </div>
-        <div class="btn" v-if="roles.includes('REPAIR_MANAGE')">
+        <div class="btn" v-if="roles.includes('REPAIR_MANAGE')" @click="handleView(7)">
           <a-badge :count="dataInfo.specialNum" >
             <div class="icon" style="background:#C280FF;">
               <my-icon type="icon-gongzuotai"/>
@@ -92,7 +92,7 @@
           </a-badge>
           <div>特种待检定</div>
         </div>
-        <div class="btn" v-if="roles.includes('REPAIR_MANAGE')">
+        <div class="btn" v-if="roles.includes('REPAIR_MANAGE')" @click="handleView(8)">
           <a-badge :count="dataInfo.repairCloseNum" >
             <div class="icon">
               <my-icon type="icon-weixiuguanli"/>
@@ -168,24 +168,44 @@
         >
           <a-list item-layout="horizontal" :data-source="data">
             <a-list-item slot="renderItem" slot-scope="item">
+              <a slot="actions">去完善</a>
               <a-list-item-meta
-                description="6月20日  11:30"
               >
-                <a slot="title" href="https://www.antdv.com/">{{ item.title }}</a>
-                <a-badge color="#18C3B1" slot="avatar" />
+                <a-badge slot="title" :count="dataInfo[item.value]" >
+                  <div style="padding:0 20px 0 0;">{{ item.title }}</div>
+                </a-badge>
+
+                <a-badge color="#18C3B1" slot="avatar" :count="dataInfo[item.value]" ></a-badge>
               </a-list-item-meta>
             </a-list-item>
           </a-list>
         </div>
       </div>
     </div>
+    <repair-form ref="repairForm"></repair-form>
+    <SparePickForm ref="sparePickForm"></SparePickForm>
+    <HiddenForm ref="hiddenForm" />
+    <PrinTicketList ref="prinTicketList" />
+    <PrinOutStoreTicketList ref="prinOutStoreTicketList" />
   </div>
 </template>
 
 <script>
 import * as echarts from 'echarts'
 import { getWorkPlace } from '@/api/workplace/backlog'
+import PrinTicketList from './modules/PrinTicketList.vue'
+import PrinOutStoreTicketList from './modules/PrinOutStoreTicketList.vue'
+import RepairForm from '@/views/repair/application-form/modules/BaseForm.vue'
+import SparePickForm from '@/views/store/sparepickform/modules/BaseForm'
+import HiddenForm from '@/views/hidden/hidden/modules/BaseForm.vue'
 export default {
+  components: {
+    RepairForm,
+    SparePickForm,
+    HiddenForm,
+    PrinTicketList,
+    PrinOutStoreTicketList
+  },
   data () {
     return {
       dataInfo: {},
@@ -193,16 +213,20 @@ export default {
       roles: this.$store.state.user.roles,
       data: [
         {
-          title: 'Ant Design Title 1'
+          title: '待完善位号设备数量',
+          value: 'positionNoNum'
         },
         {
-          title: 'Ant Design Title 2'
+          title: '待完善型号设备数量',
+          value: 'xinhaoNum'
         },
         {
-          title: 'Ant Design Title 3'
+          title: '待完善资产编码设备数量',
+          value: 'financingNoNum'
         },
         {
-          title: 'Ant Design Title 4'
+          title: '待完善设备类型数量',
+          value: 'sbTypeNum'
         }
       ],
       colors: ['#77EFD8', '#7FD6FF', '#FFDB5C', '#FEB464', '#9ADDD6', '#91B8ED', '#FC8C8F', '#F76BD3', '#F084BF', '#A971E8', '#ee6666', '#73c0de']
@@ -210,12 +234,13 @@ export default {
   },
   mounted () {
     this.getInfo()
-    console.log(this.isSuper, this.roles)
   },
   methods: {
     getInfo () {
       getWorkPlace().then(res => {
         this.dataInfo = res.data
+        console.log(res)
+
         const chartData1 = this.dataInfo.repairStatusList.map(item => {
           return {
             name: item.statusName,
@@ -244,8 +269,6 @@ export default {
         this.createChart2(chartData2)
         this.createChart3(chartData3)
         this.createChart4(chartData4)
-
-        console.log(res)
       })
     },
     createChart1 (data) {
@@ -423,6 +446,37 @@ export default {
       }
 
       option && myChart.setOption(option)
+    },
+    handleView (key) {
+      const a = document.createElement('a')
+      a.target = '_blank'
+      switch (key) {
+        case 1 :
+          a.href = '/repair/form/mine'
+          break
+        case 2 :
+          a.href = '/sb/inspection/fill/task'
+          break
+        case 3 :
+          a.href = '/repair/manager/check'
+          break
+        case 4 :
+          a.href = '/sb/fill/task/verify'
+          break
+        case 5 :
+          a.href = '/check/spot-job'
+          break
+        case 6 :
+          a.href = '/act/my-task'
+          break
+        case 7 :
+          a.href = '/repair/form/mine'
+          break
+        case 8 :
+          a.href = '/repair/form/mine'
+          break
+      }
+      a.click()
     }
   }
 }

+ 81 - 0
src/views/workplace/backlog/modules/PrinOutStoreTicketList.vue

@@ -0,0 +1,81 @@
+<template>
+  <a-modal
+    title="打印票据"
+    :width="1000"
+    :visible="visible"
+    class="ant-modal2"
+    :footer="null"
+    @cancel="handleCancel"
+  >
+    <a-table v-show="show" :columns="columns" :data-source="data">
+      <span slot="index" slot-scope="text, record,index">
+        {{ index+1 }}
+      </span>
+      <span slot="action" slot-scope="text, record">
+        <a @click="handlePrint(record)">打印</a>
+      </span>
+    </a-table>
+    <TicketForm ref="ticketForm" @ok="handleOk" />
+  </a-modal>
+</template>
+
+<script>
+import { getOutStoreTicketList } from '@/api/workplace/backlog'
+import TicketForm from '@/views/store/outstoreform/modules/TicketForm.vue'
+import { fetchOutStoreForm } from '@/api/store/outstoreform'
+export default {
+  components: {
+    TicketForm
+  },
+  data () {
+    return {
+      visible: false,
+      show: true,
+      data: [],
+      columns: [
+        {
+          title: '序号',
+          key: 'index',
+          scopedSlots: { customRender: 'index' }
+        },
+        {
+          title: '成本归属',
+          dataIndex: 'feeFrom',
+          key: 'feeFrom'
+        },
+        {
+          title: '操作',
+          key: 'action',
+          scopedSlots: { customRender: 'action' }
+        }
+      ]
+    }
+  },
+  methods: {
+    base () {
+      this.visible = true
+      getOutStoreTicketList().then(res => {
+        console.log(res)
+        this.data = res.data
+      })
+    },
+    handlePrint (val) {
+      this.show = false
+      fetchOutStoreForm({ id: val.id }).then(res => {
+        const modal = this.$refs.ticketForm
+        modal.base(res.data, 1)
+      })
+    },
+    handleOk () {
+      this.show = true
+    },
+    handleCancel () {
+      this.visible = false
+    }
+  }
+}
+</script>
+
+<style>
+
+</style>

+ 81 - 0
src/views/workplace/backlog/modules/PrinTicketList.vue

@@ -0,0 +1,81 @@
+<template>
+  <a-modal
+    title="打印票据"
+    :width="1000"
+    :visible="visible"
+    class="ant-modal2"
+    :footer="null"
+    @cancel="handleCancel"
+  >
+    <a-table v-show="show" :columns="columns" :data-source="data">
+      <span slot="index" slot-scope="text, record,index">
+        {{ index+1 }}
+      </span>
+      <span slot="action" slot-scope="text, record">
+        <a @click="handlePrint(record)">打印</a>
+      </span>
+    </a-table>
+    <TicketForm ref="ticketForm" @ok="handleOk" />
+  </a-modal>
+</template>
+
+<script>
+import { getRepairTicketList } from '@/api/workplace/backlog'
+import TicketForm from '@/views/repair/application-form/modules/TicketForm.vue'
+import { fetchRepairTicketRecord } from '@/api/customize/fieldTemplateData'
+export default {
+  components: {
+    TicketForm
+  },
+  data () {
+    return {
+      visible: false,
+      show: true,
+      data: [],
+      columns: [
+        {
+          title: '序号',
+          key: 'index',
+          scopedSlots: { customRender: 'index' }
+        },
+        {
+          title: '故障描述',
+          dataIndex: 'content',
+          key: 'content'
+        },
+        {
+          title: '操作',
+          key: 'action',
+          scopedSlots: { customRender: 'action' }
+        }
+      ]
+    }
+  },
+  methods: {
+    base () {
+      this.visible = true
+      getRepairTicketList().then(res => {
+        console.log(res)
+        this.data = res.data
+      })
+    },
+    handlePrint (val) {
+      this.show = false
+      fetchRepairTicketRecord({ id: val.id }).then(res => {
+        const modal = this.$refs.ticketForm
+        modal.base(res.data, val.id)
+      })
+    },
+    handleOk () {
+      this.show = true
+    },
+    handleCancel () {
+      this.visible = false
+    }
+  }
+}
+</script>
+
+<style>
+
+</style>