|
|
@@ -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) {}
|
|
|
}
|
|
|
})
|
|
|
}
|