LAPTOP-16IUEB3P\Lenovo 3 лет назад
Родитель
Сommit
7e12c5586d

+ 8 - 1
src/api/maintenance/repair_report.js

@@ -78,4 +78,11 @@ export async function checkOrBack (data) {
   return Promise.reject(new Error(res.data.message));
 }
 
- 
+ // 维修计划新增 
+ export async function savePlanRepair (data) {
+   const res = await request.post('/eam/plan/save', data);
+   if (res.data.code == 0) {
+     return res.data.data;
+   }
+   return Promise.reject(new Error(res.data.message));
+ }

+ 95 - 266
src/views/maintenance/repair/maintenancePlan/add.vue

@@ -34,10 +34,10 @@
           </el-form-item>
         </el-col>
         <el-col :span="6">
-          <el-form-item label="审批人:" prop="executorId">
+          <el-form-item label="审批人:" prop="approvalUserId">
 			 <personSelect
 				 ref="executorRef"
-				 v-model="addForm.executorId"
+				 v-model="addForm.approvalUserId"
 				 :init="false"
 			 />
           </el-form-item>
@@ -71,13 +71,13 @@
       @selection-change="equiMultipleSelectChange"
     >
       <el-table-column type="selection" align="center" />
-      <el-table-column label="报修记录编码" prop="repairsCode" />
-      <el-table-column label="设备编码" prop="equiCode" />
-      <el-table-column label="设备名称" prop="equiName" />
-      <el-table-column label="计划完成时间" prop="plannedTime" width="220">
+      <el-table-column label="报修记录编码" prop="code" />
+      <el-table-column label="设备编码" prop="deviceCode" />
+      <el-table-column label="设备名称" prop="deviceName" />
+      <el-table-column label="计划完成时间" prop="expectedTime" width="220">
         <template slot-scope="scope">
           <el-input
-            v-model="scope.row.plannedTime"
+            v-model="scope.row.expectedTime"
             size="small"
             disabled
             placeholder="设置执行人自动带出"
@@ -95,24 +95,23 @@
           />
         </template>
       </el-table-column> -->
-      <el-table-column label="执行人" prop="workOrderExecutorName">
+      <el-table-column label="执行人" prop="workOrderExecutorId">
         <template slot-scope="scope">
-          <el-input
-            v-if="scope.$index == 0"
-            v-model="scope.row.workOrderExecutorName"
-            size="small"
-            readonly
-            @click.native="settingExecutor(scope.$index, scope.row)"
-            placeholder="设置"
-          />
-          <el-input
-            v-else
-            v-model="scope.row.workOrderExecutorName"
-            size="small"
-            readonly
-            @click.native="dittoName(scope.$index, scope.row)"
-            placeholder="同上"
-          />
+			<personSelect
+			    v-if="scope.$index == 0"
+				:disabled="true"
+				v-model="scope.row.workOrderExecutorId"
+				placeholder="设置"
+				@click.native="settingExecutor(scope.$index, scope.row)"
+			/>
+			<personSelect
+			    v-else
+				readonly
+				v-model="scope.row.workOrderExecutorId"
+				placeholder="同上"
+				@click.native="dittoName(scope.$index, scope.row)"
+				:disabled="true"
+			/>
         </template>
       </el-table-column>
       <el-table-column label="操作">
@@ -137,7 +136,7 @@
       :before-close="closeRepairNotesDialog"
       :close-on-click-modal="false"
       :close-on-press-escape="false"
-      width="55%"
+      width="65%"
     >
       <div class="search_msg">
         <el-input
@@ -161,39 +160,40 @@
         ></el-table-column>
         <el-table-column
           label="报修记录编码"
-          prop="repairsCode"
+          prop="code"
           align="center"
         ></el-table-column>
         <el-table-column
           label="设备编码"
-          prop="equiCode"
+          prop="deviceCode"
           align="center"
         ></el-table-column>
         <el-table-column
           label="设备名称"
-          prop="equiName"
+          prop="deviceName"
           align="center"
         ></el-table-column>
-        <el-table-column label="来源" align="center">
+       <el-table-column label="来源" align="center">
           <template slot-scope="{ row }">
