xiongchao il y a 3 ans
Parent
commit
6bbdfb6fb0

+ 92 - 34
src/views/check/checkjob/CheckJob.vue

@@ -4,17 +4,17 @@
       <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.planName" placeholder="请输入计划名称"/>
               </a-form-item>
             </a-col>
-            <a-col :md="8" :sm="24">
+            <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="8" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="任务状态">
                 <a-select
                   v-model="queryParam.status"
@@ -28,9 +28,27 @@
                 </a-select>
               </a-form-item>
             </a-col>
-            <a-col :md="8 || 24" :sm="24">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="起始日期">
+                <a-date-picker
+                  v-model="queryParam.searchStartTime"
+                  style="width: 100%"
+                  :format="BaseTool.Date.PICKER_NORM_DATETIME_PATTERN"
+                />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="结束日期">
+                <a-date-picker
+                  v-model="queryParam.searchEndTime"
+                  style="width: 100%"
+                  :format="BaseTool.Date.PICKER_NORM_DATETIME_PATTERN"
+                />
+              </a-form-item>
+            </a-col>
+            <a-col :md="24" :sm="24">
               <span class="table-page-search-submitButtons">
-                <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+                <a-button type="primary" @click="handleOk">查询</a-button>
                 <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
               </span>
             </a-col>
@@ -38,10 +56,11 @@
         </a-form>
       </div>
 
-      <!-- <div class="table-operator">
-             <a-button v-if="$auth('check-jobs-add')" type="primary" icon="plus" @click="$refs.baseModal.base()">新增</a-button>
+      <div class="table-operator">
+        <a-button v-if="$auth('check-polling-jobs-add')" type="primary" icon="plus" @click="$refs.baseModal.base()">新增</a-button>
         <a-button style="margin-left: 8px" v-if="($auth('check-spot-jobs-export') || $auth('check-polling-jobs-export'))" type="primary" icon="download" @click="doExport">导出</a-button>
-        <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && ($auth('check-spot-jobs-finish') || $auth('check-polling-jobs-finish'))">
+        <a-button style="margin-left: 8px" v-if="($auth('check-spot-jobs-export') || $auth('check-polling-jobs-export'))" type="success" @click="handleSeven">近七日</a-button>
+        <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && ($auth('check-spot-jobs-edit') || $auth('check-polling-jobs-edit'))">
           <a-menu slot="overlay">
             <a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
               <a-menu-item key="1"><a-icon type="delete" /><a>删除</a></a-menu-item>
@@ -51,8 +70,7 @@
             批量操作 <a-icon type="down" />
           </a-button>
         </a-dropdown>
-      </div>-->
-
+      </div>
       <s-table
         ref="table"
         size="default"
@@ -67,13 +85,13 @@
           <template>
             <a @click="handleView(record)">查看</a>
             <template v-if="record.status === DictCache.VALUE.CHECK_JOB_STATUS.NOT_EXECUTE">
-              <a-divider  type="vertical" />
-              <a  @click="handleFinish(record)">完成</a>
+              <a-divider type="vertical" />
+              <a @click="handleFinish(record)">完成</a>
             </template>
             <template v-if="record.status != DictCache.VALUE.CHECK_JOB_STATUS.NOT_EXECUTE">
-               <a-divider  type="vertical" />
-               <a  @click="handleEdit(record)">修改</a>
-             </template>
+              <a-divider type="vertical" />
+              <a @click="handleEdit(record)">修改</a>
+            </template>
             <!--          <a-divider type="vertical" />-->
             <!--          <a-popconfirm v-if="$auth('check-jobs-del')" title="是否要删除该条数据?" @confirm="batchDelete(record.id)">-->
             <!--            <a>删除</a>-->
@@ -93,7 +111,7 @@
       </s-table>
     </div>
     <base-form :check-type="checkType" ref="baseModal" @ok="handleOk"/>
