瀏覽代碼

维修完善

guarantee-lsq 2 年之前
父節點
當前提交
d80c0ec001

+ 2 - 2
src/views/repair/application-form/RepairForm.vue

@@ -109,7 +109,7 @@
             <operation-button
               v-show="dispatchFlag"
               v-if="( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === record.status ||
-               DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REPAIR_FAIL === record.status) && $auth('repair-application-forms-dispatch')"
+              DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REPAIR_FAIL === record.status) && $auth('repair-application-forms-dispatch')"
               @click="handleAssign(record)" >派工</operation-button>
             <operation-button
               v-show="allocatedFlag"
@@ -308,7 +308,7 @@ export default {
           checked: true,
           fixed: 'right',
           key: 'action',
-          width: '150px',
+          width: '250px',
           align: 'center',
           scopedSlots: { customRender: 'action' }
         }

+ 23 - 5
src/views/repair/application-form/modules/AssignForm.vue

@@ -7,7 +7,19 @@
     @cancel="handleCancel"
   >
     <a-form :form="form">
-      <row-list :col="2">
+      <row-list :col="1">
+        <row-item v-show='transferFlag'>
+          <a-form-item
+            label="二次派工原因"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-textarea
+              :rows="2"
+              disabled='disabled'
+              :value='remarkTwo'/>
+          </a-form-item>
+        </row-item>
         <row-item>
           <a-form-item
             label="维修负责人"
@@ -28,9 +40,9 @@
       <row-list :col="1">
         <row-item>
           <a-form-item
-            label="备注"
-            :labelCol="BaseTool.Constant.labelCol2"
-            :wrapperCol="BaseTool.Constant.wrapperCol2"
+            label="维修建议"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
           >
             <a-textarea
               :rows="4"
@@ -48,7 +60,6 @@
 <script>
 import { dispatchModelByDTO } from '@/api/repair/application-form'
 import { queryUserDept } from '@/api/upms/user-dept'
