Merge remote-tracking branch 'origin/master'

master
wws 1 year ago
commit 229540d1c1

@ -308,164 +308,62 @@
> >
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-tabs type="border-card"> <el-tabs type="border-card">
<el-tab-pane label="查看报修信息"> <el-tab-pane label="基本信息">
<el-row :gutter="10" class="mb8"> <el-descriptions :column="3" border>
<el-col :span="8"> <el-descriptions-item label="设备编码">{{
<el-form-item label="设备编码" prop="equipmentCode"> form.equipmentCode
<el-input }}</el-descriptions-item>
v-model="form.equipmentCode" <el-descriptions-item label="故障时间">{{
disabled form.orderBreakdownTime
style="width: 195px" }}</el-descriptions-item>
> <el-descriptions-item label="报修来源">{{
</el-input> form.orderSource
<ItemSelect }}</el-descriptions-item>
ref="itemSelect" <el-descriptions-item label="报修时间">{{
@onSelected="onItemSelectedEquipment" form.orderTime
> }}</el-descriptions-item>
</ItemSelect> <el-descriptions-item label="报修人名字">{{
</el-form-item> form.orderRepairmanName
</el-col> }}</el-descriptions-item>
<el-col :span="8"> <el-descriptions-item label="联系方式">{{
<el-form-item label="设备名称" prop="equipmentName"> form.orderConnection
<el-input }}</el-descriptions-item>
v-model="form.equipmentName" <el-descriptions-item label="故障描述">{{
disabled form.orderDesc
style="width: 195px" }}</el-descriptions-item>
> </el-descriptions>
</el-input> <el-descriptions :column="1" border>
</el-form-item> <el-descriptions-item label="故障图片">
</el-col> <el-image
<el-col :span="8"> v-for="(item, index) in urlLists"
<el-form-item label="设备类型" prop="equipmentTypeName"> :key="index"
<el-input :src="item"
v-model="form.equipmentTypeName" ></el-image
disabled ></el-descriptions-item>
style="width: 195px" </el-descriptions>
> </el-tab-pane>
</el-input> <el-tab-pane label="检查项信息">
</el-form-item> <el-table :data="checkList" border style="width: 100%">
</el-col> <el-table-column prop="itemName" label="检查项名称" width="150">
</el-row> </el-table-column>
<el-table-column prop="standardName" label="标准名称" width="180">
<el-row :gutter="10" class="mb8"> </el-table-column>
<el-col :span="8"> <el-table-column prop="standardType" label="标准类型" width="100">
<el-form-item label="规格型号" prop="equipmentSpec"> </el-table-column>
<el-input <el-table-column prop="detailReach" label="是否达标" width="50">
v-model="form.equipmentSpec" </el-table-column>
disabled <el-table-column prop="actualValue" label="实际值" width="50">
style="width: 195px" </el-table-column>
> <el-table-column prop="detailUpLimit" label="上限" width="50">
</el-input> </el-table-column>
<ItemSelect <el-table-column prop="detailDownLimit" label="下限" width="50">
ref="itemSelect" </el-table-column>
@onSelected="onItemSelectedEquipment" <el-table-column prop="detailUnit" label="单位" width="50">
> </el-table-column>
</ItemSelect> <el-table-column prop="detailUnit" label="故障图片">
</el-form-item> </el-table-column>
</el-col> </el-table>
<el-col :span="8"> </el-tab-pane>
<el-form-item label="所在部门" prop="department">
<el-input
v-model="form.department"
disabled
style="width: 195px"
>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="所在位置" prop="equipmentLocation">
<el-input
v-model="form.equipmentLocation"
disabled
style="width: 195px"
>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="8">
<el-form-item label="故障时间" prop="orderBreakdownTime">
<el-date-picker
clearable
v-model="form.orderBreakdownTime"
type="datetime"
placeholder="选择日期时间"
disabled
style="width: 195px"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="报修来源" prop="orderSource">
<el-select
v-model="form.orderSource"
style="width: 195px"
disabled
>
<el-option
v-for="dict in dict.type.device_order_source"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="报修时间" prop="orderTime">
<el-date-picker
clearable
v-model="form.orderTime"
type="datetime"
disabled
style="width: 195px"
placeholder="报修时间"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="8">
<el-form-item label="报修人编号" prop="orderRepairmanCode">
<el-input
v-model="form.orderRepairmanCode"
placeholder="请输入报修人编号"
disabled
style="width: 195px"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="联系方式" prop="orderConnection">
<el-input
v-model="form.orderConnection"
placeholder="请输入联系方式"
disabled
style="width: 195px"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="故障描述" prop="orderDesc">
<el-input
v-model="form.orderDesc"
placeholder="请输入故障描述"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }"
disabled
/>
</el-form-item>
</el-row>
<el-form-item label="故障图片" prop="orderPicture">
<FileUpload v-model="form.fileList" />
</el-form-item>
</el-tab-pane>
<el-tab-pane label="审核"> <el-tab-pane label="审核">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
@ -474,7 +372,7 @@
<el-radio label="计划性维修">计划性维修</el-radio> <el-radio label="计划性维修">计划性维修</el-radio>
<el-radio label="不维修">不维修</el-radio> <el-radio label="不维修">不维修</el-radio>
<el-radio label="委外维修">委外维修</el-radio> <el-radio label="委外维修">委外维修</el-radio>
<el-radio label="立即维修" @click="timeBackFilling" <el-radio label="立即维修" @click.native ="timeBackFilling"
>立即维修</el-radio >立即维修</el-radio
> >
</el-radio-group> </el-radio-group>
@ -484,10 +382,21 @@
<el-row> <el-row>
<el-col :span="8" v-if="form.repairDestination == '计划性维修'"> <el-col :span="8" v-if="form.repairDestination == '计划性维修'">
<el-form-item prop="workTeam" label="维修组"> <el-form-item prop="workTeam" label="维修组">
<el-input <el-select
v-model="form.workTeam" v-model="form.workTeam"
placeholder="请选择维修组" placeholder="请选择维修组"
/> @change="$forceUpdate()"
clearable
filterable
style="width: 200px"
>
<el-option
v-for="item in teamOption"
:key="item.teamCode"
:label="item.teamName"
:value="item.teamCode"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" v-if="form.repairDestination == '计划性维修'"> <el-col :span="8" v-if="form.repairDestination == '计划性维修'">
@ -552,10 +461,21 @@
<el-row> <el-row>
<el-col :span="8" v-if="form.repairDestination == '立即维修'"> <el-col :span="8" v-if="form.repairDestination == '立即维修'">
<el-form-item prop="workTeam" label="维修组"> <el-form-item prop="workTeam" label="维修组">
<el-input <el-select
v-model="form.workTeam" v-model="form.workTeam"
placeholder="请选择维修组" placeholder="请选择维修组"
/> @change="$forceUpdate()"
clearable
filterable
style="width: 200px"
>
<el-option
v-for="item in teamOption"
:key="item.teamCode"
:label="item.teamName"
:value="item.teamCode"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" v-if="form.repairDestination == '立即维修'"> <el-col :span="8" v-if="form.repairDestination == '立即维修'">
@ -564,7 +484,7 @@
clearable clearable
v-model="form.workPlanTime" v-model="form.workPlanTime"
type="datetime" type="datetime"
placeholder="" disabled
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -670,330 +590,162 @@
append-to-body append-to-body
> >
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row :gutter="10" class="mb8"> <el-tabs type="border-card">
<el-col :span="8"> <el-tab-pane label="基本信息">
<el-form-item label="设备编码" prop="equipmentCode"> <el-descriptions :column="3" border>
<el-input <el-descriptions-item label="设备编码">{{
v-model="form.equipmentCode" form.equipmentCode
disabled }}</el-descriptions-item>
style="width: 195px" <el-descriptions-item label="设备名称">{{
> form.equipmentName
</el-input> }}</el-descriptions-item>
<ItemSelect <el-descriptions-item label="设备类型">{{
ref="itemSelect" form.equipmentTypeName
@onSelected="onItemSelectedEquipment" }}</el-descriptions-item>
> <el-descriptions-item label="规格型号">{{
</ItemSelect> form.equipmentSpec
</el-form-item> }}</el-descriptions-item>
</el-col> <el-descriptions-item label="所在部门">{{
<el-col :span="8"> form.department
<el-form-item label="设备名称" prop="equipmentName"> }}</el-descriptions-item>
<el-input <el-descriptions-item label="所在位置">{{
v-model="form.equipmentName" form.equipmentLocation
disabled }}</el-descriptions-item>
style="width: 195px" <el-descriptions-item label="故障时间">{{
> form.orderBreakdownTime
</el-input> }}</el-descriptions-item>
</el-form-item> <el-descriptions-item label="报修来源">{{
</el-col> form.orderSource
<el-col :span="8"> }}</el-descriptions-item>
<el-form-item label="设备类型" prop="equipmentTypeName"> <el-descriptions-item label="报修时间">{{
<el-input form.orderTime
v-model="form.equipmentTypeName" }}</el-descriptions-item>
disabled <el-descriptions-item label="报修人名字">{{
style="width: 195px" form.orderRepairmanName
> }}</el-descriptions-item>
</el-input> <el-descriptions-item label="联系方式">{{
</el-form-item> form.orderConnection
</el-col> }}</el-descriptions-item>
</el-row> <el-descriptions-item label="故障描述">{{
form.orderDesc
}}</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="1" border>
<el-descriptions-item label="故障图片">
<el-image
v-for="(item, index) in urlLists"
:key="index"
:src="item"
></el-image
></el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-row :gutter="10" class="mb8"> <el-tab-pane label="报修信息审核结果">
<el-col :span="8"> <el-descriptions
<el-form-item label="规格型号" prop="equipmentSpec"> :column="2"
<el-input border
v-model="form.equipmentSpec" v-if="form.repairDestination == '计划性维修'"
disabled >
style="width: 195px" <el-descriptions-item label="报修去向">{{
> form.repairDestination
</el-input> }}</el-descriptions-item>
<ItemSelect <el-descriptions-item label="维修组">{{
ref="itemSelect" form.workTeam
@onSelected="onItemSelectedEquipment" }}</el-descriptions-item>
> <el-descriptions-item label="计划维修时间">{{
</ItemSelect> form.workPlanTime
</el-form-item> }}</el-descriptions-item>
</el-col> <el-descriptions-item label="是否停机维修">{{
<el-col :span="8"> form.workDownMachine
<el-form-item label="所在部门" prop="department"> }}</el-descriptions-item>
<el-input v-model="form.department" disabled style="width: 195px"> <el-descriptions-item label="计划停机时间">{{
</el-input> form.workPlanDownTime
</el-form-item> }}</el-descriptions-item>
</el-col> </el-descriptions>
<el-col :span="8">
<el-form-item label="所在位置" prop="equipmentLocation">
<el-input
v-model="form.equipmentLocation"
disabled
style="width: 195px"
>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8"> <el-descriptions
<el-col :span="8"> :column="2"
<el-form-item label="故障时间" prop="orderBreakdownTime"> border
<el-date-picker v-if="form.repairDestination == '立即维修'"
clearable >
v-model="form.orderBreakdownTime" <el-descriptions-item label="报修去向">{{
type="datetime" form.repairDestination
placeholder="选择日期时间" }}</el-descriptions-item>
disabled <el-descriptions-item label="维修组">{{
style="width: 195px" form.workTeam
> }}</el-descriptions-item>
</el-date-picker> <el-descriptions-item label="计划维修时间">{{
</el-form-item> form.workPlanTime
</el-col> }}</el-descriptions-item>
<el-col :span="8"> <el-descriptions-item label="是否停机维修">{{
<el-form-item label="报修来源" prop="orderSource"> form.workDownMachine
<el-select }}</el-descriptions-item>
v-model="form.orderSource" <el-descriptions-item label="计划停机时间">{{
style="width: 195px" form.workPlanDownTime
disabled }}</el-descriptions-item>
> </el-descriptions>
<el-option
v-for="dict in dict.type.device_order_source" <el-descriptions
:key="dict.value" :column="1"
:label="dict.label" border
:value="dict.value" v-if="form.repairDestination == '不维修'"
></el-option> >
</el-select> <el-descriptions-item label="报修去向">{{
</el-form-item> form.repairDestination
</el-col> }}</el-descriptions-item>
<el-col :span="8"> </el-descriptions>
<el-form-item label="报修时间" prop="orderTime">
<el-date-picker <el-descriptions
clearable :column="2"
v-model="form.orderTime" border
type="datetime" v-if="form.repairDestination == '委外维修'"
disabled >
style="width: 195px" <el-descriptions-item label="报修去向">{{
placeholder="报修时间" form.repairDestination
> }}</el-descriptions-item>
</el-date-picker> <el-descriptions-item label="委外单位">{{
</el-form-item> form.workOutsourcingUnit
</el-col> }}</el-descriptions-item>
</el-row> <el-descriptions-item label="委外人员">{{
<el-row :gutter="10" class="mb8"> form.outSourcePerson
<el-col :span="8"> }}</el-descriptions-item>
<el-form-item label="报修人编号" prop="orderRepairmanCode"> <el-descriptions-item label="委外联系方式">{{
<el-input form.workConnection
v-model="form.orderRepairmanCode" }}</el-descriptions-item>
placeholder="请输入报修人编号" </el-descriptions>
disabled <el-descriptions :column="2"
style="width: 195px" border
/> v-if="form.repairDestination == '委外维修'">
</el-form-item> <el-descriptions-item label="委外原因">{{
</el-col> form.outSourceReason
<el-col :span="8"> }}</el-descriptions-item>
<el-form-item label="联系方式" prop="orderConnection"> </el-descriptions>
<el-input </el-tab-pane>
v-model="form.orderConnection"
placeholder="请输入联系方式" <el-tab-pane label="检查项信息">
disabled <el-table :data="checkList" border style="width: 100%">
style="width: 195px" <el-table-column prop="itemName" label="检查项名称" width="150">
/> </el-table-column>
</el-form-item> <el-table-column prop="standardName" label="标准名称" width="180">
</el-col> </el-table-column>
</el-row> <el-table-column prop="standardType" label="标准类型" width="100">
<el-row> </el-table-column>
<el-form-item label="故障描述" prop="orderDesc"> <el-table-column prop="detailReach" label="是否达标" width="50">
<el-input </el-table-column>
v-model="form.orderDesc" <el-table-column prop="actualValue" label="实际值" width="50">
placeholder="请输入故障描述" </el-table-column>
type="textarea" <el-table-column prop="detailUpLimit" label="上限" width="50">
:autosize="{ minRows: 2, maxRows: 4 }" </el-table-column>
disabled <el-table-column prop="detailDownLimit" label="下限" width="50">
/> </el-table-column>
</el-form-item> <el-table-column prop="detailUnit" label="单位" width="50">
</el-row> </el-table-column>
<el-form-item label="故障图片" prop="orderPicture"> <el-table-column prop="detailUnit" label="故障图片">
<el-input v-model="form.orderPicture" placeholder="请输入故障图片" /> </el-table-column>
</el-form-item> </el-table>
<el-divider>报修信息审核</el-divider> </el-tab-pane>
<el-row> </el-tabs>
<el-col :span="24">
<el-form-item label="报修去向" prop="repairDestination">
<el-radio-group v-model="form.repairDestination">
<el-radio label="计划性维修">计划性维修</el-radio>
<el-radio label="不维修">不维修</el-radio>
<el-radio label="委外维修">委外维修</el-radio>
<el-radio label="立即维修" @click="timeBackFilling"
>立即维修</el-radio
>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" v-if="form.repairDestination == '计划性维修'">
<el-form-item prop="workTeam" label="维修组">
<el-input v-model="form.workTeam" disabled />
</el-form-item>
</el-col>
<el-col :span="8" v-if="form.repairDestination == '计划性维修'">
<el-form-item prop="workPlanTime" label="计划维修时间">
<el-date-picker
clearable
v-model="form.workPlanTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
disabled
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" v-if="form.repairDestination == '计划性维修'">
<el-form-item label="是否停机维修" prop="workDownMachine">
<el-radio-group v-model="form.workDownMachine">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col
:span="8"
v-if="
form.repairDestination == '计划性维修' &&
form.workDownMachine == '1'
"
>
<el-form-item prop="workPlanDownTime" label="计划停机时间">
<el-date-picker
clearable
v-model="form.workPlanDownTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
disabled
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span="8"
v-if="
form.repairDestination == '计划性维修' &&
form.workDownMachine == '0'
"
>
<el-form-item prop="workPlanDownTime" label="计划停机时间">
<el-date-picker
clearable
v-model="form.workPlanDownTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
disabled
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" v-if="form.repairDestination == '立即维修'">
<el-form-item prop="workTeam" label="维修组">
<el-input v-model="form.workTeam" disabled />
</el-form-item>
</el-col>
<el-col :span="8" v-if="form.repairDestination == '立即维修'">
<el-form-item prop="workPlanTime" label="计划维修时间">
<el-date-picker
clearable
v-model="form.workPlanTime"
type="datetime"
disabled
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" v-if="form.repairDestination == '立即维修'">
<el-form-item label="是否停机维修" prop="workDownMachine">
<el-radio-group v-model="form.workDownMachine">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col
:span="8"
v-if="
form.repairDestination == '立即维修' &&
form.workDownMachine == '1'
"
>
<el-form-item prop="workPlanDownTime" label="计划停机时间">
<el-date-picker
clearable
v-model="form.workPlanDownTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
disabled
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span="8"
v-if="
form.repairDestination == '立即维修' &&
form.workDownMachine == '0'
"
>
<el-form-item prop="workPlanDownTime" label="计划停机时间">
<el-date-picker
clearable
v-model="form.workPlanDownTime"
type="datetime"
disabled
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" v-if="form.repairDestination == '委外维修'">
<el-form-item prop="workOutsourcingUnit" label="委外单位">
<el-input v-model="form.workOutsourcingUnit" disabled />
</el-form-item>
</el-col>
<el-col :span="8" v-if="form.repairDestination == '委外维修'">
<el-form-item prop="outSourcePerson" label="委外维修人员">
<el-input v-model="form.outSourcePerson" disabled />
</el-form-item>
</el-col>
<el-col :span="8" v-if="form.repairDestination == '委外维修'">
<el-form-item prop="workConnection" label="联系方式">
<el-input v-model="form.workConnection" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24" v-if="form.repairDestination == '委外维修'">
<el-form-item prop="outSourceReason" label="委外原因">
<el-input
v-model="form.outSourceReason"
disabled
type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }"
/>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancelCheckForm"> </el-button> <el-button @click="cancelCheckForm"> </el-button>
@ -1167,40 +919,36 @@
}}</el-descriptions-item> }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="1" border> <el-descriptions :column="1" border>
<el-descriptions-item label="故障图片"> <el-descriptions-item label="故障图片">
<el-image v-for="(item, index) in urlLists" :key="index":src="item"></el-image></el-descriptions-item> <el-image
v-for="(item, index) in urlLists"
:key="index"
:src="item"
></el-image
></el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="检查项信息"> <el-tab-pane label="检查项信息">
<el-table :data="checkList" border style="width: 100%"> <el-table :data="checkList" border style="width: 100%">
<el-table-column prop="itemName" label="检查项名称" width="150"> <el-table-column prop="itemName" label="检查项名称" width="150">
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="standardName" label="标准名称" width="180">
prop="standardName" </el-table-column>
label="标准名称" <el-table-column prop="standardType" label="标准类型" width="100">
width="180" </el-table-column>
> <el-table-column prop="detailReach" label="是否达标" width="50">
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="actualValue" label="实际值" width="50">
prop="standardType" </el-table-column>
label="标准类型" <el-table-column prop="detailUpLimit" label="上限" width="50">
width="100" </el-table-column>
> <el-table-column prop="detailDownLimit" label="下限" width="50">
</el-table-column> </el-table-column>
<el-table-column prop="detailReach" label="是否达标" width="50"> <el-table-column prop="detailUnit" label="单位" width="50">
</el-table-column> </el-table-column>
<el-table-column prop="actualValue" label="实际值" width="50"> <el-table-column prop="detailUnit" label="故障图片">
</el-table-column> </el-table-column>
<el-table-column prop="detailUpLimit" label="上限" width="50"> </el-table>
</el-table-column>
<el-table-column prop="detailDownLimit" label="下限" width="50">
</el-table-column>
<el-table-column prop="detailUnit" label="单位" width="50">
</el-table-column>
<el-table-column prop="detailUnit" label="故障图片">
</el-table-column>
</el-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-form> </el-form>
@ -1224,6 +972,7 @@ import {
import ItemSelect from "./selectSingleEquipment.vue"; import ItemSelect from "./selectSingleEquipment.vue";
import ItemSelectPerson from "./selectSinglePerson.vue"; import ItemSelectPerson from "./selectSinglePerson.vue";
import { Message } from "element-ui"; import { Message } from "element-ui";
import { getMaintenanceTeamList } from "@/api/device/equTeam";
export default { export default {
name: "FaultReport", name: "FaultReport",
@ -1231,6 +980,8 @@ export default {
dicts: ["device_order_source"], dicts: ["device_order_source"],
data() { data() {
return { return {
//
teamOption: [],
// //
fileList: [], fileList: [],
// //
@ -1252,7 +1003,7 @@ export default {
// //
checkList: [], checkList: [],
//url //url
urlLists:[], urlLists: [],
// //
title: "", title: "",
// //
@ -1363,9 +1114,6 @@ export default {
orderTime: [ orderTime: [
{ required: true, message: "报修时间不能为空", trigger: "blur" }, { required: true, message: "报修时间不能为空", trigger: "blur" },
], ],
orderRepairmanCode: [
{ required: true, message: "报修人编号不能为空", trigger: "blur" },
],
orderDesc: [ orderDesc: [
{ required: true, message: "故障描述不能为空", trigger: "blur" }, { required: true, message: "故障描述不能为空", trigger: "blur" },
], ],
@ -1379,9 +1127,26 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
timeBackFilling() { timeBackFilling() {
this.form.workPlanTime = new Date(); var getTime = new Date().getTime(); //
log("时间时间", new Date()); var time = new Date(getTime); //
function nowDate(time) {
var year = time.getFullYear(); //
var month = (time.getMonth() + 1).toString().padStart(2, '0'); //
var date = time.getDate().toString().padStart(2, '0'); //
var hour = time.getHours().toString().padStart(2, '0'); //
var minute = time.getMinutes().toString().padStart(2, '0'); //
var second = time.getSeconds().toString().padStart(2, '0'); //
return (
year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second
)
}
console.log(time);
console.log(nowDate(time));
this.form.workPlanTime = nowDate(time);
}, },
// //
handleSelectEquipment() { handleSelectEquipment() {
@ -1393,7 +1158,7 @@ export default {
}, },
// //
onItemSelectedPerson(obj) { onItemSelectedPerson(obj) {
console.log("接收参数", obj); console.log("111111111111", obj);
this.form.orderRepairmanCode = obj[0].userName; this.form.orderRepairmanCode = obj[0].userName;
this.form.orderRepairmanName = obj[0].nickName; this.form.orderRepairmanName = obj[0].nickName;
}, },
@ -1507,10 +1272,10 @@ export default {
this.form.fileList = newFiles; this.form.fileList = newFiles;
var urlLists = []; var urlLists = [];
this.form.fileList.forEach((item) => { this.form.fileList.forEach((item) => {
urlLists.push(item.url); urlLists.push(item.url);
}); });
this.urlLists = urlLists ; this.urlLists = urlLists;
console.log("2222222222",this.urlLists) console.log("2222222222", this.urlLists);
} }
this.checkList = response.data.checkList; this.checkList = response.data.checkList;
// //
@ -1540,6 +1305,10 @@ export default {
handleCheck(row) { handleCheck(row) {
this.reset(); this.reset();
const orderId = row.orderId || this.ids; const orderId = row.orderId || this.ids;
getMaintenanceTeamList(this.queryParams).then((response) => {
console.log(response.rows);
this.teamOption = response.rows;
});
getFaultReport(orderId).then((response) => { getFaultReport(orderId).then((response) => {
if (response.data.files != null) { if (response.data.files != null) {
var newFiles = []; var newFiles = [];

@ -88,12 +88,12 @@
style="width: 200px" style="width: 200px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
> >
<el-option <el-option
v-for="dict in dict.type.device_repair_status" v-for="dict in dict.type.device_repair_status"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否委外" prop="workOutsource"> <el-form-item label="是否委外" prop="workOutsource">
@ -132,22 +132,24 @@
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions"> :picker-options="pickerOptions"
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="计划停机时间" prop="workPlanDownTime"> <el-form-item label="计划停机时间" prop="workPlanDownTime">
<el-date-picker <el-date-picker
clearable clearable
v-model="queryParams.workPlanDownTimeArray" v-model="queryParams.workPlanDownTimeArray"
type="daterange" type="daterange"
align="right" align="right"
unlink-panels unlink-panels
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions"> :picker-options="pickerOptions"
</el-date-picker> >
</el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
@ -296,9 +298,24 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="维修人员" align="center" prop="workPerson" /> <el-table-column label="维修人员" align="center" prop="workPerson" />
<el-table-column label="维修组编码" align="center" prop="workTeam" width="100"/> <el-table-column
<el-table-column label="维修组名称" align="center" prop="teamName" width="100"/> label="维修组编码"
<el-table-column label="维修组人员" align="center" prop="teamPerson" width="300"/> align="center"
prop="workTeam"
width="100"
/>
<el-table-column
label="维修组名称"
align="center"
prop="teamName"
width="100"
/>
<el-table-column
label="维修组人员"
align="center"
prop="teamPerson"
width="300"
/>
<el-table-column label="是否委外" align="center" prop="workOutsource"> <el-table-column label="是否委外" align="center" prop="workOutsource">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.workOutsource == "1" ? "转委外" : "不委外" }} {{ scope.row.workOutsource == "1" ? "转委外" : "不委外" }}
@ -340,20 +357,22 @@
label="维修用时" label="维修用时"
align="center" align="center"
prop="workCostTime" prop="workCostTime"
width="180" width="200"
> >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.workCostTime) }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column label="维修费用" align="center" prop="workCost" /> <el-table-column label="维修费用" align="center" prop="workCost" />
<el-table-column label="维修状态" align="center" prop="workStatus" width="150"> <el-table-column
<template slot-scope="scope"> label="维修状态"
<dict-tag align="center"
:options="dict.type.device_repair_status" prop="workStatus"
:value="scope.row.workStatus" width="150"
/> >
</template> <template slot-scope="scope">
<dict-tag
:options="dict.type.device_repair_status"
:value="scope.row.workStatus"
/>
</template>
</el-table-column> </el-table-column>
<el-table-column label="工厂编码" align="center" prop="factoryCode" /> <el-table-column label="工厂编码" align="center" prop="factoryCode" />
<el-table-column <el-table-column
@ -431,7 +450,11 @@
<el-radio label="0"></el-radio> <el-radio label="0"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="计划停机时间" prop="workPlanDownTime" v-if="form.workDownMachine == '1' "> <el-form-item
label="计划停机时间"
prop="workPlanDownTime"
v-if="form.workDownMachine == '1'"
>
<el-date-picker <el-date-picker
clearable clearable
v-model="form.workPlanDownTime" v-model="form.workPlanDownTime"
@ -535,7 +558,11 @@
<el-radio label="0"></el-radio> <el-radio label="0"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="计划停机时间" prop="workPlanDownTime" v-if="form.workDownMachine == '1' "> <el-form-item
label="计划停机时间"
prop="workPlanDownTime"
v-if="form.workDownMachine == '1'"
>
<el-date-picker <el-date-picker
clearable clearable
v-model="form.workPlanDownTime" v-model="form.workPlanDownTime"
@ -659,86 +686,40 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="workOutsourcingUnit" label="委外单位" v-if="form.outWorkCode == null"> <el-form-item prop="workOutsourcingUnit" label="委外单位">
<el-input
v-model="form.workOutsourcingUnit"
placeholder="请填写委外单位"
style="width: 195px"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="outSourcePerson" label="委外维修人员" v-if="form.outWorkCode == null">
<el-input
v-model="form.outSourcePerson"
placeholder="请填写委外维修人员"
style="width: 195px"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="workConnection" label="联系方式" v-if="form.outWorkCode == null">
<el-input
v-model="form.workConnection"
placeholder="请填写委外联系方式"
style="width: 195px"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item prop="outSourceReason" label="委外原因" v-if="form.outWorkCode == null">
<el-input
v-model="form.outSourceReason"
placeholder="请输入委外原因"
type="textarea"
style="width: 840px"
:autosize="{ minRows: 2, maxRows: 4 }"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item prop="workOutsourcingUnit" label="委外单位" v-if="form.outWorkCode != null">
<el-input <el-input
v-model="form.workOutsourcingUnit" v-model="form.workOutsourcingUnit"
placeholder="请填写委外单位" placeholder="请填写委外单位"
style="width: 195px" style="width: 195px"
disabled
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="outSourcePerson" label="委外维修人员" v-if="form.outWorkCode != null"> <el-form-item prop="outSourcePerson" label="委外维修人员">
<el-input <el-input
v-model="form.outSourcePerson" v-model="form.outSourcePerson"
placeholder="请填写委外维修人员" placeholder="请填写委外维修人员"
style="width: 195px" style="width: 195px"
disabled
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="workConnection" label="联系方式" v-if="form.outWorkCode != null"> <el-form-item prop="workConnection" label="联系方式">
<el-input <el-input
v-model="form.workConnection" v-model="form.workConnection"
placeholder="请填写委外联系方式" placeholder="请填写委外联系方式"
style="width: 195px" style="width: 195px"
disabled
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item prop="outSourceReason" label="委外原因" v-if="form.outWorkCode != null"> <el-form-item prop="outSourceReason" label="委外原因">
<el-input <el-input
v-model="form.outSourceReason" v-model="form.outSourceReason"
placeholder="请输入委外原因" placeholder="请输入委外原因"
type="textarea" type="textarea"
disabled
style="width: 840px" style="width: 840px"
:autosize="{ minRows: 2, maxRows: 4 }" :autosize="{ minRows: 2, maxRows: 4 }"
/> />
@ -760,292 +741,236 @@
append-to-body append-to-body
> >
<el-form ref="form" :model="form" :rules="rules" label-width="90px"> <el-form ref="form" :model="form" :rules="rules" label-width="90px">
<div class="step-margin"> <el-tabs type="border-card">
<el-steps <el-tab-pane label="维修基本信息">
:active="repairRecordSteps" <el-descriptions :column="2" border>
finish-status="success" <el-descriptions-item label="维修工单号">{{
align-center form.workCode
> }}</el-descriptions-item>
<el-step title="维修基本信息"></el-step> <el-descriptions-item label="报修单号">{{
<el-step title="填写处理结果"></el-step> form.workCode
<el-step title="填写备件领用记录"></el-step> }}</el-descriptions-item>
</el-steps> <el-descriptions-item label="设备编号">{{
</div> form.equipmentCode
<!-- 维修基本信息 --> }}</el-descriptions-item>
<div v-if="this.repairRecordSteps == 0"> <el-descriptions-item label="设备名称">{{
<div class="classification"><h3>基本信息</h3></div> form.equipmentName
<el-row :gutter="10" class="mb8"> }}</el-descriptions-item>
<el-col :span="8"> <el-descriptions-item label="设备类型">{{
<el-form-item label="设备编码" prop="equipmentCode"> form.equipmentTypeName
<el-input }}</el-descriptions-item>
v-model="form.equipmentCode" <el-descriptions-item label="设备位置">{{
style="width: 195px" form.equipmentLocation
disabled }}</el-descriptions-item>
> <el-descriptions-item label="工作中心编码">{{
</el-input> form.workshopCode
</el-form-item> }}</el-descriptions-item>
</el-col> <el-descriptions-item label="工作中心名称">{{
<el-col :span="8"> form.workshopName
<el-form-item label="设备名称" prop="equipmentName"> }}</el-descriptions-item>
<el-input <el-descriptions-item label="报修来源">{{
v-model="form.equipmentName" form.orderSource
style="width: 195px" }}</el-descriptions-item>
disabled <el-descriptions-item label="报修时间">{{
> form.orderTime
</el-input> }}</el-descriptions-item>
</el-form-item> <el-descriptions-item label="报修人名字">{{
</el-col> form.orderRepairmanName
<el-col :span="8"> }}</el-descriptions-item>
<el-form-item label="设备类型" prop="equipmentTypeName"> <el-descriptions-item label="联系方式">{{
<el-input form.orderConnection
v-model="form.equipmentTypeName" }}</el-descriptions-item>
style="width: 195px" <el-descriptions-item label="是否立即处理">{{
disabled form.workHandle ? "否" : "是"
> }}</el-descriptions-item>
</el-input> <el-descriptions-item label="计划维修时间">{{
</el-form-item> form.workPlanTime
</el-col> }}</el-descriptions-item>
</el-row> <el-descriptions-item label="是否停机维修">{{
<el-row :gutter="10" class="mb8"> form.workDownMachine ? "否" : "是"
<el-col :span="8"> }}</el-descriptions-item>
<el-form-item label="规格型号" prop="equipmentSpec"> <el-descriptions-item label="计划停机时间">{{
<el-input form.workPlanDownTime
v-model="form.equipmentSpec" }}</el-descriptions-item>
style="width: 195px" <el-descriptions-item label="是否委外">{{
disabled form.workOutsource ? "否" : "是"
> }}</el-descriptions-item>
</el-input> <el-descriptions-item label="维修班组">{{
</el-form-item> form.workTeam
</el-col> }}</el-descriptions-item>
<el-col :span="8"> <el-descriptions-item label="维修班组人员">{{
<el-form-item label="所在部门" prop="department"> form.workTeamPerson
<el-input }}</el-descriptions-item>
v-model="form.department" <el-descriptions-item label="故障描述">{{
style="width: 195px" form.orderDesc
disabled }}</el-descriptions-item>
> </el-descriptions>
</el-input> <el-descriptions :column="1" border>
</el-form-item> <el-descriptions-item label="维修前故障图片">
</el-col> <el-image
<el-col :span="8"> v-for="(item, index) in urlBeforeLists"
<el-form-item label="所在位置" prop="equipmentLocation"> :key="index"
<el-input :src="item"
v-model="form.equipmentLocation" ></el-image
style="width: 195px" ></el-descriptions-item>
disabled
> </el-descriptions>
</el-input> </el-tab-pane>
</el-form-item> <el-tab-pane label="检查项信息">
</el-col> <el-table :data="detailList" border style="width: 100%">
</el-row> <el-table-column prop="itemName" label="检查项名称" width="150">
<div class="classification"><h3>故障信息</h3></div> </el-table-column>
<el-row :gutter="10" class="mb8"> <el-table-column prop="standardName" label="标准名称" width="180">
<el-col :span="8"> </el-table-column>
<el-form-item label="报修单号" prop="orderCode"> <el-table-column prop="standardType" label="标准类型" width="100">
<el-input </el-table-column>
v-model="form.orderCode" <el-table-column prop="detailReach" label="是否达标" width="50">
style="width: 195px" </el-table-column>
disabled <el-table-column prop="actualValue" label="实际值" width="50">
/> </el-table-column>
</el-form-item> <el-table-column prop="detailUpLimit" label="上限" width="50">
</el-col> </el-table-column>
<el-col :span="8"> <el-table-column prop="detailDownLimit" label="下限" width="50">
<el-form-item label="维修单号" prop="orderCode"> </el-table-column>
<el-input <el-table-column prop="detailUnit" label="单位" width="50">
v-model="form.workCode" </el-table-column>
style="width: 195px" <el-table-column prop="detailUnit" label="故障图片">
disabled </el-table-column>
/> </el-table>
</el-form-item> </el-tab-pane>
</el-col>
<el-col :span="8">
<el-form-item label="故障时间" prop="orderBreakdownTime">
<el-input
v-model="form.orderBreakdownTime"
style="width: 195px"
disabled
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="8">
<el-form-item label="报修时间" prop="orderTime">
<el-input
v-model="form.orderTime"
style="width: 195px"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="报修人" prop="orderRepairman">
<el-input
v-model="form.orderRepairman"
style="width: 195px"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="联系方式" prop="orderConnection">
<el-input
v-model="form.orderConnection"
style="width: 195px"
disabled
/>
</el-form-item>
</el-col>
</el-row>
<el-col :span="23">
<el-form-item label="故障描述" prop="orderDesc">
<el-input
v-model="form.orderDesc"
placeholder="请输入故障描述"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }"
style="width: 840px"
disabled
/>
</el-form-item>
</el-col>
</div>
<!-- 处理结果 -->
<div v-if="this.repairRecordSteps == 1" class="step-body" @mousemove = "handleMouseout">
<el-row :gutter="10" class="mb8">
<el-col :span="24">
<el-form-item label="原因分析" prop="workReason">
<el-input
v-model="form.workReason"
placeholder="请输入故障原因分析"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }"
style="width: 840px"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="8">
<el-form-item label="维修人" prop="workPerson">
<el-input
v-model="form.workPerson"
placeholder="请选择维修人"
style="width: 195px"
>
<el-button
slot="append"
@click="handleSelectPerson"
icon="el-icon-search"
></el-button>
</el-input>
<ItemSelectPerson
ref="itemSelectPerson"
@onSelected="onItemSelectedPerson"
>
</ItemSelectPerson>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="维修状态" prop="workStatus">
<el-select
v-model="queryParams.workStatus"
placeholder="请选择维修状态"
@change="$forceUpdate()"
clearable
style="width: 195px"
@keyup.enter.native="handleQuery"
>
<el-option
v-for="dict in dict.type.device_repair_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="维修费用" prop="workCost">
<el-input-number
:min="0"
:step="1"
v-model="form.workCost"
style="width: 175px"
/>
<span> </span>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="8">
<el-form-item label="开始时间" prop="workStartTime">
<el-date-picker
clearable
v-model="form.workStartTime"
type="datetime"
style="width: 195px"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择开始维修时间"
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="结束时间" prop="workEndTime">
<el-date-picker
clearable
v-model="form.workEndTime"
type="datetime"
style="width: 195px"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择结束维修时间"
></el-date-picker> <el-tab-pane label="填写维修记录" >
</el-form-item> <el-row :gutter="10" class="mb8">
</el-col> <el-col :span="8">
<el-col :span="8"> <el-form-item label="维修人" prop="workPerson">
<el-form-item label="维修用时" prop="workCostTime"> <el-input
<el-input v-model="form.workCostTime" style="width: 195px" > v-model="form.workPerson"
</el-input> placeholder="请选择维修人"
</el-form-item> style="width: 195px"
</el-col> >
</el-row> <el-button
<el-row :gutter="10" class="mb8"> slot="append"
<el-col :span="8"> @click="handleSelectPerson"
<el-form-item label="是否停机" prop="workDownMachine"> icon="el-icon-search"
<el-radio-group v-model="form.workDownMachine"> ></el-button>
<el-radio label="1"></el-radio> </el-input>
<el-radio label="0"></el-radio> <ItemSelectPerson
</el-radio-group> ref="itemSelectPerson"
</el-form-item> @onSelected="onItemSelectedPerson"
</el-col> >
<el-col :span="8"> </ItemSelectPerson>
<el-form-item label="停机时长" prop="orderBreakdownTime"> </el-form-item>
<el-input </el-col>
v-model="form.orderBreakdownTime" <el-col :span="8">
style="width: 195px" <el-form-item label="维修状态" prop="workStatus">
/> <el-select
</el-form-item> v-model="queryParams.workStatus"
</el-col> placeholder="请选择维修状态"
</el-row> style="width: 195px"
</div> >
<!-- 使用备件领用记录 --> <el-option
<div v-if="this.repairRecordSteps == 2" class="step-body"> v-for="dict in dict.type.device_repair_status"
<ItemSelectSpareParts :optType="optType" :workCode="form.workCode" :equipmentCode="form.equipmentCode" v-if="form.workCode !=null"></ItemSelectSpareParts> :key="dict.value"
</div> :label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="维修费用" prop="workCost">
<el-input-number
:min="0"
:step="1"
v-model="form.workCost"
style="width: 175px"
/>
<span> </span>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="8">
<el-form-item label="开始时间" prop="workStartTime">
<el-date-picker
clearable
v-model="form.workStartTime"
type="datetime"
style="width: 195px"
value-format="yyyy-MM-dd HH:mm:ss"
@change="listening"
placeholder="请选择开始维修时间"
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="结束时间" prop="workEndTime" >
<el-date-picker
clearable
v-model="form.workEndTime"
type="datetime"
style="width: 195px"
@change="listening"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择结束维修时间"
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="维修用时" prop="workCostTime">
<el-input v-model="form.workCostTime" style="width: 195px">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="8">
<el-form-item label="是否停机" prop="workDownMachine">
<el-radio-group v-model="form.workDownMachine">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="停机时长" prop="orderBreakdownTime">
<el-input
v-model="form.orderBreakdownTime"
style="width: 195px"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="24">
<el-form-item label="原因分析" prop="workReason">
<el-input
v-model="form.workReason"
placeholder="请输入故障原因分析"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }"
style="width: 840px"
/>
</el-form-item>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="填写备件申领记录">
<!-- 使用备件领用记录 -->
<ItemSelectSpareParts
:optType="optType"
:workCode="form.workCode"
:equipmentCode="form.equipmentCode"
v-if="form.workCode != null"
></ItemSelectSpareParts>
</el-tab-pane>
</el-tabs>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button v-if="this.repairRecordSteps > 0" @click="stepLast"
>上一步</el-button
>
<el-button v-if="this.repairRecordSteps < 2" @click="stepNext"
>下一步</el-button
>
<el-button <el-button
v-if="this.repairRecordSteps == 2"
type="primary" type="primary"
@click="submitForm" @click="submitWriteForm"
> </el-button > </el-button
> >
<el-button @click="cancelWriteForm"> </el-button> <el-button @click="cancelWriteForm"> </el-button>
@ -1069,6 +994,7 @@ import ItemSelect from "./selectSingleEquipment.vue";
import ItemSelectPerson from "./selectSinglePerson.vue"; import ItemSelectPerson from "./selectSinglePerson.vue";
import { Message } from "element-ui"; import { Message } from "element-ui";
import ItemSelectSpareParts from "./selectSpareParts.vue"; import ItemSelectSpareParts from "./selectSpareParts.vue";
import moment from 'moment';
export default { export default {
name: " RepairOrder", name: " RepairOrder",
@ -1079,8 +1005,6 @@ export default {
// //
teamOption: [], teamOption: [],
optType: undefined, optType: undefined,
//
repairRecordSteps: 0,
// //
loading: true, loading: true,
// //
@ -1201,20 +1125,17 @@ export default {
}, },
methods: { methods: {
// - // -
handleMouseout(){ listening() {
console.log("打印维修时间") if (this.form.workEndTime != null && this.form.workStartTime != null) {
if(this.form.workEndTime != null && this.form.workStartTime != null){ var time1 = moment(this.form.workStartTime);
this.form.workCostTime = this.form.workEndTime - this.form.workStartTime; var time2 = moment(this.form.workEndTime);
let duration = moment.duration(time2.diff(time1));
let { _data } = duration;
console.log("打印维修时间",_data);
//
this.form.workCostTime = _data.years + "年" + _data.months + "月" + _data.days + "日" + _data.hours + "小时" + _data.minutes + "分" + _data.seconds + "秒";
} }
}, },
//
stepLast() {
this.repairRecordSteps--;
},
//
stepNext() {
this.repairRecordSteps++;
},
/** 查询维修工单列表 */ /** 查询维修工单列表 */
getList() { getList() {
this.loading = true; this.loading = true;
@ -1382,8 +1303,9 @@ export default {
if (valid) { if (valid) {
if (this.form.workId != null) { if (this.form.workId != null) {
writeRepairOrder(this.form).then((response) => { writeRepairOrder(this.form).then((response) => {
this.$modal.msgSuccess("填写维修记录成功!");
this.openWrite = false; this.openWrite = false;
this.$modal.msgSuccess("填写维修记录成功!");
this.queryParams.workStatus = null;
this.getList(); this.getList();
}); });
} }
@ -1400,7 +1322,8 @@ export default {
}, },
// //
onItemSelectedPerson(obj) { onItemSelectedPerson(obj) {
this.form.workPerson = obj; console.log(obj);
this.form.workPerson = obj[0].userName;
}, },
// //
onItemSelectedEquipment(obj) { onItemSelectedEquipment(obj) {

@ -5,7 +5,7 @@
:modal= false :modal= false
width="800px" width="800px"
center center
:before-close="cancelEquipmentForm" :before-close="cancel"
> >
<el-row :gutter="20"> <el-row :gutter="20">
<!--人员数据--> <!--人员数据-->
@ -34,14 +34,13 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table v-loading="loading" :data="itemList" @selection-change="handleEquipmentSelectionChange" ref="myTable"> <el-table v-loading="loading" :data="itemList" @selection-change="handleSelectionChange" ref="multipleTable">
<el-table-column width="50" align="center" type="selection"></el-table-column> <el-table-column width="50" align="center" type="selection"></el-table-column>
<!-- 序号 --> <!-- 序号 -->
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column> <el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column>
<el-table-column label="人员编码" align="center" key="itemCode" prop="userName" v-if="columns[0].visible" ></el-table-column> <el-table-column label="人员编码" align="center" key="itemCode" prop="userName" v-if="columns[0].visible" >
</el-table-column>
<el-table-column label="人员名称" align="left" key="itemName" prop="nickName" v-if="columns[1].visible" :show-overflow-tooltip="true" /> <el-table-column label="人员名称" align="left" key="itemName" prop="nickName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
<el-table-column label="部门编码" align="center" prop="postCode" v-if="columns[2].visible" ></el-table-column>
<el-table-column label="部门名称" align="center" prop="postName" v-if="columns[3].visible" ></el-table-column>
</el-table> </el-table>
<pagination <pagination
@ -54,14 +53,14 @@
</el-col> </el-col>
</el-row> </el-row>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitPersonForm"> </el-button> <el-button type="primary" @click="submitForm" :disabled="multiple"> </el-button>
<el-button @click="cancelEquipmentForm"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { getMaintenancePersonList} from "@/api/device/repairOrder"; import { getRepairPersonList} from "@/api/device/faultReport";
import { Message } from 'element-ui' import { Message } from 'element-ui'
export default { export default {
@ -95,8 +94,6 @@ export default {
columns: [ columns: [
{ key: 0, label: `人员编码`, visible: true }, { key: 0, label: `人员编码`, visible: true },
{ key: 1, label: `人员名称`, visible: true }, { key: 1, label: `人员名称`, visible: true },
{ key: 2, label: `部门编码`, visible: true },
{ key: 3, label: `部门名称`, visible: true },
] ]
}; };
}, },
@ -115,7 +112,7 @@ export default {
this.resetForm("form"); this.resetForm("form");
}, },
handleEquipmentSelectionChange (val) { handleSelectionChange (val) {
this.itemList = val; this.itemList = val;
}, },
@ -128,7 +125,7 @@ export default {
/** 查询设备编码列表*/ /** 查询设备编码列表*/
getList() { getList() {
this.loading = true; this.loading = true;
getMaintenancePersonList(this.queryParams).then(response => { getRepairPersonList(this.queryParams).then(response => {
this.itemList = response.rows; this.itemList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@ -136,14 +133,6 @@ export default {
); );
}, },
//
handleNodeClick(data) {
console.log('id',data.id);
this.queryParams.equipmentTypeCode = data.equipmentTypeCode;
console.log(this.equipmentTypeCode);
this.handleQuery();
},
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
@ -158,27 +147,21 @@ export default {
}, },
// //
handleEquipmentSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.userId); this.ids = selection.map(item => item.userId);
this.userCodes = selection.map(item => item.userNames); this.userCodes = selection.map(item => item.userName);
this.single = selection.length!==1; this.single = selection.length!==1;
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
submitPersonForm() { submitForm() {
const data = this.userNames; if(this.$refs.multipleTable.selection.length > 1){
const userCodes = data.toString();
if(data.length >1){
Message.warning("只能选择一个维修人,请勿选择多个!"); Message.warning("只能选择一个维修人,请勿选择多个!");
}else{ }else{
if(this.queryParams.itemCodeGet == ""){ console.log(this.$refs.multipleTable.selection);
this.queryParams.itemCodeGet = userCodes; this.$emit('onSelected', this.$refs.multipleTable.selection);
}
this.selectedRows = this.queryParams.itemCodeGet;
this.$emit('onSelected', this.selectedRows);
this.getList();
this.showFlag = false; this.showFlag = false;
this.queryParams.itemCodeGet = ""; this.getList();
} }
} }
} }

@ -185,6 +185,15 @@
<el-table v-loading="loading" :data="repairOrderList"> <el-table v-loading="loading" :data="repairOrderList">
<el-table-column width="55" align="center" border /> <el-table-column width="55" align="center" border />
<!-- 序号 -->
<el-table-column
type="index"
width="90"
align="center"
:index="indexMethod"
label="序号"
>
</el-table-column>
<el-table-column <el-table-column
label="维修单号" label="维修单号"
align="center" align="center"
@ -335,7 +344,7 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 修改维修工单对话框 --> <!-- 查看维修工单详情对话框 -->
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="openView" :visible.sync="openView"
@ -639,6 +648,10 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
//
indexMethod(index) {
return index + 1;
},
/** 查询维修工单列表 */ /** 查询维修工单列表 */
getList() { getList() {
this.loading = true; this.loading = true;

Loading…
Cancel
Save