-    <detail :check-type="checkType" ref="detailModal"  @ok="handleOk"/>
+    <detail :check-type="checkType" ref="detailModal" @ok="handleOk"/>
   </a-card>
 </template>
 
@@ -102,6 +120,7 @@ import { STable, Ellipsis } from '@/components'
 import BaseForm from './modules/BaseForm'
 import Detail from './modules/Detail'
 import { queryNum, getCheckJobPage, deleteCheckJobs, fetchCheckJob, exportCheckJob, executeJob } from '@/api/check/checkjob'
+import BaseTool from '@/utils/tool'
 
 export default {
   name: 'CheckJobList',
@@ -131,6 +150,8 @@ export default {
       // 查询参数
       queryParam: {
         type: this.checkType,
+        searchStartTime: null,
+        searchEndTime: null,
         filter: this.filter
       },
       // 表头
@@ -148,42 +169,42 @@ export default {
           dataIndex: 'sbName',
           checked: true
         },
-        //{
-         // title: '计划单号',
-         // dataIndex: 'planNo',
-         // checked: true
-        //},
+        // {
+        // title: '计划单号',
+        // dataIndex: 'planNo',
+        // checked: true
+        // },
         {
           title: '任务名称',
           dataIndex: 'name',
           checked: true
         },
-/*        {
+        /*        {
           title: '计划名称',
           dataIndex: 'planName',
           checked: true
-        },*/
+        }, */
         {
           title: '负责人',
           dataIndex: 'checkUserName',
           checked: true
         },
 
-        //{
-         // title: '负责部件',
-         // dataIndex: 'partName',
-         // checked: true
-        //},
+        // {
+        // title: '负责部件',
+        // dataIndex: 'partName',
+        // checked: true
+        // },
         {
           title: '执行日期',
           dataIndex: 'startTime',
           checked: true
         },
-/*        {
+        /*        {
           title: '截至日期',
           dataIndex: 'endTime',
           checked: true
-        },*/
+        }, */
         {
           title: '标准工时',
           dataIndex: 'standardHours'
@@ -212,7 +233,7 @@ export default {
         //  checked: true,
         //  scopedSlots: { customRender: 'stopFlag' }
         // },
-        {
+     /*   {
           title: '创建人名称',
           dataIndex: 'createdUserName'
         },
@@ -220,7 +241,7 @@ export default {
           title: '创建时间',
           dataIndex: 'createdTime',
           checked: true
-        },
+        },*/
         {
           title: '操作',
           key: 'action',
@@ -239,7 +260,7 @@ export default {
           ...parameter,
           ...this.queryParam,
           dataScope: {
-            sortBy: 'desc',
+            sortBy: 'asc',
             sortName: 'start_time'
           }
         }
@@ -336,6 +357,8 @@ export default {
     },
     handleOk () {
       this.visible = true
+      this.queryParam.searchStartTime = this.queryParam.searchStartTime ? this.queryParam.searchStartTime.format(this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN) : null
+      this.queryParam.searchEndTime = this.queryParam.searchEndTime ? this.queryParam.searchEndTime.format(this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN) : null
       this.$refs.table.refresh()
     },
     onSelectChange (selectedRowKeys, selectedRows) {
@@ -347,9 +370,44 @@ export default {
       }
       this.$refs.table.refresh(true)
     },
+    handleSeven () {
+      this.queryParam.searchStartTime = this.BaseTool.Date.formatter(this.getBeforeDate(0), this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)
+      this.queryParam.searchEndTime = this.BaseTool.Date.formatter(this.getBeforeDate(-7), this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)
+      console.log(this.queryParam.searchStartTime)
+      console.log(this.queryParam.searchEndTime)
+      this.$refs.table.refresh()
+    },
+    getBeforeDate (num, time) {
+      const n = num
+      let d = ''
+      if (time) {
+        d = new Date(time)
+      } else {
+        d = new Date()
+      }
+      let year = d.getFullYear()
+      let mon = d.getMonth() + 1
+      let day = d.getDate()
+      if (day <= n) {
+        if (mon > 1) {
+          mon = mon - 1
+        } else {
+          year = year - 1
+          mon = 12
+        }
+      }
+      d.setDate(d.getDate() - n)
+      year = d.getFullYear()
+      mon = d.getMonth() + 1
+      day = d.getDate()
+      const s = year + '-' + (mon < 10 ? ('0' + mon) : mon) + '-' + (day < 10 ? ('0' + day) : day)
+      return s
+    },
     doExport () {
       const parameter = {
-        ...this.queryParam
+        ...this.queryParam,
+        searchStartTime: this.queryParam.searchStartTime ? this.queryParam.searchStartTime.format(this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN) : null,
+        searchEndTime: this.queryParam.searchEndTime ? this.queryParam.searchEndTime.format(this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN) : null
       }
       exportCheckJob(parameter).then(file => {
         this.BaseTool.UPLOAD.downLoadExportExcel(file)

+ 16 - 2
src/views/check/checkjob/CheckJobCalendar.vue

@@ -86,7 +86,22 @@ export default {
     // 下拉框map
     this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_JOB_STATUS)
     this.sbStatusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
-    this.tableOption()
+    // this.tableOption()
+    queryCheckJob(this.queryParam)
+      .then(res => {
+        this.data = res.data
+        for (var i = 0; i < this.data.length; i++) {
+          if (this.data[i].status === 1) {
+            this.data[i].status = 'warning'
+          } else if (this.data[i].status === 2) {
+            this.data[i].status = 'processing'
+          } else if (this.data[i].status === 3) {
+            this.data[i].status = 'success'
+          } else {
+            this.data[i].status = 'error'
+          }
+        }
+      })
   },
   methods: {
     onSelect (value) {
@@ -95,7 +110,6 @@ export default {
       this.value = value
       this.selectedValue = value
       // this.queryParam.searchDay = BaseTool.Date.formatter(value, BaseTool.Date.PICKER_NORM_DATE_PATTERN)
-
     },
     onPanelChange (value) {
       this.panelChange = true

+ 12 - 12
src/views/check/checkjob/modules/BaseForm.vue

@@ -12,7 +12,7 @@
       <a-form-item v-show="false">
         <a-input v-decorator="['id']" type="hidden"/>
       </a-form-item>
-      <a-form-item label="计划id" v-show="false">
+<!--      <a-form-item label="计划id" v-show="false">
         <a-input
           v-decorator="['planId', {rules: [{required: true, message: '计划id不能为空'}]}]"/>
       </a-form-item>
@@ -23,12 +23,12 @@
       <a-form-item label="部件id" v-show="false">
         <a-input
           v-decorator="['partId', {rules: [{required: false, message: '部件id不能为空'}]}]"/>
-      </a-form-item>
+      </a-form-item>-->
       <a-form-item label="标准id" v-show="false">
         <a-input
           v-decorator="['standardId', {rules: [{required: true, message: '标准id不能为空'}]}]"/>
       </a-form-item>
-      <a-form-item label="负责人id" v-show="false">
+      <!-- <a-form-item label="负责人id" v-show="false">
         <a-input
           v-decorator="['checkUserId', {rules: [{required: false, message: '计划id不能为空'}]}]"/>
       </a-form-item>
@@ -143,7 +143,7 @@
               v-decorator="['actualEndTime']"/>
           </a-form-item>
         </row-item>
-        <!--<row-item>
+        <row-item>
           <a-form-item
             label="是否停机"
             :labelCol="BaseTool.Constant.labelCol"
@@ -160,7 +160,7 @@
               </a-select-option>
             </a-select>
           </a-form-item>
-        </row-item>-->
+        </row-item>
         <row-item>
           <a-form-item
             label="任务状态"
@@ -180,7 +180,7 @@
             </a-select>
           </a-form-item>
         </row-item>
-      </row-list>
+      </row-list>-->
       <row-list :col="1">
         <!--<row-item>
           <a-form-item
@@ -193,7 +193,7 @@
               :rows="4"
               v-decorator="['requirement']"/>
           </a-form-item>
-        </row-item>-->
+        </row-item>
         <row-item>
           <a-form-item
             label="备注"
@@ -205,7 +205,7 @@
               :rows="4"
               v-decorator="['remark']"/>
           </a-form-item>
-        </row-item>
+        </row-item>-->
         <row-item>
           <a-form-item
             label="检查结果"
@@ -276,9 +276,10 @@ export default {
       this.$nextTick(() => {
         setFieldsValue(Object.assign(pick(record, [
           'id',
-          'name',
-          'planId',
           'standardId',
+          'feedback'
+          /* 'name',
+          'planId',
           'planNo',
           'planName',
           'sbId',
@@ -292,8 +293,7 @@ export default {
           'status',
           'sbStatus',
           'requirement',
-          'feedback',
-          'remark'
+          'remark' */
         ])))
         if (record.actualStartTime.isValid()) {
           setFieldsValue(Object.assign(pick(record, [

+ 48 - 16
src/views/check/checkjob/modules/Detail.vue

@@ -26,22 +26,6 @@
       <detail-list-item term="要求">{{ modelStandard.requirement }}</detail-list-item>
       <detail-list-item term="备注">{{ modelStandard.remark }}</detail-list-item>
     </detail-list>
-    <title-divider title="标准图片" width="90px"></title-divider>
-    <detail-list title="" :col="6">
-      <detail-list-item v-for="item in modelStandard.checkImgList" term="">
-        <img :src="BaseTool.Constant.FILE_URL + item.url" width="200px" height="200px"/>
-      </detail-list-item>
-    </detail-list>
-    <title-divider title="标准文件" width="90px"></title-divider>
-    <detail-list title="" :col="8">
-      <detail-list-item term="">
-        <a-upload
-          :multiple="true"
-          :fileList="BaseTool.UPLOAD.transImg(modelStandard.checkFileList)"
-        >
-        </a-upload>
-      </detail-list-item>
-    </detail-list>
     <title-divider title="任务信息" width="90px"></title-divider>
     <detail-list title="" :col="3">
       <detail-list-item term="实际工时">{{ model.realHours }}</detail-list-item>
@@ -55,6 +39,27 @@
     <detail-list title="" :col="1">
       <detail-list-item term="检查结果">{{ model.feedback }}</detail-list-item>
     </detail-list>
+    <title-divider title="标准图片" width="90px"></title-divider>
+    <detail-list title="" :col="1">
+      <detail-list-item term="" v-if="modelStandard.checkImgList != null && modelStandard.checkImgList.length > 0">
+        <viewer :images="modelStandard.checkImgList" @inited="inited" ref="viewer" :index="1" >
+          <img v-for="item in modelStandard.checkImgList" :src="item.url" :key="item.id" class="image">
+        </viewer>
+      </detail-list-item>
+      <detail-list-item term="" v-if="modelStandard.checkImgList == null || modelStandard.checkImgList.length === 0">
+        暂无
+      </detail-list-item>
+    </detail-list>
+    <title-divider title="标准文件" width="90px"></title-divider>
+    <detail-list title="" :col="8">
+      <detail-list-item term="">
+        <a-upload
+          :multiple="true"
+          :fileList="BaseTool.UPLOAD.transImg(modelStandard.checkFileList)"
+        >
+        </a-upload>
+      </detail-list-item>
+    </detail-list>
     <base-form :check-type="checkType" ref="baseModal" @ok="handleOk"/>
   </a-card>
 </template>
@@ -154,7 +159,34 @@ export default {
       fetchCheckJob({ id: this.model.id }).then(res => {
         this.model = res.data
       })
+    },
+    inited (viewer) {
+      this.$viewer = viewer
     }
   }
 }
 </script>
+<style scoped>
+/* For demo */
+.ant-carousel {
+  width: 300px;
+  height: 300px;
+}
+.ant-carousel >>> .slick-slide {
+  text-align: center;
+  height: 300px;
+  line-height: 300px;
+  overflow: hidden;
+}
+
+.ant-carousel >>> .slick-slide h3 {
+  color: #fff;
+}
+
+.image {
+  width: calc(20% - 10px);
+  cursor: pointer;
+  margin: 5px;
+  display: inline-block;
+}
+</style>

+ 252 - 0
src/views/check/checkjob/modules/DetailSbCheckJob.vue

@@ -0,0 +1,252 @@
+<template>
+  <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" @click="handleCancel()">返回</a-button>
+        </span>
+      </a-col>
+    </a-row>
+    <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.zbh }}</detail-list-item>
+      <detail-list-item term="型号">{{ model.model }}</detail-list-item>
+      <detail-list-item term="设备名称">{{ model.name }}</detail-list-item>
+    </detail-list>
+    <title-divider title="保养信息" width="90px"></title-divider>
+    <div class="table-operator" style="margin-bottom:8px;">
+      <a-button type="primary" @click="handleAdd">
+        <a-icon type="plus"/>
+        添加
+      </a-button>
+      <!--      <a-button style="margin-left: 8px" type="primary" icon="download" @click="doExport">导出</a-button>-->
+    </div>
+    <a-table
+      :data-source="data"
+      :columns="columns"
+      tableLayout="auto"
+      :scroll="{x: 1000 }"
+      rowKey="id">
+      <span slot="action" slot-scope="record">
+        <template>
+          <a v-if="$auth('sb-infos-edit')" @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="handleGenerate(record)">插入任务</a>
+        </template>
+      </span>
+      <span slot="status" slot-scope="text">
+        <badge
+          :status="DictCache.COLOR.JOB_STATUS[text]"
+          :text="statusMap[text]" />
+      </span>
+    </a-table>
+    <base-form ref="baseModal" :check-type="checkType" @ok="handleOk"/>
+    <detail ref="detailModal"/>
+
+  </div>
+</template>
+
+<script>
+import DetailList from '@/components/tools/DetailList'
+import { queryCheckJob, deleteCheckJobs, fetchCheckJob, exportCheckJob, executeJob } from '@/api/check/checkjob'
+import BaseForm from './BaseForm'
+import Detail from './Detail'
+import SbInfoSelectModal from '@/views/sb/info/modules/SbInfoSelectModal'
+const DetailListItem = DetailList.Item
+
+export default {
+  name: 'DetailSbCheck',
+  components: {
+    DetailList,
+    DetailListItem,
+    BaseForm,
+    Detail,
+    SbInfoSelectModal
+  },
+  props: {
+    /**
+     * 检查类型: 1-点检 2-巡检
+     */
+    checkType: {
+      type: Number,
+      default: 2
+    }
+  },
+  data () {
+    return {
+      confirmLoading: false,
+      mdl: {},
+      model: {
+        'id': null,
+        'modelId': null,
+        'no': null,
+        'zbh': null,
+        'name': null,
+        'nameModel': null,
+        'unit': null,
+        'level': null,
+        'useType': null
+      },
+      modalTitle: null,
+      visible: false,
+      typeMap: {},
+      statusMap: {},
+      actionTypeMap: {},
+      // 表头
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'index',
+          customRender: (text, record, index) => {
+            return index + 1
+          }
+        },
+        {
+          title: '任务名称',
+          dataIndex: 'name',
+          checked: true,
+          width: '300px'
+        },
+        {
+          title: '负责人',
+          dataIndex: 'checkUserName',
+          checked: true,
+          width: '100px'
+        },
+        {
+          title: '设备',
+          dataIndex: 'sbName',
+          checked: true,
+          width: '100px'
+        },
+        {
+          title: '部位',
+          dataIndex: 'partName',
+          checked: true,
+          width: '100px'
+        },
+        {
+          title: '执行日期',
+          dataIndex: 'startTime',
+          checked: true,
+          width: '200px'
+        },
+        {
+          title: '截至日期',
+          dataIndex: 'endTime',
+          checked: true,
+          width: '200px'
+        },
+        {
+          title: '开始时间',
+          dataIndex: 'actualStartTime',
+          width: '200px'
+        },
+        {
+          title: '完成时间',
+          dataIndex: 'actualEndTime',
+          width: '200px'
+        },
+        {
+          title: '任务状态',
+          dataIndex: 'status',
+          checked: true,
+          scopedSlots: { customRender: 'status' }
+        },
+        {
+          title: '操作',
+          key: 'action',
+          width: '200px',
+          align: 'center',
+          scopedSlots: { customRender: 'action' },
+          checked: true
+        }
+      ],
+      data: []
+    }
+  },
+  created () {
+    // 下拉框map
+    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_STANDARD_TYPE)
+    this.periodTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_PLAN_PERIOD_TYPE)
+    this.actionTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_PLAN_ACTION_TYPE)
+    this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_JOB_STATUS)
+  },
+  methods: {
+    base (record) {
+      this.visible = true
+      this.model = record
+      this.modalTitle = '详情2'
+      queryCheckJob({ sbId: record.id, type: this.checkType }).then(res => {
+        this.data = res.data
+      })
+    },
+    handleOk () {
+      queryCheckJob({ sbId: this.model.id, type: this.checkType }).then(res => {
+        this.data = res.data
+      })
+    },
+    handleAdd () {
+      const modal = this.$refs.baseModal
+      modal.base(null, this.model.id)
+    },
+    handleView (record) {
+      fetchCheckJob({ id: record.id }).then(res => {
+        const modal = this.$refs.detailModal
+        res.data.partName = record.partName
+        modal.base(res.data)
+      })
+    },
+    handleEdit (record) {
+      fetchCheckJob({ id: record.id }).then(res => {
+        const modal = this.$refs.baseModal
+        modal.base(res.data)
+      })
+    },
+    handleGenerate (record) {
+      const modal = this.$refs.baseModalInsert
+      modal.base(null, record.id)
+    },
+    handleCancel () {
+      this.visible = false
+      this.confirmLoading = false
+      this.$emit('ok')
+    },
+    batchDelete (id) {
+      let ids = []
+      if (this.BaseTool.String.isBlank(id)) {
+        if (length === 0) {
+          this.$message.info('请选择要删除的记录')
+          return
+        }
+        ids = this.selectedRows.map(item => item.id)
+      } else {
+        ids = [id]
+      }
+      deleteCheckJobs(ids).then(res => {
+        this.$message.info('删除成功')
+        this.handleOk()
+      })
+    },
+    doExport () {
+      const parameter = {
+        ...this.queryParam
+      }
+      parameter.modelId = this.model.id
+      exportCheckJob(parameter).then(file => {
+        this.BaseTool.UPLOAD.downLoadExportExcel(file)
+      })
+    },
+    handleSbSelect () {
+      this.$refs.sbInfoSelectModal.base()
+    }
+  }
+}
+</script>

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

@@ -207,7 +207,7 @@
           >
             <a-upload
               :action="uploadUrl"
-              :multiple="false"
+              :multiple="true"
               list-type="picture"
               accept="image/*"
               :file-list="this.defaultCheckImgList"

+ 7 - 6
src/views/check/checkstandard/modules/DetailSbCheck.vue

@@ -15,7 +15,7 @@
       <detail-list-item term="设备名称">{{ model.name }}</detail-list-item>
     </detail-list>
     <title-divider title="保养信息" width="90px"></title-divider>
-    <div class="table-operator">
+    <div class="table-operator" style="margin-bottom:8px;">
       <a-button type="primary" @click="handleAdd">
         <a-icon type="plus"/>
         添加
@@ -120,11 +120,8 @@ export default {
         },
         {
           title: '名称',
-          dataIndex: 'name'
-        },
-        {
-          title: '检查部位',
-          dataIndex: 'partName'
+          dataIndex: 'name',
+          width: '300px'
         },
         {
           title: '周期',
@@ -133,6 +130,10 @@ export default {
             return record.period + this.BaseTool.Table.getMapText(this.periodTypeMap, text)
           }
         },
+        {
+          title: '检查部位',
+          dataIndex: 'partName'
+        },
    /*     {
           title: '动作类型',
           dataIndex: 'actionType',

+ 2 - 2
src/views/report/instoredetail/InStoreDetail.vue

@@ -163,8 +163,6 @@ export default {
         parameter = {
           ...parameter,
           ...this.queryParam,
-          searchStartTime: this.queryParam.searchStartTime ? this.queryParam.searchStartTime.format(this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN) : null,
-          searchEndTime: this.queryParam.searchEndTime ? this.queryParam.searchEndTime.format(this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN) : null,
           dataScope: {
             sortBy: 'desc',
             sortName: 'created_time'
@@ -256,6 +254,8 @@ export default {
       })
     },
     handleOk () {
+      this.queryParam.searchStartTime = this.queryParam.searchStartTime ? this.queryParam.searchStartTime.format(this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN) : null
+      this.queryParam.searchEndTime = this.queryParam.searchEndTime ? this.queryParam.searchEndTime.format(this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN) : null
       this.$refs.table.refresh()
     },
     onSelectChange (selectedRowKeys, selectedRows) {

+ 10 - 1
src/views/sb/info/modules/Detail.vue

@@ -16,7 +16,8 @@
             <!--            <a-badge :count="numNumCheckjob" title="待保养任务总数" :number-style="{ backgroundColor: '#52c41a' }">
               <a-button style="margin-left: 16px" type="default" @ok="handleOk" @click="checkJobTableWaitDoListView()">待保养任务</a-button>
             </a-badge>-->
-            <a-button style="margin-left: 8px" type="primary" @click="handleMeasure()">检定记录</a-button>
+            <a-button style="margin-left: 8px" type="default" @click="handleViewCheckJob()">保养记录</a-button>
+            <a-button v-show="model.useType==4" style="margin-left: 8px" type="default" @click="handleMeasure()">检定记录</a-button>
             <a-button style="margin-left: 8px" type="primary" @click="handleCancel()">返回</a-button>
           </span>
         </a-col>
@@ -129,6 +130,7 @@
     </div>
     <detail-sb-bom ref="detailSbBomModal" @ok="handleOk"/>
     <detail-sb-check ref="detailSbCheckModal" @ok="handleOk"/>
+    <detail-sb-check-job ref="detailSbCheckJobModal" @ok="handleOk"/>
     <detail-sb-measure ref="detailSbMeasureModal" @ok="handleOk"/>
     <part-info-list ref="partInfoList" />
     <!--    <check-job-table-wait-do :type="2" :check-type="2" ref="checkJobTableWaitDo" @ok="handleOk"/>-->
@@ -151,6 +153,7 @@ 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'
 import DetailSbCheck from '@/views/check/checkstandard/modules/DetailSbCheck'
+import DetailSbCheckJob from '@/views/check/checkjob/modules/DetailSbCheckJob'
 import DetailSbMeasure from '@/views/sb/measurelog/modules/DetailSbCheck'
 import PartInfoList from '@/views/part/info/modules/PartInfoList'
 const DetailListItem = DetailList.Item
@@ -168,6 +171,7 @@ export default {
     SbInspectionFillPageTable,
     DetailSbBom,
     DetailSbCheck,
+    DetailSbCheckJob,
     PartInfoList,
     DetailSbMeasure
   },
@@ -309,6 +313,11 @@ export default {
       const modal = this.$refs.detailSbCheckModal
       modal.base(this.model)
     },
+    handleViewCheckJob (record) {
+      this.visible = false
+      const modal = this.$refs.detailSbCheckJobModal
+      modal.base(this.model)
+    },
     handleMeasure (record) {
       this.visible = false
       const modal = this.$refs.detailSbMeasureModal