-import { queryUser } from '@/api/upms/user'
 
 export default {
   name: 'DispatchBaseForm',
@@ -58,6 +69,8 @@ export default {
       modalTitle: null,
       form: this.$form.createForm(this),
       visible: false,
+      transferFlag: false,
+      remarkTwo: null,
       // 下拉框map
       record: {},
       deptUserList: []
@@ -74,6 +87,11 @@ export default {
       // 如果是空标识添加
       this.modalTitle = '派工'
       this.record = record
+      this.remarkTwo = record.remarkTwo
+      this.transferFlag = false
+      if (record.remarkTwo != null && record.remarkTwo !== '') {
+        this.transferFlag = true
+      }
       this.getDeptUsers(record.repairDeptId)
     },
     getDeptUsers (deptId) {

+ 17 - 28
src/views/repair/application-form/modules/BaseForm.vue

@@ -94,33 +94,6 @@
               v-decorator="['limitHours']" />
           </a-form-item>
         </row-item>
-<!--        <row-item>
-          <a-form-item
-            label="报修单号"
-            :labelCol="BaseTool.Constant.labelCol"
-            :wrapperCol="BaseTool.Constant.wrapperCol"
-          >
-            <a-input
-              disabled
-              v-decorator="['no', {rules: [{required: false, message: '报修单号不能为空'}]}]" />
-          </a-form-item>
-        </row-item>-->
-<!--        <row-item>
-          <a-form-item
-            label="报修来源"
-            :labelCol="BaseTool.Constant.labelCol"
-            :wrapperCol="BaseTool.Constant.wrapperCol"
-          >
-            <a-select v-decorator="['source', {initialValue: DictCache.VALUE.REPAIR_APPLICATION_FORM_SOURCE.SCENE,rules: [{required: true, message: '报修来源不能为空'}]}]" placeholder="请选择">
-              <a-select-option
-                v-for="(label,value) in sourceMap"
-                :key="value"
-                :label="label"
-                :value="parseInt(value)">{{ label }}
-              </a-select-option>
-            </a-select>
-          </a-form-item>
-        </row-item>-->
         <row-item>
           <a-form-item
             label="报修人"
@@ -201,6 +174,17 @@
             </a-upload>
           </a-form-item>
         </row-item>
+        <row-item v-show='refusedFlag'>
+          <a-form-item
+            label="驳回原因"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              disabled='disabled'
+              v-decorator="['remark']"/>
+          </a-form-item>
+        </row-item>
       </row-list>
 
       <row-list :col="1">
@@ -298,6 +282,7 @@ export default {
       checkFileList: [], // 审核图片
       repairFileList: [], // 维修图片,
       repairDeptMap: {},
+      refusedFlag: false,
       headers: {
         Authorization: 'Bearer ' + Vue.ls.get(ACCESS_TOKEN)
       }
@@ -323,6 +308,7 @@ export default {
   methods: {
     base (record) {
       this.visible = true
+      this.refusedFlag = false
       fetchErrorTypeTree().then(res => {
         this.treeData = res.data
       })
@@ -341,7 +327,7 @@ export default {
         return
       }
       if (this.BaseTool.Object.isBlank(record.id)) {
-        this.modalTitle = '添加'
+        this.modalTitle = '报修'
         if (!this.BaseTool.Object.isBlank(record.sbId)) {
           const { form: { setFieldsValue } } = this
           this.$nextTick(() => {
@@ -361,6 +347,9 @@ export default {
       this.defaultApplicationFileList = this.BaseTool.UPLOAD.transImg(this.applicationFileList)
       this.defaultRepairFileList = this.BaseTool.UPLOAD.transImg(this.repairFileList)
       this.defaultCheckFileList = this.BaseTool.UPLOAD.transImg(this.checkFileList)
+      if (record.status === this.DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REFUSED_REPAIR) {
+        this.refusedFlag = true
+      }
       const { form: { setFieldsValue } } = this
       // 日期处理
       record.applyTime = this.BaseTool.Moment(record.applyTime, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)

+ 11 - 5
src/views/repair/application-form/modules/CheckForm.vue

@@ -16,13 +16,13 @@
       <row-list :col="1">
         <row-item>
           <a-form-item
-            label="备注"
+            label="审核意见"
             :labelCol="BaseTool.Constant.labelCol2"
             :wrapperCol="BaseTool.Constant.wrapperCol2"
           >
             <a-textarea
               :rows="4"
-              v-decorator="['remark', {rules: [{required: true, message: '原因不能为空'}]}]"/>
+              v-decorator="['remark', {rules: [{required: true, message: '审核意见不能为空'}]}]"/>
           </a-form-item>
         </row-item>
         <row-item>
@@ -89,6 +89,8 @@ export default {
     base (record, type) {
       this.visible = true
       this.model = record
+      this.verifyImages = []
+      this.defaultVerifyImages = []
       this.model.type = type
       const { form: { setFieldsValue } } = this
       // 日期处理
@@ -129,11 +131,15 @@ export default {
           return
         }
         values.verifyImages = this.verifyImages
+        const self = this
         // 日期处理
         if (this.model.type === 1) {
           returnRepair(values)
             .then(() => {
-              this.handleCancel(values)
+              this.$message.info('已驳回维修,2s后返回【报修审核】')
+              setTimeout(() => {
+                self.$router.push({ path: '/repair/caller/check' })
+              }, 2000)
             }).catch(() => {
               this.confirmLoading = false
             })
@@ -141,8 +147,8 @@ export default {
           examine(values).then(() => {
             this.$message.info('已提交,请等待审核')
             setTimeout(() => {
-              this.handleCancel(values)
-            }, 2000)
+              self.$router.push({ path: '/repair/manager/check' })
+            }, 1000)
           }).catch(() => {
             this.confirmLoading = false
           })

+ 28 - 78
src/views/repair/application-form/modules/DetailRepair.vue

@@ -16,7 +16,7 @@
             <a-col :span="6">
               <div class="gutter-btn gutter-color" :class="{'act':current===0}" @click="current=0">
                 <my-icon type="icon-weixiu1" />
-                <div style="font-size:25px">报修详情</div>
+                <div style="font-size:25px">报修数据</div>
               </div>
             </a-col>
             <a-col :span="6" >
@@ -70,7 +70,7 @@
       </a-row>
       <div>
         <div class="main gutter-color" v-show="current == 0">
-          <div class="title">报修详情</div>
+          <div class="title">报修数据</div>
           <div>
             <a-descriptions :column="3" bordered>
               <a-descriptions-item label="报修单号">{{ model.no }}</a-descriptions-item>
@@ -79,16 +79,11 @@
               <a-descriptions-item label="送修部门">{{ model.limitHours }}</a-descriptions-item>
               <a-descriptions-item label="使用位置">{{ model.sbCph }}</a-descriptions-item>
               <a-descriptions-item label="工单类别">{{ BaseTool.Object.getField(planFlagMap,model.category) }}</a-descriptions-item>
-              <!--            <a-descriptions-item label="是否停机">{{ BaseTool.Object.getField(needStopMap,model.needStop) }}</a-descriptions-item>-->
               <a-descriptions-item label="报修状态"><badge :text="BaseTool.Object.getField(statusMap,model.status)" :status="DictCache.COLOR.REPAIR_APPLICATION_FORM_STATUS[model.status]"/></a-descriptions-item>
-
-              <!--            <a-descriptions-item label="报修来源">{{ BaseTool.Object.getField(this.sourceMap, model.source) }}</a-descriptions-item>
-            <a-descriptions-item label="紧急等级"><badge :text="BaseTool.Object.getField(levelMap,model.level)" :status="DictCache.COLOR.REPAIR_APPLICATION_FORM_LEVEL[model.applicationLevel]"/></a-descriptions-item>-->
               <a-descriptions-item label="报修时间">{{ model.applyTime }}</a-descriptions-item>
               <a-descriptions-item label="报修人">{{ model.actualUser }}</a-descriptions-item>
               <a-descriptions-item label="要求时间">{{ model.limitHours }}小时</a-descriptions-item>
-              <a-descriptions-item label="维修主管">{{ model.checkUserName }}</a-descriptions-item>
-<!--              <a-descriptions-item label="报修人">{{ model.actualUser }}</a-descriptions-item>-->
+              <a-descriptions-item label="维修主管" >{{ model.checkUserName }}</a-descriptions-item>
               <a-descriptions-item label="故障描述" :span="3">{{ model.content }}</a-descriptions-item>
               <a-descriptions-item label="报修图片" :span="3">
                 <div v-if="model.applicationFileList != null && model.applicationFileList.length > 0">
@@ -110,26 +105,10 @@
           <div class="title">维修数据</div>
           <div>
             <a-descriptions :column="3" bordered>
-              <!--            <a-descriptions-item label="故障类别">{{ model.repairErrorTypeName }}</a-descriptions-item>-->
               <a-descriptions-item label="维修开始时间">{{ model.repairStartTime }}</a-descriptions-item>
               <a-descriptions-item label="维修结束时间">{{ model.repairEndTime }}</a-descriptions-item>
               <a-descriptions-item label="维修耗时">{{ model.repairMinutes }}小时</a-descriptions-item>
               <a-descriptions-item label="当前维修人">{{ model.repairUserName }}</a-descriptions-item>
-              <!--<a-descriptions-item label="维修次数">{{ model.repairTimes }}</a-descriptions-item>-->
-              <!--              <a-descriptions-item label="维修描述" :span="2">{{ model.repairContent }}</a-descriptions-item>
-              <a-descriptions-item label="报修图片" :span="3">
-                <div v-if="model.repairFileList != null && model.repairFileList.length > 0">
-                  <viewer :images="model.repairFileList" @inited="inited" ref="viewer" :index="1" >
-                    <img
-                      v-for="item in model.repairFileList"
-                      :src="item.url"
-                      :key="item.id"
-                      class="image"
-                      width="200px"
-                      style="margin:10px;">
-                  </viewer></div>
-                <div v-if="model.repairFileList == null || model.repairFileList.length === 0"> 暂无</div>
-              </a-descriptions-item>-->
             </a-descriptions>
           </div>
         </div>
@@ -146,26 +125,6 @@
               </template>
             </span>
           </a-table>
-<!--          <div class="title">审核详情</div>
-          <a-descriptions bordered>
-            <a-descriptions-item label="审核开始时间">{{ model.checkStartTime }}</a-descriptions-item>
-            <a-descriptions-item label="审核结束时间">{{ model.checkEndTime }}</a-descriptions-item>
-            <a-descriptions-item label="审核人员">{{ model.checkUserName }}</a-descriptions-item>
-            <a-descriptions-item label="审核描述" :span="3">{{ model.checkContent }}</a-descriptions-item>
-            <a-descriptions-item label="审核图片" :span="3">
-              <div v-if="model.checkFileList != null && model.checkFileList.length > 0">
-                <viewer :images="model.checkFileList" @inited="inited" ref="viewer" :index="1" >
-                  <img
-                    v-for="item in model.checkFileList"
-                    :src="item.url"
-                    :key="item.id"
-                    class="image"
-                    width="200px"
-                    style="margin:10px;">
-                </viewer></div>
-              <div v-if="model.checkFileList == null || model.checkFileList.length === 0"> 暂无</div>
-            </a-descriptions-item>
-          </a-descriptions >-->
         </div>
         <div class="main gutter-color" v-show="current == 3">
           <div class="title">维修记录</div>
@@ -187,7 +146,7 @@
         </div>
         <div class="main gutter-color" v-show="current == 4">
           <div class="title">备件清单</div>
-          <div style="margin:20px;" class="table-operator" v-if="$auth('repair-application-forms-finish')">
+          <div style="margin:20px;margin-left: 33%;" class="table-operator" v-if="$auth('repair-application-forms-finish')">
             <a-button type="primary" @click="handleSpareStoreSelect(1)">
               <a-icon type="plus"/>
               更换专用备件
@@ -212,9 +171,6 @@
             <span slot="actionSpare" slot-scope="record">
               <template>
                 <a v-if="$auth('repair-application-forms-finish') && record.isSpecial === 0" @click="handleEditSpare(record)">修改</a>
-                <!--                <a-popconfirm v-if="$auth('repair-application-forms-finish')" title="是否替换该备件?" @confirm="updateSpare(record)">
-                  <a>更换备件</a>
-                </a-popconfirm>-->
                 <a-divider type="vertical" />
                 <a-popconfirm v-if="$auth('repair-application-forms-finish')" title="是否要删除该条数据?" @confirm="batchDeleteSpare(record.id)">
                   <a>删除</a>
@@ -304,17 +260,9 @@
         </div>
       </div>
       <div class="btn">
-        <!--        <a-button v-if="$auth('repair-application-forms-finish')" style="margin-left: 16px" type="default" @ok="handleOk" @click="handleViewBom()">备件BOM</a-button>
-        <a-button v-if="$auth('repair-application-forms-finish')" style="margin-left: 16px" type="default" @ok="handleOk" @click="handleViewCheck()">维护项目</a-button>-->
         <a-button v-if="$auth('repair-application-forms-assign') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)" style="margin-left: 16px" type="default" @click="handleAssign">派工</a-button>
-        <!-- <a-popconfirm v-if="$auth('repair-application-forms-deal') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === model.status)" title="是否要接收?" @confirm="receive">
-        <a-button style="margin-left: 8px">接收</a-button>
-      </a-popconfirm> -->
-        <!--        <a-button v-if="$auth('repair-application-forms-out') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING >= model.status) && model.type != 2" style="margin-left: 8px" type="default" @click="handleOut">委外</a-button>
-        <a-button v-if="$auth('repair-application-forms-dispatch') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status" style="margin-left: 8px" type="default" @click="handleDispatch">转派</a-button>-->
         <a-button v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status" style="margin-left: 8px" type="default" @click="handleTransfer()">转派申请</a-button>
-        <a-button v-if="$auth('repair-application-forms-finish') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status" style="margin-left: 8px" type="default" @click="handleFinish()">完成</a-button>
-        <!--        <a-button v-if="$auth('repair-application-forms-edit')" style="margin-left: 8px" type="default" @click="handleEdit()">修改</a-button>-->
+        <a-button v-if="$auth('repair-application-forms-finish') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status" style="margin-left: 8px" type="default" @click="handleFinish()">完成维修</a-button>
         <a-popconfirm v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.WAIT_SUBMIT === model.status" title="是否要提交审核该条数据?" @confirm="handleExamine">
           <a-button style="margin-left: 8px" type="default">提交生产审核</a-button>
         </a-popconfirm>
@@ -329,7 +277,7 @@
     </div>
     <check-form ref="checkForm" @ok="handleOk" />
     <base-out-form ref="outForm" @ok="handleCancel" />
-    <finish-form ref="finishForm" @ok="handleCancel" />
+    <finish-form ref="finishForm" @ok="handleRepairRecordOk" />
     <dispatch-form ref="dispatchForm" @ok="handleCancel" />
     <assign-form ref="assignForm" @ok="handleCancel" />
     <spare-pick-base-form ref="baseModal" @ok="handleOk"/>
@@ -639,6 +587,12 @@ export default {
             return `${index + 1}`
           }
         },
+        {
+          title: '维修人',
+          dataIndex: 'createdUserName',
+          ellipsis: true,
+          width: '150px'
+        },
         {
           title: '维修时间',
           dataIndex: 'createdTime',
@@ -650,17 +604,23 @@ export default {
           width: '150px'
         },
         {
-          title: '维修人',
-          dataIndex: 'createdUserName',
+          title: '维修时长',
+          dataIndex: 'repairHours',
+          ellipsis: true,
+          width: '100px'
+        },
+        /* {
+          title: '维修建议',
+          dataIndex: 'opinion',
           ellipsis: true,
           width: '150px'
         },
         {
-          title: '维修意见',
+          title: '维修描述',
           dataIndex: 'dataRemark',
           ellipsis: true,
           width: '150px'
-        },
+        }, */
         {
           title: '操作',
           key: 'action',
@@ -679,7 +639,7 @@ export default {
           }
         },
         {
-          title: '维修意见',
+          title: '维修建议',
           dataIndex: 'opinion',
           width: '200px'
         },
@@ -777,7 +737,8 @@ export default {
         'updateUserName': null,
         'repairFormVO': null,
         'repairCheckVO': null,
-        'checkUserName': null
+        'checkUserName': null,
+        'remarkTwo': null
       }
     }
   },
@@ -822,9 +783,6 @@ export default {
       selectSparePartUsedListByRepairId({ id: this.model.id }).then(res => {
         this.dataSpare = res.data
       })
-      /* selectSparePartUsedListBySbId({ id: this.model.sbId }).then(res => {
-        this.dataSpare = res.data
-      }) */
       queryRepairFee({ repairId: this.model.id }).then(res => {
         this.dataFee = res.data
       })
@@ -835,9 +793,11 @@ export default {
         this.dataRecord = res.data.rows
       })
       queryRepairRecord({ objId: this.model.id, pageSize: 20, remark: 'repair_status_record' }).then(res => {
-        console.log(res)
         this.repairStatus = res.data.rows
       })
+      queryRepairRecord({ objId: this.model.id, remark: 'repair_verify_record' }).then(res => {
+        this.dataVerifyRecord = res.data.rows
+      })
       getRepairSchemePage({ repairId: this.model.id }).then(res => {
         this.dataRepairResolve = res.data.rows
       })
@@ -866,8 +826,6 @@ export default {
     receive () {
       this.model.status = this.DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING
       receive(this.model).then(() => {
-        // const modal = this.$refs.finishForm
-        // modal.base(that.model)
       })
     },
     batchDeleteFee (id) {
@@ -1047,13 +1005,6 @@ export default {
     handleExamine () {
       const modal = this.$refs.checkForm
       modal.base(this.model, 2)
-      /* examine({ id: this.model.id }).then(res => {
-        this.loading = false
-        this.visible = true
-        this.model.status = this.DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ACCEPTANCE
-        this.$message.info('已提交,请等待审核')
-      })
-      this.init() */
     },
     handleDispatch () {
       const modal = this.$refs.dispatchForm
@@ -1153,7 +1104,6 @@ export default {
       })
     },
     handleSpareStoreSelect (isSpecial) {
-      // this.$refs.spareStoreSelectModal.base({}, { storeId: this.storeId, isSpecial: isSpecial, sbId: this.model.sbId })
       this.$refs.spareStoreSelectModal.base({}, { repairFlag: 1, storeId: this.storeId, isSpecial: isSpecial, sbId: this.model.sbId })
     },
     handleSpareStoreSelected (record, keys, rows) {

+ 25 - 19
src/views/repair/application-form/modules/DetailRepairRecord.vue

@@ -7,23 +7,27 @@
               </span>
       </a-col>
     </a-row>
-    <detail-list title='' :col='2'>
-      <detail-list-item term='维修人'>{{ model.createdUserName }}</detail-list-item>
-      <detail-list-item term='维修时间'>{{ model.createdTime }}</detail-list-item>
-      <detail-list-item term='结束时间'>{{ model.updateTime }}</detail-list-item>
-      <detail-list-item term='维修意见'>{{ model.dataRemark }}</detail-list-item>
-    </detail-list>
-    <title-divider title="维修图片" width="90px"></title-divider>
-    <detail-list title="" :col="1">
-      <detail-list-item term="" v-if="model.imageList != null && model.imageList.length > 0">
-        <viewer :images="model.imageList" @inited="inited" ref="viewer" :index="1" >
-          <img v-for="item in model.imageList" :src="item.url" :key="item.id" class="image">
-        </viewer>
-      </detail-list-item>
-      <detail-list-item term="" v-if="model.imageList == null || model.imageList.length === 0">
-        暂无
-      </detail-list-item>
-    </detail-list>
+    <a-descriptions :column="3" bordered>
+      <a-descriptions-item label='维修人'>{{ model.createdUserName }}</a-descriptions-item>
+      <a-descriptions-item label='维修时间'>{{ model.createdTime }}</a-descriptions-item>
+      <a-descriptions-item label='结束时间'>{{ model.updateTime }}</a-descriptions-item>
+      <a-descriptions-item label='维修时长'>{{ model.repairHours }}</a-descriptions-item>
+      <a-descriptions-item label='主管建议' :span="2">{{ model.opinion }}</a-descriptions-item>
+      <a-descriptions-item label="维修描述" :span="3">{{ model.dataRemark }}</a-descriptions-item>
+      <a-descriptions-item label="维修图片" :span="3">
+        <div v-if="model.imageList != null && model.imageList.length > 0">
+          <viewer :images="model.imageList" @inited="inited" ref="viewer" :index="1" >
+            <img
+              v-for="item in model.imageList"
+              :src="item.url"
+              :key="item.id"
+              class="image"
+              width="200px"
+              style="margin:10px;">
+          </viewer></div>
+        <div v-if="model.imageList == null || model.imageList.length === 0"> 暂无</div>
+      </a-descriptions-item>
+    </a-descriptions>
   </a-card>
 </template>
 
@@ -50,7 +54,9 @@ export default {
         'imageList': null,
         'createdUserName': null,
         'createdTime': null,
-        'updateTime': null
+        'updateTime': null,
+        'opinion': null,
+        'repairHours': null
       }
     }
   },
@@ -60,7 +66,7 @@ export default {
   methods: {
     base (record) {
       this.visible = true
-      this.modalTitle = '记录详情'
+      this.modalTitle = '维修详情'
       this.model = record
     },
     handleCancel () {

+ 8 - 62
src/views/repair/application-form/modules/FinishForm.vue

@@ -43,65 +43,6 @@
             />
           </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="维修耗时"
-            :labelCol="BaseTool.Constant.labelCol"
-            :wrapperCol="BaseTool.Constant.wrapperCol"
-          >
-            <a-input
-              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>
@@ -110,7 +51,7 @@
             :labelCol="BaseTool.Constant.labelCol2"
             :wrapperCol="BaseTool.Constant.wrapperCol2"
           >
-            <a-textarea v-decorator="['repairContent']"/>
+            <a-textarea v-decorator="['remark']"/>
           </a-form-item>
         </row-item>
         <row-item>
@@ -264,9 +205,12 @@ export default {
         // 日期处理
         values.repairFileList = this.repairFileList
         values.repairEndTime = this.BaseTool.Date.formatter(values.repairEndTime, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)
+        const self = this
         finish(values).then(() => {
-          this.$message.info('维修完成,请完成后续维修报告,完成后提交审核;')
-          this.handleCancel(values)
+          this.$message.info('维修已提交,等待主管审核')
+          setTimeout(() => {
+            self.$router.push({ path: '/repair/form/mine' })
+          }, 1000)
         }).catch(() => {
           this.confirmLoading = false
         })
@@ -278,6 +222,8 @@ export default {
       this.form.resetFields()
       if (this.BaseTool.Object.isNotBlank(values)) {
         this.$emit('ok')
+      } else {
+        this.$emit('ok')
       }
     },
     handleSbSelect () {

+ 13 - 4
src/views/repair/application-form/modules/RepairRecordForm.vue

@@ -69,7 +69,16 @@
       <row-list :col="1">
         <row-item>
           <a-form-item
-            label="维修意见"
+            label="主管建议"
+            :labelCol="BaseTool.Constant.labelCol2"
+            :wrapperCol="BaseTool.Constant.wrapperCol2"
+          >
+            <a-textarea v-decorator="['opinion']"/>
+          </a-form-item>
+        </row-item>
+        <row-item>
+          <a-form-item
+            label="维修描述"
             :labelCol="BaseTool.Constant.labelCol2"
             :wrapperCol="BaseTool.Constant.wrapperCol2"
           >
@@ -106,7 +115,6 @@
 
 <script>
 import pick from 'lodash.pick'
-import { finish } from '@/api/repair/application-form'
 import { uploadUrl } from '@/api/upms/file'
 import { updateRepairRecord } from '@/api/customize/fieldTemplateData'
 import Vue from 'vue'
@@ -126,7 +134,7 @@ export default {
       },
       uploadUrl: uploadUrl,
       defaultRepairFileList: [],
-      repairFileList: [], // 维修图片,
+      repairFileList: [] // 维修图片,
     }
   },
   components: {
@@ -155,7 +163,8 @@ export default {
           'updateTime',
           'createdUserName',
           'repairHours',
-          'dataRemark'
+          'dataRemark',
+          'opinion'
         ])))
       })
     },