-            <span>{{ row.source.desc }}</span>
+            <span>{{ getDictValue('报修来源', row.sourceType) }}</span>
           </template>
         </el-table-column>
         <el-table-column
           label="报修人"
-          prop="repairsPerson"
+          prop="requestUserName"
           width="70"
           align="center"
         ></el-table-column>
         <el-table-column
           label="报修时间"
           prop="createTime"
-          width="100"
+          width="150"
           align="center"
         ></el-table-column>
         <el-table-column
           label="期望完成时间"
           prop="expectedTime"
+		  width="150"
           align="center"
         ></el-table-column>
       </el-table>
@@ -238,36 +238,30 @@
           <el-row>
             <el-col :span="8">
               <el-form-item label="报修记录编号:">
-                <span>{{ infoData.repairsCode }}</span>
+                <span>{{ infoData.code }}</span>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label="设备编码:">
-                <span>{{ infoData.equiCode }}</span>
+                <span>{{ infoData.deviceCode }}</span>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label="设备名称:">
-                <span>{{ infoData.equiName }}</span>
+                <span>{{ infoData.deviceName }}</span>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row>
             <el-col :span="8">
               <el-form-item label="设备型号:">
-                <span>{{
-                  infoData.assetDetailResp &&
-                  infoData.assetDetailResp.information.modelType
-                }}</span>
+                <span>{{infoData.category && infoData.category.modelType}}</span>
               </el-form-item>
             </el-col>
             <el-col :span="16">
               <el-form-item label="设备位置:">
                 <span>
-                  {{ infoData.factoryName ? infoData.factoryName + '—' : ''
-                  }}{{ infoData.workshopName ? infoData.workshopName + '—' : ''
-                  }}{{ infoData.lineName ? infoData.lineName + '—' : ''
-                  }}{{ infoData.detailLocation }}
+                  {{ infoData.position }}
                 </span>
               </el-form-item>
             </el-col>
@@ -275,11 +269,11 @@
           <el-row>
             <el-col :span="24">
               <el-form-item label="故障描述:">
-                <span>{{ infoData.repairsDescription }}</span>
+                <span>{{ infoData.remark }}</span>
               </el-form-item>
             </el-col>
           </el-row>
-          <el-row>
+<!--          <el-row>
             <el-col :span="16">
               <el-form-item label="图片:">
                 <el-image
@@ -297,12 +291,12 @@
                 <span>{{ infoData.repairsVideo }}</span>
               </el-form-item>
             </el-col>
-          </el-row>
+          </el-row> -->
           <el-row class="valid_row">
             <el-col :span="8">
               <el-form-item label="计划完成时间:">
                 <el-date-picker
-                  v-model="infoData.plannedTime"
+                  v-model="infoData.expectedTime"
                   type="datetime"
                   size="small"
                   placeholder="选择日期时间"
@@ -314,38 +308,18 @@
             <el-col :span="8">
               <el-form-item label="执行部门:" prop="deptCode">
 				  <deptSelect
-				    v-model="addForm.deptCode"
+				    v-model="infoData.deptCode"
 				    @change="deptNodeClick"
 				  />
-                <!-- <el-input v-model="infoData.deptCode" v-show="false"></el-input>
-                <SelectTree
-                  class="form-input"
-                  ref="searchTree"
-                  :options="deptList"
-                  :value="infoData.deptCode"
-                  :props="{
-                    value: 'code',
-                    label: 'name',
-                    children: 'children'
-                  }"
-                  @getValue="searchDeptNodeClick"
-                /> -->
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label="执行人:" prop="workOrderExecutorId">
-                <el-select
-                  v-model="infoData.workOrderExecutorId"
-                  style="width: 100%"
-                >
-                  <el-option
-                    v-for="item in executorList"
-                    :key="item.userId"
-                    :value="item.userId"
-                    :label="item.trueName"
-                    @click.native="selectExecutor(item)"
-                  ></el-option>
-                </el-select>
+				  <personSelect
+					 ref="setExecutor"
+					 v-model="infoData.workOrderExecutorId"
+					 :init="false"
+				  />
               </el-form-item>
             </el-col>
           </el-row>
@@ -378,47 +352,38 @@
 <script>
   import personSelect from '@/components/CommomSelect/person-select.vue';
   import deptSelect from '@/components/CommomSelect/dept-select.vue';
