hfxc226 3 years ago
parent
commit
c9493f0ae5

+ 14 - 0
src/api/repair/application-form.js

@@ -140,6 +140,20 @@ export function exportRepairApplicationForm (parameter) {
   })
 }
 
+/**
+ * finish func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function changeApplicationForm (parameter) {
+  return axios({
+    url: '/repair/application-forms/change/' + parameter.id,
+    method: 'PUT',
+    data: parameter
+  })
+}
+
 /**
  * finish func
  * parameter: { }

+ 8 - 3
src/views/dashboard/CheckJobReportWeek.vue

@@ -174,8 +174,7 @@ export default {
           // 需要将数据分组:总数,完成数
           const groupData = []
           this.chartsData.forEach(function (data) {
-            groupData.push({ name: '标准工时', week: data.week + '', totalHours: data.totalHours })
-            groupData.push({ name: '总可用工时', week: data.week + '', totalHours: data.useHours * data.usePeople })
+            groupData.push({ name: '标准工时', week: data.week + '', totalHours: data.totalHours, totalUseHours: data.useHours * data.usePeople })
           })
           this.getCharts('container', groupData)// 调用统计图
         })
@@ -193,7 +192,8 @@ export default {
       })
       this.chart.tooltip({
         showMarkers: false,
-        shared: true
+        shared: true,
+        showCrosshairs: true // 展示 Tooltip 辅助线
       })
       this.chart.interval().position('week*totalHours').color('name').adjust([
         {
@@ -205,6 +205,11 @@ export default {
       this.chart.legend({
         position: 'bottom'
       })
+      this.chart.line().position('week*totalUseHours')
+      this.chart.point().position('week*totalUseHours').size(4).shape('circle').style({
+        stroke: '#fff',
+        lineWidth: 1
+      })
       this.chart.render()
     },
     doExport () {

+ 9 - 2
src/views/dashboard/modules/DetailCheckJobReport.vue

@@ -29,12 +29,14 @@
     <template slot="footer">
       <a-button :loading="confirmLoading" type="primary" @click="handleCancel()">返回</a-button>
     </template>
+    <detail :check-type="2" ref="detailModal"/>
   </a-modal>
 </template>
 
 <script>
 import DetailList from '@/components/tools/DetailList'
-import { exportMonthReportMonth } from '@/api/report/check-job'
+import Detail from '@/views/check/checkjob/modules/Detail'
+import { fetchCheckJob } from '@/api/check/checkjob'
 
 const DetailListItem = DetailList.Item
 
@@ -42,7 +44,8 @@ export default {
   name: 'DetailRepairReport',
   components: {
     DetailList,
-    DetailListItem
+    DetailListItem,
+    Detail
   },
   data () {
     return {
@@ -214,6 +217,10 @@ export default {
       this.confirmLoading = false
     },
     handleView (record) {
+      fetchCheckJob({ id: record.id }).then(res => {
+        const modal = this.$refs.detailModal
+        modal.base(res.data)
+      })
     }
   }
 }

+ 9 - 2
src/views/dashboard/modules/DetailRepairReport.vue

@@ -27,18 +27,22 @@
     <template slot="footer">
       <a-button :loading="confirmLoading" type="primary" @click="handleCancel()">返回</a-button>
     </template>
+    <detail ref="detailModal"/>
   </a-modal>
 </template>
 
 <script>
 import DetailList from '@/components/tools/DetailList'
+import { fetchRepairApplicationForm } from '@/api/repair/application-form'
+import Detail from '@/views/repair/application-form/modules/Detail'
 const DetailListItem = DetailList.Item
 
 export default {
   name: 'DetailRepairReport',
   components: {
     DetailList,
-    DetailListItem
+    DetailListItem,
+    Detail
   },
   data () {
     return {
@@ -211,7 +215,10 @@ export default {
       this.confirmLoading = false
     },
     handleView (record) {
-
+      fetchRepairApplicationForm({ id: record.id }).then(res => {
+        const modal = this.$refs.detailModal
+        modal.base(res.data)
+      })
     }
   }
 }

+ 10 - 2
src/views/dashboard/modules/DetailRepairReportFee.vue

@@ -27,18 +27,22 @@
     <template slot="footer">
       <a-button :loading="confirmLoading" type="primary" @click="handleCancel()">返回</a-button>
     </template>
+    <detail ref="detailModal"/>
   </a-modal>
 </template>
 
 <script>
 import DetailList from '@/components/tools/DetailList'
+import { fetchRepairFee } from '@/api/repair/fee'
+import Detail from '@/views/repair/fee/modules/Detail'
 const DetailListItem = DetailList.Item
 
 export default {
   name: 'DetailRepairReportFee',
   components: {
     DetailList,
-    DetailListItem
+    DetailListItem,
+    Detail
   },
   data () {
     return {
@@ -151,6 +155,7 @@ export default {
         {
           title: '操作',
           key: 'action',
+          fixed: 'right',
           width: '200px',
           align: 'center',
           scopedSlots: { customRender: 'action' }
@@ -181,7 +186,10 @@ export default {
       this.confirmLoading = false
     },
     handleView (record) {
-
+      fetchRepairFee({ id: record.id }).then(res => {
+        const modal = this.$refs.detailModal
+        modal.base(res.data)
+      })
     }
   }
 }

+ 1 - 1
src/views/dashboard/modules/PrintInCheckJobReport.vue

@@ -10,7 +10,7 @@
     </a-row>
     <div class="container" id="print-container2">
       <div class="text-center" style="position:relative;font-size:20px;font-weight:bold">
-        Hitachi</br>>保养任务月统计报表
+        Hitachi<br/> 保养任务月统计报表
       </div>
       <div>
         <div class="col-md-4 text-center" style="padding: 0">统计周期: {{ record.startMonth }} 至 {{ record.endMonth }}</div>

+ 4 - 2
src/views/dashboard/modules/PrintInCheckJobReportWeek.vue

@@ -10,7 +10,7 @@
     </a-row>
     <div class="container" id="print-container2">
       <div class="text-center" style="position:relative;font-size:20px;font-weight:bold">
-        Hitachi</br>>保养任务每月统计报表
+        Hitachi<br/> 保养任务每月统计报表
       </div>
       <div>
         <div class="col-md-4 text-center" style="padding: 0">统计年份: {{ record.year }}</div>
@@ -19,11 +19,13 @@
         <tbody>
           <tr>
             <td class="text-center">周</td>
-            <td class="text-center">保养标准工时</td>
+            <td class="text-center">总保养标准工时(小时)</td>
+            <td class="text-center">总可用工时(小时)</td>
           </tr>
           <tr :key="index" v-for="(item,index) in items">
             <td class="text-center">{{ item.week}}</td>
             <td class="text-center">{{ item.totalHours }}</td>
+            <td class="text-center">{{ item.useHours * item.usePeople }}</td>
           </tr>
         </tbody>
       </table>

+ 1 - 1
src/views/dashboard/modules/PrintInRepairReport.vue

@@ -10,7 +10,7 @@
     </a-row>
     <div class="container" id="print-container2">
       <div class="text-center" style="position:relative;font-size:20px;font-weight:bold">
-        Hitachi</br> {{ record.title }}
+        Hitachi<br/> {{ record.title }}
       </div>
       <div>
         <div class="col-md-4 text-center" style="padding: 0">统计周期: {{ record.startMonth }} 至 {{ record.endMonth }}</div>

+ 1 - 1
src/views/dashboard/modules/PrintInRepairReportFee.vue

@@ -10,7 +10,7 @@
     </a-row>
     <div class="container" id="print-container2">
       <div class="text-center" style="position:relative;font-size:20px;font-weight:bold">
-        Hitachi</br> {{ record.title }}
+        Hitachi<br/> {{ record.title }}
       </div>
       <div>
         <div class="col-md-4 text-center" style="padding: 0">统计周期: {{ record.startMonth }} 至 {{ record.endMonth }}</div>

+ 1 - 1
src/views/dashboard/modules/PrintInRepairReportMttr.vue

@@ -10,7 +10,7 @@
     </a-row>
     <div class="container" id="print-container2">
       <div class="text-center" style="position:relative;font-size:20px;font-weight:bold">
-        Hitachi</br> {{ record.title }}
+        Hitachi<br/> {{ record.title }}
       </div>
       <div>
         <div class="col-md-4 text-center" style="padding: 0">统计周期: {{ record.startMonth }} 至 {{ record.endMonth }}</div>

+ 15 - 112
src/views/repair/application-form/modules/EditForm.vue

@@ -32,106 +32,30 @@
         </row-item>
         <row-item>
           <a-form-item
-            label="完成时间"
+            label="接收时间"
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
             <a-date-picker
-              v-decorator="['repairEndTime']"
+              v-decorator="['repairStartTime']"
               style="width: 100%"
               :format="BaseTool.Date.PICKER_NORM_DATETIME_PATTERN"
             />
           </a-form-item>
         </row-item>
-        <!--        <row-item>
-          <a-form-item
-            label="紧急等级"
-            :labelCol="BaseTool.Constant.labelCol"
-            :wrapperCol="BaseTool.Constant.wrapperCol"
-          >
-            <a-select v-decorator="['level', {initialValue: 1, rules: [{required: true, message: '紧急等级不能为空'}]}]" placeholder="请选择">
-              <a-select-option
-                v-for="(label,value) in levelMap"
-                :key="value"
-                :label="label"
-                :value="parseInt(value)">{{ label }}
-              </a-select-option>
-            </a-select>
-          </a-form-item>
-        </row-item>
         <row-item>
           <a-form-item
-            label="故障类别"
-            :labelCol="BaseTool.Constant.labelCol"
-            :wrapperCol="BaseTool.Constant.wrapperCol"
-          >
-            <a-tree-select
-              style="width: 100%"
-              :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
-              :treeData="treeData"
-              :treeNodeFilterProp="'title'"
-              :showSearch="true"
-              v-decorator="['repairErrorTypeId']"
-              placeholder="请选择"
-            >
-            </a-tree-select>
-          </a-form-item>
-        </row-item>-->
-
-        <!--<row-item>
-          <a-form-item
-            label="维修耗时"
+            label="完成时间"
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
-            <a-input
+            <a-date-picker
+              v-decorator="['repairEndTime']"
               style="width: 100%"
-              :min="1"
-              :step="0.01"
-              type="number"
-              addonAfter="分钟"
-              v-decorator="['repairMinutes', {initialValue:1, rules: [{required: false, message: '维修耗时不能为空'}]}]" />
-          </a-form-item>
-        </row-item>
-        <row-item>
-          <a-form-item
-            label="更换备件"
-            :labelCol="BaseTool.Constant.labelCol"
-            :wrapperCol="BaseTool.Constant.wrapperCol"
-          >
-            <a-button type="primary" @click="handleAddPartUsed">更换备件</a-button>
-          </a-form-item>
-        </row-item>-->
-      </row-list>
-      <row-list :col="1">
-        <row-item>
-          <a-form-item
-            label="维修描述"
-            :labelCol="BaseTool.Constant.labelCol2"
-            :wrapperCol="BaseTool.Constant.wrapperCol2"
-          >
-            <a-textarea v-decorator="['repairContent']"/>
+              :format="BaseTool.Date.PICKER_NORM_DATETIME_PATTERN"
+            />
           </a-form-item>
         </row-item>
-        <!--        <row-item>
-          <a-form-item
-            label="维修图片"
-            :labelCol="BaseTool.Constant.labelCol2"
-            :wrapperCol="BaseTool.Constant.wrapperCol2"
-          >
-            <a-upload
-              :action="uploadUrl"
-              :multiple="true"
-              list-type="picture"
-              :file-list="defaultRepairFileList"
-              @change="handleRepairFileChange"
-              accept="image/*"
-              :headers="headers"
-            >
-              <a-button> <a-icon type="upload" /> 上传图片 </a-button>
-            </a-upload>
-          </a-form-item>
-        </row-item>-->
       </row-list>
     </a-form>
     <spare-part-used-select-modal ref="sparePartUsedSelectModal" />
@@ -143,11 +67,9 @@
 
 <script>
 import pick from 'lodash.pick'
-import { updateRepairApplicationForm } from '@/api/repair/application-form'
-import { queryUser } from '@/api/upms/user'
+import { changeApplicationForm } from '@/api/repair/application-form'
 import { fetchErrorTypeTree } from '@/api/repair/errortype'
 import SparePartUsedSelectModal from '@/views/sqarepartmanage/sparepartused/modules/SparePartUsedSelectModal'
-import { uploadUrl } from '@/api/upms/file'
 import Vue from 'vue'
 import { ACCESS_TOKEN } from '@/store/mutation-types'
 
@@ -171,11 +93,7 @@ export default {
       sourceMap: {},
       levelMap: {},
       needStopMap: {},
-      statusMap: {},
-      uploadUrl: uploadUrl,
-      defaultRepairFileList: [],
-      repairFileList: [], // 维修图片,
-      userList: []
+      statusMap: {}
     }
   },
   components: {
@@ -205,6 +123,7 @@ export default {
       this.modalTitle = '维修完成'
       const { form: { setFieldsValue } } = this
       // 日期处理
+      record.repairStartTime = this.BaseTool.Date.formatter(record.repairStartTime, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)
       record.repairEndTime = this.BaseTool.Date.formatter(record.repairEndTime, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)
       this.$nextTick(() => {
         setFieldsValue(Object.assign(pick(record, [
@@ -215,14 +134,13 @@ export default {
           'repairContent',
           'category',
           'repairErrorTypeId',
-          'repairEndTime'
+          'repairEndTime',
+          'repairStartTime'
         ])))
       })
     },
     getUsers () {
-      queryUser({ status: 1 }).then(res => {
-        this.userList = res.data
-      })
+
     },
     changePlanFlag (value) {
       this.category = value
@@ -237,22 +155,6 @@ export default {
         })
       }
     },
-    handleRepairFileChange (info) {
-      this.defaultRepairFileList = info.fileList
-      this.repairFileList = this.setFileList(info, 12)
-    },
-    setFileList (info, type) {
-      const file = info.file
-      const fileList = info.fileList
-      if (file.status === 'done') {
-        return this.BaseTool.UPLOAD.getUploadFileDTO(fileList, type)
-      } else if (file.status === 'removed') {
-        return this.BaseTool.UPLOAD.getUploadFileDTO(fileList, type)
-      } else if (file.status === 'error') {
-        this.$message.error('上传失败')
-        return []
-      }
-    },
     save () {
       const { form: { validateFieldsAndScroll } } = this
       this.confirmLoading = true
@@ -263,8 +165,9 @@ export default {
         }
         // 日期处理
         values.repairFileList = this.repairFileList
+        values.repairStartTime = this.BaseTool.Date.formatter(values.repairStartTime, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)
         values.repairEndTime = this.BaseTool.Date.formatter(values.repairEndTime, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)
-        updateRepairApplicationForm(values).then(() => {
+        changeApplicationForm(values).then(() => {
           this.$message.info('维修完成,请完成后续维修报告,完成后提交审核;')
           this.handleCancel(values)
         }).catch(() => {

+ 10 - 8
src/views/sqarepartmanage/sparepartinfo/SparePartInfo.vue

@@ -227,28 +227,30 @@ export default {
             return this.BaseTool.Amount.formatter(text)
           }
         },
-        {
-          title: '当前库存',
-          dataIndex: 'currentStock',
-          width: '150px',
-          scopedSlots: { customRender: 'status' }
-        },
+
         {
           title: '计量单位',
           checked: true,
           width: '150px',
           dataIndex: 'unit'
         },
+        {
+          title: '当前库存',
+          dataIndex: 'currentStock',
+          checked: true,
+          width: '100px',
+          scopedSlots: { customRender: 'status' }
+        },
         {
           title: '最高库存',
           checked: true,
-          width: '150px',
+          width: '100px',
           dataIndex: 'maxStock'
         },
         {
           title: '最低库存',
           checked: true,
-          width: '150px',
+          width: '100px',
           dataIndex: 'minStock'
         },
         {