-  import { getPage  } from '@/api/maintenance/repair_report';
+  import { getPage , savePlanRepair } from '@/api/maintenance/repair_report';
+  import { getAssetInfo } from '@/api/ledgerAssets';
+  import dictMixins from '@/mixins/dictMixins';
 export default {
+  mixins: [dictMixins],
   components: {
     personSelect,
     deptSelect
   },
   data () {
     return {
-      uerList: [], // 审批人
-      exaUser: [], //新审批人列表
       equipmentData: [], // 设备明细表格
       equiSelection: [], // 设备明细 - 表格多选
       selectNotesVisible: false, // 弹窗
       notesData: [], // 弹窗- 报修记录表格
       notesSelection: [], // 弹窗 - 表格多选
       code: '', // 弹窗 - 关键字搜索
-      addForm: {
-        // planCode: getRuleNo('PL'), // 计划单号
-        planName: '', // 计划名称
-        verifyDeptCode: '', //审批部门code
-        verifyDeptName: '', //审批部门名称
-        verifyUserId: '', // 审批人Id
-        urgent: null, // 紧急程度
-        verifyUserName: '' // 审批人名称
-      },
+      addForm: { },
       pagination: {
         pageNum: 1,
         size: 10,
       }, 
 	  total: 0,
       rules: {
-        planName: [{ required: true, message: '请输入计划名称' }],
-        urgent: [{ required: true, message: '请选择紧急程度' }],
-        verifyDeptCode: [{ required: true, message: '请选择审批部门' }],
-        executorId: [{ required: true, message: '请选择审批人' }]
+        planName: [{ required: true, message: '请输入计划名称',trigger: 'blur' }],
+        urgent: [{ required: true, message: '请选择紧急程度',trigger: 'change' }],
+        verifyDeptCode: [{ required: true, message: '请选择审批部门',trigger: 'change' }],
+        approvalUserId: [{ required: true, message: '请选择审批人',trigger: 'change' }]
       },
       settingIndex: null, // 保存的设备明细表格行index
       settingExecutorVisible: false, // 设置执行人弹窗
       infoData: { deptCode: '' }, // 设置执行人弹窗详情数据
-      deptList: [], // 执行部门
-      executorList: [], // 执行人
       infoFormRules: {
         deptCode: [
           { required: true, message: '请选择执行部门', trigger: 'change' }
@@ -429,9 +394,9 @@ export default {
       }
     }
   },
-  created () {
-
-  },
+ created () {
+   this.requestDict('报修来源');
+ },
   methods: {
 	//选择部门(搜索)
 	searchDeptNodeClick (info) {
@@ -442,41 +407,13 @@ export default {
 	  });
 	},
 		
-    // 获取详情
-    async _getPlanInfo () {
-      const res = await maintenancePlan.planInfoDetailApi(this.$route.query.id)
-      console.log('详情数据:', res)
-      this.addForm = res.data
-      this.equipmentData = res.data.planDetailRespList
-    },
-    // 获取审核人列表
-    async getUserList (params) {
-      try {
-        let data = { status: 1, page: 1, size: 999999 }
-        if (params) {
-          data = Object.assign(data, params)
-        }
-        const res = await user.list(data)
-        if (params) {
-          this.executorList = res.data.items
-        } else {
-          this.uerList = res.data.items
-        }
-      } catch (error) {}
-    },
+    // // 获取详情
+    // async _getPlanInfo () {
+    //   const res = await maintenancePlan.planInfoDetailApi(this.$route.query.id)
+    //   this.addForm = res.data
+    //   this.equipmentData = res.data.planDetailRespList
+    // },
 
-    // 封装 - 获取部门数据
-    async _getDeptList () {
-      try {
-        const tree = await dept.tree()
-        if (tree.success) {
-          this.deptList = tree.data
-          if (this.$route.query.id) {
-            this._getPlanInfo()
-          }
-        }
-      } catch (error) {}
-    },
 
     // 设备明细 - 表格多选
     equiMultipleSelectChange (val) {
@@ -493,137 +430,46 @@ export default {
         this.equipmentData.splice(index, 1)
       })
     },
+	
+	// 获取报修详情
+	getSbinfo (params) {
+	  getAssetInfo(params).then(res => {
+	    if (res) {
+	      this.infoData = res
+		  this.$set(this.infoData,'position',res.positionList[0].pathName?res.positionList[0].pathName:'')
+	      this.$set(this.infoData,'deviceCode',res.code)
+		  this.$set(this.infoData,'deviceName',res.name)
+		}
+	  })
+	},
 
     // 设备明细 - 打开设置执行人弹窗
     async settingExecutor (index, row) {
       console.log('打开设置执行人弹窗', index, row)
-      // 在编辑的时候,打开弹窗,获取执行人列表
-      if (row.deptCode) {
-        const params = { deptCode: row.deptCode, status: 1 }
-        this.getUserList(params)
-      }
+	  this.getSbinfo(row.deviceId)
       this.settingIndex = index
       this.settingExecutorVisible = true
-      let plannedTime = row.plannedTime ? row.plannedTime : row.expectedTime
-      // let deptCode = row.deptCode ? row.deptCode : ''
-      // let deptName = row.deptName ? row.deptName : ''
-      // console.log(deptCode)
-      // console.log(deptName)
-      this.$set(this.infoData, 'assetDetailResp', row.assetDetailResp)
-      this.$set(this.infoData, 'repairsCode', row.repairsCode)
-      this.$set(this.infoData, 'equiCode', row.equiCode)
-      this.$set(this.infoData, 'equiName', row.equiName)
-      this.$set(this.infoData, 'equiModel', row.specifications)
-
-      this.$set(this.infoData, 'factoryName', row.assetDetailResp?.factoryName)
-      this.$set(
-        this.infoData,
-        'factoryPlantName',
-        row.assetDetailResp?.factoryPlantName
-      )
-      this.$set(
-        this.infoData,
-        'workshopName',
-        row.assetDetailResp?.workshopName
-      )
-      this.$set(this.infoData, 'lineName', row.assetDetailResp?.lineName)
-      this.$set(
-        this.infoData,
-        'detailLocation',
-        row.assetDetailResp?.detailLocation
-      )
-
-      this.$set(this.infoData, 'repairsDescription', row.repairsDescription)
-
-      // 处理图片
-      if (row.repairsImg) {
-        const repairsImg = row.repairsImg
-        this.$set(this.infoData, 'repairsImg', [])
-        repairsImg.split(',').map(itm => {
-          imageView(itm).then(res => {
-            this.infoData.repairsImg.push({
-              name: itm.substring('/download/'.length),
-              url: res
-            })
-          })
-
-          return
-        })
-      }
-
-      this.$set(this.infoData, 'repairsVideo', row.repairsVideo)
-      this.$set(this.infoData, 'plannedTime', plannedTime)
-      this.$set(this.infoData, 'deptCode', row.deptCode)
-      this.$set(this.infoData, 'deptName', row.deptName)
-      this.$set(this.infoData, 'workOrderExecutorId', row.workOrderExecutorId)
-      this.$set(
-        this.infoData,
-        'workOrderExecutorName',
-        row.workOrderExecutorName
-      )
-      this.$set(this.infoData, 'maintenanceContent', row.maintenanceContent)
-      this._getDeptList()
+      this.$set(this.infoData, 'remark', row.remark)
+      this.$set(this.infoData, 'code', row.code)
     },
 
     // 点击同上
     async dittoName (index, row) {
-      if (!this.equipmentData[0].workOrderExecutorName) {
+      if (!this.equipmentData[0].workOrderExecutorId) {
         this.$message.warning('请先设置第一条数据的执行人')
       } else {
-        // row.workOrderExecutorName = null
-        // row.deptName = null
-        // row.maintenanceContent = null
         this.settingExecutor(index, row)
-        // this.$set(
-        //   this.equipmentData[index],
-        //   'workOrderExecutorName',
-        //   this.equipmentData[0].workOrderExecutorName
-        // )
-        // this.$set(
-        //   this.equipmentData[index],
-        //   'deptName',
-        //   this.equipmentData[0].deptName
-        // )
-      }
-    },
-
-    // 头部——选择审批部门(搜索)
-    async verifyNodeClick (info) {
-      if (info) {
-        this.addForm.verifyDeptCode = info.code
-        this.addForm.verifyDeptName = info.name
-        // this.addForm.verifyUserId = null
-        // this.addForm.verifyUserName = null
-        // 根据部门获取人员
-        const params = {
-          deptCode: info.code,
-          status: 1,
-          status: 1,
-          page: 1,
-          size: 999999
-        }
-        const res = await user.list(params)
-        this.exaUser = res.data.items
-      } else {
-        this.addForm.verifyDeptCode = ''
       }
     },
 
     // 选择部门(搜索)
     deptNodeClick (info) {
-      if (info) {
-        // 根据部门获取人员
-        const params = { groupId: info }
-        this.getUserList(params)
-      }
+      const params = { groupId: info };
+      this.$nextTick(() => {
+      	 this.$refs.setExecutor.getList(params);
+      });
     },
 
-    // 选择执行人
-    selectExecutor (item) {
-      console.log(item)
-      this.infoData.workOrderExecutorName = item.trueName
-      this.infoData.workOrderExecutorPhone = item.mobile
-    },
 
     // 弹窗 - 关闭
     closeRepairNotesDialog () {
@@ -668,7 +514,8 @@ export default {
     async _getNotesData () {
 	  let params = {
         ...this.pagination,
-        code:this.code
+        code:this.code,
+		statusList:'0,6'
       }
       const res = await getPage(params)
       this.notesData = res.list
@@ -703,7 +550,6 @@ export default {
     // 弹窗 - 关闭设置执行人弹窗
     closeSettingExecutorDialog () {
       this.infoData = { deptCode: '' }
-      this.$refs.searchTree.clearHandle()
       this.$refs.infoFormRef.resetFields()
       this.settingExecutorVisible = false
     },
@@ -714,34 +560,19 @@ export default {
         if (valid) {
           this.$set(
             this.equipmentData[this.settingIndex],
-            'plannedTime',
-            this.infoData.plannedTime
+            'expectedTime',
+            this.infoData.expectedTime
           )
           this.$set(
             this.equipmentData[this.settingIndex],
             'deptCode',
             this.infoData.deptCode
           )
-          this.$set(
-            this.equipmentData[this.settingIndex],
-            'deptName',
-            this.infoData.deptName
-          )
-          this.$set(
-            this.equipmentData[this.settingIndex],
-            'workOrderExecutorPhone',
-            this.infoData.workOrderExecutorPhone
-          )
           this.$set(
             this.equipmentData[this.settingIndex],
             'workOrderExecutorId',
             this.infoData.workOrderExecutorId
           )
-          this.$set(
-            this.equipmentData[this.settingIndex],
-            'workOrderExecutorName',
-            this.infoData.workOrderExecutorName
-          )
           this.$set(
             this.equipmentData[this.settingIndex],
             'maintenanceContent',
@@ -750,10 +581,10 @@ export default {
           console.log('[this.settingIndex]', [this.settingIndex])
           if (!this.settingIndex) {
             this.equipmentData.map(item => {
-              item.workOrderExecutorName = this.infoData.workOrderExecutorName
+              // item.workOrderExecutorName = this.infoData.workOrderExecutorName
               item.workOrderExecutorId = this.infoData.workOrderExecutorId
-              item.workOrderExecutorPhone = this.infoData.workOrderExecutorPhone
-              item.deptName = this.infoData.deptName
+              // item.workOrderExecutorPhone = this.infoData.workOrderExecutorPhone
+              // item.deptName = this.infoData.deptName
               item.maintenanceContent = this.infoData.maintenanceContent
             })
           }
@@ -770,23 +601,21 @@ export default {
           if (this.equipmentData.length === 0) {
             return this.$message.warning('请选择设备报修记录!')
           }
-          try {
             let data = JSON.parse(JSON.stringify(this.addForm))
             data['planEquiList'] = this.equipmentData
-            let api = maintenancePlan.savePlanInfo
+            // let api = maintenancePlan.savePlanInfo
             let msg = '新增成功!'
             // 修改
             if (this.$route.query.id) {
               delete data.planDetailRespList
-              api = maintenancePlan.updatePlanInfo
+              // api = maintenancePlan.updatePlanInfo
               msg = '修改成功!'
             }
             // console.log(data)
-            const res = await api(data)
+            const res = await savePlanRepair(data)
             // console.log('保存新增:', res)
             this.$message.success(msg)
             this.$router.go(-1)
-          } catch (error) {}
         }
       })
     }

+ 0 - 10
src/views/maintenance/repair/outsourcingOrder/components/AppointDetailsDialog.vue

@@ -263,16 +263,6 @@ export default {
       row: {},
       cause: '',
       showtext: false,
-      assetTypeList: [
-        '生产设备',
-        '舟皿',
-        '物料',
-        '产品',
-        '周转车',
-        '模具',
-        '备品备件',
-        '耗材'
-      ],
       checkTime: '',
       imageUrl: null
     }

+ 24 - 30
src/views/maintenance/repair/outsourcingOrder/components/appointDialog.vue

@@ -14,7 +14,7 @@
         <el-descriptions title="" :column="2" size="medium" border>
           <el-descriptions-item>
             <template slot="label"> 工单编号 </template>
-            {{ workOrderInfo ? workOrderInfo.outsourcCode : '' }}
+            {{ workOrderInfo ? workOrderInfo.code : '' }}
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label"> 发布时间 </template>
@@ -30,7 +30,7 @@
           </el-descriptions-item>
           <el-descriptions-item :span="2">
             <template slot="label"> 计划完成时间 </template>
-            {{ workOrderInfo ? workOrderInfo.plannCompletionTime : '' }}
+            {{ workOrderInfo ? workOrderInfo.planCompletionTime : '' }}
           </el-descriptions-item>
         </el-descriptions>
         <div class="basic-details-title border-none">
@@ -39,15 +39,15 @@
         <el-descriptions title="" :column="2" size="medium" border>
           <el-descriptions-item>
             <template slot="label"> 设备编码 </template>
-            {{ equipmentInfo ? equipmentInfo.assetCode : '' }}
+            {{ equipmentInfo ? equipmentInfo.code : '' }}
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label"> 权属部门 </template>
-            {{ equipmentInfo ? equipmentInfo.ownershipDeptName : ''}}
+            {{ equipmentInfo ? equipmentInfo.ownershipGroupName : ''}}
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label"> 设备名称 </template>
-            {{ equipmentInfo ? equipmentInfo.assetName : '' }}
+            {{ equipmentInfo ? equipmentInfo.name : '' }}
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label"> 权属人 </template>
@@ -59,13 +59,11 @@
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label"> 固定资产编码 </template>
-            {{ equipmentInfo ? equipmentInfo.fixAssetCode : '' }}
+            {{ equipmentInfo ? equipmentInfo.fixCode : '' }}
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label" :span="2"> 设备位置 </template>
-            {{ equipmentInfo ? equipmentInfo.factoryName : '' }}—{{
-              equipmentInfo ? equipmentInfo.workshopName : ''
-            }}—{{ equipmentInfo ? equipmentInfo.lineName : '' }}
+            {{ equipmentInfo.position}}
           </el-descriptions-item>
         </el-descriptions>
         <div class="basic-details-title border-none">
@@ -74,7 +72,7 @@
         <el-descriptions title="" :column="2" size="medium" border>
           <el-descriptions-item>
             <template slot="label"> 报修记录编号 </template>
-            {{ infoData ? infoData.repairsCode : '' }}
+            {{ infoData ? infoData.code : '' }}
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label"> 报修时间 </template>
@@ -82,7 +80,7 @@
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label"> 报修人 </template>
-            {{ infoData ? infoData.repairsPerson : '' }}
+            {{ infoData ? infoData.requestUserName : '' }}
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label"> 报修人电话 </template>
@@ -90,9 +88,9 @@
           </el-descriptions-item>
           <el-descriptions-item :span="2">
             <template slot="label" > 故障描述 </template>
-            {{ infoData ? infoData.repairsDescription : '' }}
+            {{ infoData ? infoData.remark : '' }}
           </el-descriptions-item>
-          <el-descriptions-item :span="2">
+<!--          <el-descriptions-item :span="2">
             <template slot="label" > 图片 </template>
             <el-image
               v-for="(item, index) in infoData.repairsImg"
@@ -101,7 +99,7 @@
               :src="item.url"
               :preview-src-list="[item.url]"
             />
-          </el-descriptions-item>
+          </el-descriptions-item> -->
         </el-descriptions>
         <div class="container-write">
             <div class="write-box">
@@ -123,10 +121,8 @@
 </template>
 
 <script>
-// import { getOutsourcDetail , getDetailByCode } from '@/api/maintenance/repair/repair'
-// import { getWorkOrderDetail } from '@/api/maintenance/repair/maintenancePlan'
-// import { getNewinfo } from '@/api/stockManagement/stocking'
-// import { imageView } from '@/utils'
+import { getOutsourceInfo , getRepairById } from '@/api/maintenance/repair_report';
+import { getAssetInfo } from '@/api/ledgerAssets';
 import print from 'print-js'
 export default {
   props: {
@@ -149,24 +145,23 @@ export default {
   methods: {
     async init(row){
       this.appointVisible = true
-      // const res = await getOutsourcDetail(row.id)
-      // this.workOrderInfo = res.data
-      // this.getSbinfo({ code: row.equiCode })
-      // this.getBxinfo(row.repairsCode)
+	  console.log('row',row)
+      const res = await getOutsourceInfo(row.id)
+      this.workOrderInfo = res
+      this.getSbinfo(row.equiId)
+      this.getBxinfo(row.repairRequestId)
     },
 
     getSbinfo (params) {
-      getNewinfo(params).then(res => {
-        if (res.success) {
-          this.equipmentInfo = res.data
-        }
+      getAssetInfo(params).then(res => {
+          this.equipmentInfo = res
+		  this.$set(this.equipmentInfo,'position',res.positionList[0].pathName?res.positionList[0].pathName:'')
       })
     },
 
     getBxinfo(params){
-      getDetailByCode(params).then(res=>{
-         if (res.success) {
-           this.infoData = res.data
+      getRepairById(params).then(res=>{
+           this.infoData = res
            // 处理图片
             if (this.infoData && this.infoData.repairsImg) {
               const repairsImg = this.infoData.repairsImg
@@ -181,7 +176,6 @@ export default {
                 return
               })
             }
-         }
       })
     },
 

+ 6 - 6
src/views/maintenance/repair/outsourcingOrder/index.vue

@@ -225,12 +225,12 @@
 		  
 	  },
 	  
-	  openAppoint(){
-		  if(this.multipleSelection.length==0){
-		    return this.$message.warning('请选择一条委外单')
-		  }
-		  this.$refs.appointDialogRef.init(this.multipleSelection[0])
-	  }
+			openAppoint(){
+				if(this.multipleSelection.length==0){
+					return this.$message.warning('请选择一条委外单')
+				}
+				this.$refs.appointDialogRef.init(this.multipleSelection[0])
+			}
 	  
     }
   };

+ 6 - 3
src/views/maintenance/repair/repairNotes/components/notes-search.vue

@@ -78,11 +78,11 @@
       // 默认表单数据
       const defaultWhere = {
         sourceCode: '',
-		sourceType:'',
+		    sourceType:'',
         code: '',
         requestUserId: '',
         status: '',
-		time: [],
+		    time: [],
       };
       return {
         // 表单数据
@@ -104,7 +104,10 @@
           parmas.startTime = parmas.time[0];
           parmas.endTime = parmas.time[1];
         }
-        delete parmas.time;
+		if (parmas.status) {
+		  parmas.statusList = [parmas.status].join(',')
+		}
+        delete parmas.status;
         this.$emit('search', parmas);
       },
       /*  重置 */

+ 2 - 2
vue.config.js

@@ -33,11 +33,11 @@ module.exports = {
       '/api': {
         // target: 'http://192.168.3.51:86', // 测试
         // target: 'http://192.168.3.34:8080', // 刘毅
-        // target: 'http://192.168.3.35:8080', // kang杨威
+        target: 'http://192.168.3.35:8080', // kang杨威
         // target: 'http://192.168.3.25:8080', // 黄峥嵘
         // target: 'http://192.168.3.41:8080', // 何江鹏
         // target: 'http://192.168.3.33:8080', // 谢一平
-        target: 'http://192.168.3.34:8080', // 刘毅
+        // target: 'http://192.168.3.34:8080', // 刘毅
 
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {