ruanqi 4 years ago
parent
commit
fa4e453e00
  1. 12
      src/api/eam/eam.js
  2. 2
      src/assets/scss/index.scss
  3. 6
      src/assets/scss/rq.scss
  4. 2
      src/views/common/login.vue
  5. 417
      src/views/modules/eam/eamWorkOrderForCheck.vue
  6. 571
      src/views/modules/eam/eamWorkOrderForDefect.vue
  7. 193
      src/views/modules/eam/eamWorkOrderForMaintenance.vue
  8. 65
      src/views/modules/eam/eamWorkPlanForCheck.vue
  9. 77
      src/views/modules/eam/eamWorkPlanForMaintenance.vue
  10. 107
      src/views/modules/reportWorkOrder/reportCheckOrder.vue
  11. 479
      src/views/modules/reportWorkOrder/reportDefectOrder.vue
  12. 685
      src/views/modules/reportWorkOrder/reportMaintenanceOrder.vue

12
src/api/eam/eam.js

@ -104,8 +104,15 @@ export const createEamWorkOrder = data => createAPI(`/pms/eam/createEamWorkOrder
export const objectIDBlur = data => createAPI(`/pms/eam/objectIDBlur`,'post',data)
export const modalCodeBlur = data => createAPI(`/pms/eam/modalCodeBlur`,'post',data)
export const planOrder = data => createAPI(`/pms/eam/planOrder`,'post',data)
export const cancelPlan = data => createAPI(`/pms/eam/cancelPlan`,'post',data)
//---------------点检工单-------------------
export const eamWorkOrderSearch = data => createAPI(`/pms/eam/eamWorkOrderSearch`,'post',data)
export const cancelOrder= data => createAPI(`/pms/eam/cancelOrder`,'post',data)
export const eamWorkOrderReportSearch= data => createAPI(`/pms/eam/eamWorkOrderReportSearch`,'post',data)
export const eamWorkOrderSearchForDefect= data => createAPI(`/pms/eam/eamWorkOrderSearchForDefect`,'post',data)
//---------------故障-------------------
export const eamDefectSearch = data => createAPI(`/pms/eam/eamDefectSearch`,'post',data)
@ -129,3 +136,8 @@ export const getObjectList = data => createAPI(`/pms/eam/getObjectList`,'post',d
//---------------点检执行-------------------
export const eamWorkOrderItemSearch = data => createAPI(`/pms/eam/eamWorkOrderItemSearch`,'post',data)
export const saveCheckOrderReport = data => createAPI(`/pms/eam/saveCheckOrderReport`,'post',data)
export const changeOrderOperator = data => createAPI(`/pms/eam/changeOrderOperator`,'post',data)
export const saveOrderReportForDefect= data => createAPI(`/pms/eam/saveOrderReportForDefect`,'post',data)

2
src/assets/scss/index.scss

@ -2,3 +2,5 @@
@import "variables"; // 站点变量
@import "base";
@import "global";
@import "rq";

6
src/assets/scss/rq.scss

@ -37,9 +37,9 @@
font-size: 18px;
}
.el-table .cell, .el-table th div, .el-table--border td:first-child .cell, .el-table--border th:first-child .cell {
padding-left: 0px;
}
//.el-table .cell, .el-table th div, .el-table--border td:first-child .cell, .el-table--border th:first-child .cell {
// padding-left: 0px;
//}
.rq .el-table .cell {
line-height: 20px;
font-size: 12px;

2
src/views/common/login.vue

@ -76,7 +76,7 @@
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.$http({
url: this.$http.adornUrl('/api/sys/login'),
url: this.$http.adornUrl('/sys/login'),
method: 'post',
data: this.$http.adornData({
'username': this.dataForm.userName,

417
src/views/modules/eam/eamWorkOrderForCheck.vue

@ -43,7 +43,8 @@
</el-date-picker>
</el-form-item>
<el-form-item :label="' '">
<el-button @click="getDataList()">查询</el-button>
<el-button type="primary" @click="getDataList()">查询</el-button>
<el-button type="primary" @click="changeModel()">更改机修人员</el-button>
<!-- <el-button type="primary" @click="addModal()">新增</el-button>-->
</el-form-item>
</el-form>
@ -52,14 +53,15 @@
:data="dataList"
border
v-loading="dataListLoading"
@selection-change="selectionChangeHandle"
style="width: 100%;">
<!-- <el-table-column-->
<!-- type="selection"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="50">-->
<!-- </el-table-column>-->
<el-table-column
type="selection"
header-align="center"
align="center"
:selectable="selectFlag"
width="50">
</el-table-column>
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
@ -76,17 +78,17 @@
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- fixed="right"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="100"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <a type="text" size="small" @click="updateModal(scope.row)">修改</a>-->
<!-- <a type="text" size="small" @click="deleteGroup(scope.row)">删除</a>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
fixed="right"
header-align="center"
align="center"
width="100"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" v-if="scope.row.status=='已完工'" @click="reportModal(scope.row)">实测值</a>
<a type="text" size="small" v-if="scope.row.status=='未开工'" @click="cancelOrder(scope.row)">取消工单</a>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@ -97,6 +99,86 @@
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-dialog title="执行结果" :close-on-click-modal="false" v-drag :visible.sync="detailModelFlag" width="830px">
<el-form :inline="true" label-position="top" >
<el-form-item :label="'工厂编码'">
<el-input v-model="saveData.site" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'工单号'">
<el-input v-model="saveData.orderNo" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'计划执行人员'">
<el-input v-model="saveData.planOperatorName" disabled style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" >
<el-form-item :label="'工作时间'">
<el-input v-model="saveData.workTime" type="number" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'执行结果备注'">
<el-input v-model="saveData.remark" disabled style="width: 600px"></el-input>
</el-form-item>
</el-form>
<div class="rq ">
<el-table
:height="200"
:data="detailList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnDetailList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="right"
min-width="80"
label="实测值">
<template slot-scope="scope">
<el-input v-if="scope.row.valueTypeDb=='T'" v-model="scope.row.textValue" readonly style="height: 11px;padding: 0px " filterable
allow-create>;width:98%"></el-input>
<el-input v-if="scope.row.valueTypeDb=='N'" v-model="scope.row.numberValue" readonly style="height: 11px;padding: 0px " filterable
allow-create>;width:98%"></el-input>
</template>
</el-table-column>
</el-table>
</div>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="detailModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<el-dialog title="批量修改计划人员" :close-on-click-modal="false" v-drag :visible.sync="changeModelFlag" width="300px">
<el-form :inline="true" label-position="top" >
<el-form-item style="margin-left: 10px" >
<span slot="label" style="" @click="getBaseList(201)"><a herf="#">计划执行人员</a></span>
<el-input v-model="planOperator" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'人员名称'">
<el-input v-model="planOperatorName" disabled style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="changeOrderOperator()">保存</el-button>
<el-button type="primary" @click="changeModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
@ -104,9 +186,15 @@
<script>
import {
eamWorkOrderSearch,
eamWorkOrderReportSearch,
cancelOrder,
changeOrderOperator,
} from "@/api/eam/eam.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
export default {
components: {
Chooselist
},
watch: {
searchData: {
deep: true,
@ -124,7 +212,7 @@
},
data () {
return {
tagNo:'',
searchData: {
site: this.$store.state.user.site,
orderNo: '',
@ -230,6 +318,24 @@
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 101014,
serialNumber: '101014TablePropertiesCodeDesc',
tableId: "101014Table",
tableName: "common",
columnProp: 'codeDesc',
headerAlign: "center",
align: "left",
columnLabel: '模板名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 101014,
@ -248,6 +354,24 @@
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 101014,
serialNumber: '101014TableObjectDesc',
tableId: "101014Table",
tableName: "common",
columnProp: 'objectDesc',
headerAlign: "center",
align: "left",
columnLabel: '设备名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 101014,
@ -375,7 +499,147 @@
columnWidth: 150,
},
],
//
detailList:[],
detailModelFlag:false,
saveData:{
site:'',
orderNo:'',
planOperatorName:'',
workTime:'',
remark:'',
},
columnDetailList: [
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020Table2EamPropertiesItemID',
tableId: "101020Table2",
tableName: "点检项目表",
columnProp: 'itemNo',
headerAlign: "center",
align: "left",
columnLabel: '点检项目编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 90,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020Table2EamPropertiesItemDesc',
tableId: "101020Table2",
tableName: "点检项目表",
columnProp: 'itemDesc',
headerAlign: "center",
align: "left",
columnLabel: '点检项目名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 90,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020Table2EamPropertiesItemRemark',
tableId: "101020Table2",
tableName: "点检项目表",
columnProp: 'itemRemark',
headerAlign: "center",
align: "left",
columnLabel: '点检方法说明',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020Table2ValueType',
tableId: "101020Table2",
tableName: "点检项目表",
columnProp: 'valueType',
headerAlign: "center",
align: "left",
columnLabel: '检测值类型',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020Table2DefaultValue',
tableId: "101020Table2",
tableName: "点检项目表",
columnProp: 'defaultValue',
headerAlign: "center",
align: "left",
columnLabel: '参照值',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020Table2MaxValue',
tableId: "101020Table2",
tableName: "点检项目表",
columnProp: 'maxValue',
headerAlign: "center",
align: "left",
columnLabel: '最大值',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020Table2MinValue',
tableId: "101020Table2",
tableName: "点检项目表",
columnProp: 'minValue',
headerAlign: "center",
align: "left",
columnLabel: '最小值',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70,
},
],
changeModelFlag:false,
planOperator:'',
planOperatorName:'',
}
},
mounted () {
@ -387,6 +651,26 @@
this.getDataList()
},
methods: {
// S
getBaseList (val,type) {
this.tagNo = val
this.$nextTick(() => {
let strVal = ''
if (val === 201) {
strVal = this.planOperator
this.$refs.baseList.init(val, strVal)
}
})
},
/* 列表方法的回调 */
getBaseData (val) {
if (this.tagNo === 201) {
this.planOperator = val.AdminID
this.planOperatorName = val.AdminName
}
},
//
getDataList () {
this.searchData.limit = this.pageSize
@ -416,9 +700,96 @@
selectionChangeHandle (val) {
this.dataListSelections = val
},
reportModal(row){
let indata={
site:row.site,
itemNo:row.itemNo,
planID:row.planID,
orderNo:row.orderNo,
itemType:row.functionType,
}
eamWorkOrderReportSearch(indata).then(({data}) => {
this.detailList=data.rows
})
this.saveData={
site:row.site,
orderNo:row.orderNo,
planID:row.planID,
planOperatorName:row.planOperatorName,
workTime:row.workTime,
remark:row.remark,
},
this.detailModelFlag=true;
},
cancelOrder(row){
row.userId=this.$store.state.user.name;
this.$confirm(`是否取消选定工单?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
cancelOrder(row).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
},
selectFlag(row,index){
if(row.status!='未开工'){
return false;
}else {
return true;
}
},
changeModel(){
if(this.dataListSelections.length==0){
this.$alert('请勾选工单!', '错误', {
confirmButtonText: '确定'
})
return false
}
this.planOperator=''
this.planOperatorName=''
this.changeModelFlag=true;
},
changeOrderOperator(){
let inList=JSON.parse(JSON.stringify(this.dataListSelections));
for (let i = 0; i <inList.length ; i++) {
inList[i].planOperator=this.planOperator
}
changeOrderOperator(inList).then(({data}) => {
if (data && data.code === 0) {
this.changeModelFlag=false;
this.getDataList()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
}
}
</script>

571
src/views/modules/eam/eamWorkOrderForDefect.vue

@ -0,0 +1,571 @@
<template>
<div class="mod-config">
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
<el-form-item :label="'工单编码'">
<el-input v-model="searchData.orderNo" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'反馈单编码'">
<el-input v-model="searchData.planID" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'设备编码'">
<el-input v-model="searchData.objectID" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'计划执行人员编码'">
<el-input v-model="searchData.planOperator" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'状态'">
<el-select filterable v-model="searchData.status" style="width: 130px">
<el-option label="全部" value=""></el-option>
<el-option label="未开工" value="未开工"></el-option>
<el-option label="已完工" value="已完工"></el-option>
<el-option label="已取消" value="已取消"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="'计划执行日期:'">
<el-date-picker
style="width: 120px"
v-model="searchData.startDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item style="margin-top: 23px;">
<laber style="margin-left: -9px;font-size: 19px">&#10142</laber>
</el-form-item>
<el-form-item :label="' '">
<el-date-picker
style="width: 120px"
v-model="searchData.endDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item :label="' '">
<el-button @click="getDataList()">查询</el-button>
<el-button type="primary" @click="changeModel()">更改机修人员</el-button>
<!-- <el-button type="primary" @click="addModal()">新增</el-button>-->
</el-form-item>
</el-form>
<el-table
:height="height"
:data="dataList"
border
v-loading="dataListLoading"
@selection-change="selectionChangeHandle"
style="width: 100%;">
<el-table-column
type="selection"
header-align="center"
align="center"
:selectable="selectFlag"
width="50">
</el-table-column>
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="100"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" v-if="scope.row.status=='未开工'" @click="cancelOrder(scope.row)">取消工单</a>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[20, 100, 500, 1000]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-dialog title="批量修改计划人员" :close-on-click-modal="false" v-drag :visible.sync="changeModelFlag" width="300px">
<el-form :inline="true" label-position="top" >
<el-form-item style="margin-left: 10px" >
<span slot="label" style="" @click="getBaseList(201)"><a herf="#">计划执行人员</a></span>
<el-input v-model="planOperator" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'人员名称'">
<el-input v-model="planOperatorName" disabled style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="changeOrderOperator()">保存</el-button>
<el-button type="primary" @click="changeModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import {
eamWorkOrderSearchForDefect,
cancelOrder,
changeOrderOperator,
} from "@/api/eam/eam.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
export default {
components: {
Chooselist
},
watch: {
searchData: {
deep: true,
handler: function (newV, oldV) {
this.searchData.groupID = this.searchData.groupID.toUpperCase()
}
},
modalData: {
deep: true,
handler: function (newV, oldV) {
this.modalData.groupID = this.modalData.groupID.toUpperCase()
}
}
},
data () {
return {
tagNo:'',
searchData: {
site: this.$store.state.user.site,
orderNo: '',
planID: '',
objectID: '',
planOperator: '',
functionType: 'C',
status: '',
startDate:'',
endDate:'',
page: 1,
limit: 10,
},
height: 200,
pageIndex: 1,
pageSize: 100,
totalPage: 0,
dataList: [],
dataListLoading: false,
dataListSelections: [],
modalFlag:false,
modalDisableFlag:false,
modalData:{
flag:'',
site: this.$store.state.user.site,
groupID:'',
groupDesc:'',
active:'',
},
departmentList:[],
//
columnList: [
{
userId: this.$store.state.user.name,
functionId: 101018,
serialNumber: '101018TableSite',
tableId: "101018Table",
tableName: "common",
columnProp: 'site',
headerAlign: "center",
align: "left",
columnLabel: '工厂编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 101018,
serialNumber: '101018TableOrderNo',
tableId: "101018Table",
tableName: "common",
columnProp: 'orderNo',
headerAlign: "center",
align: "left",
columnLabel: '工单编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 101018,
serialNumber: '101018TablePlanID',
tableId: "101018Table",
tableName: "common",
columnProp: 'planID',
headerAlign: "center",
align: "left",
columnLabel: '计划编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140,
},
{
userId: this.$store.state.user.name,
functionId: 101018,
serialNumber: '101018TablePropertiesCode',
tableId: "101018Table",
tableName: "common",
columnProp: 'defectID',
headerAlign: "center",
align: "left",
columnLabel: '故障编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 101018,
serialNumber: '101018TablePropertiesCode',
tableId: "101018Table",
tableName: "common",
columnProp: 'defectDesc',
headerAlign: "center",
align: "left",
columnLabel: '故障名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 101018,
serialNumber: '101018TableObjectID',
tableId: "101018Table",
tableName: "common",
columnProp: 'objectID',
headerAlign: "center",
align: "left",
columnLabel: '设备编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 101018,
serialNumber: '101018TableStatus',
tableId: "101018Table",
tableName: "common",
columnProp: 'status',
headerAlign: "center",
align: "left",
columnLabel: '状态',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 101014,
serialNumber: '101014TableResult',
tableId: "101014Table",
tableName: "common",
columnProp: 'result',
headerAlign: "center",
align: "left",
columnLabel: '维修结果',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70,
},
{
userId: this.$store.state.user.name,
functionId: 101018,
serialNumber: '101018TablePlanOperatorName',
tableId: "101018Table",
tableName: "common",
columnProp: 'planOperatorName',
headerAlign: "center",
align: "left",
columnLabel: '计划机修人员',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 101018,
serialNumber: '101018TableActualOperatorName',
tableId: "101018Table",
tableName: "common",
columnProp: 'actualOperatorName',
headerAlign: "center",
align: "left",
columnLabel: '实际机修人员',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 101018,
serialNumber: '101018TableActualPlanDate',
tableId: "101018Table",
tableName: "common",
columnProp: 'planDate',
headerAlign: "center",
align: "left",
columnLabel: '计划执行日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130,
},
{
userId: this.$store.state.user.name,
functionId: 101018,
serialNumber: '101018TableActualActualDate',
tableId: "101018Table",
tableName: "common",
columnProp: 'actualDate',
headerAlign: "center",
align: "left",
columnLabel: '实际执行日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130,
},
{
userId: this.$store.state.user.name,
functionId: 101018,
serialNumber: '101018TableWorkTime',
tableId: "101018Table",
tableName: "common",
columnProp: 'workTime',
headerAlign: "center",
align: "left",
columnLabel: '工作时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60,
},
{
userId: this.$store.state.user.name,
functionId: 101018,
serialNumber: '101018TableActualRemark',
tableId: "101018Table",
tableName: "common",
columnProp: 'remark',
headerAlign: "center",
align: "left",
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 150,
},
],
changeModelFlag:false,
planOperator:'',
planOperatorName:'',
}
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 210
})
},
created () {
this.getDataList()
},
methods: {
// S
getBaseList (val,type) {
this.tagNo = val
this.$nextTick(() => {
let strVal = ''
if (val === 201) {
strVal = this.planOperator
this.$refs.baseList.init(val, strVal)
}
})
},
/* 列表方法的回调 */
getBaseData (val) {
if (this.tagNo === 201) {
this.planOperator = val.AdminID
this.planOperatorName = val.AdminName
}
},
//
getDataList () {
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
eamWorkOrderSearchForDefect(this.searchData).then(({data}) => {
if (data.code == 0) {
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
}
this.dataListLoading = false
})
},
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
//
selectionChangeHandle (val) {
this.dataListSelections = val
},
cancelOrder(row){
this.$confirm(`是否取消选定工单?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
cancelOrder(row).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
},
selectFlag(row,index){
if(row.status!='未开工'){
return false;
}else {
return true;
}
},
changeModel(){
if(this.dataListSelections.length==0){
this.$alert('请勾选工单!', '错误', {
confirmButtonText: '确定'
})
return false
}
this.planOperator=''
this.planOperatorName=''
this.changeModelFlag=true;
},
changeOrderOperator(){
let inList=JSON.parse(JSON.stringify(this.dataListSelections));
for (let i = 0; i <inList.length ; i++) {
inList[i].planOperator=this.planOperator
}
changeOrderOperator(inList).then(({data}) => {
if (data && data.code === 0) {
this.changeModelFlag=false;
this.getDataList()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
}
}
</script>

193
src/views/modules/eam/eamWorkOrderForMaintenance.vue

@ -44,6 +44,7 @@
</el-form-item>
<el-form-item :label="' '">
<el-button @click="getDataList()">查询</el-button>
<el-button type="primary" @click="changeModel()">更改机修人员</el-button>
<!-- <el-button type="primary" @click="addModal()">新增</el-button>-->
</el-form-item>
</el-form>
@ -52,14 +53,15 @@
:data="dataList"
border
v-loading="dataListLoading"
@selection-change="selectionChangeHandle"
style="width: 100%;">
<!-- <el-table-column-->
<!-- type="selection"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="50">-->
<!-- </el-table-column>-->
<el-table-column
type="selection"
header-align="center"
align="center"
:selectable="selectFlag"
width="50">
</el-table-column>
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
@ -76,17 +78,16 @@
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- fixed="right"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="100"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <a type="text" size="small" @click="updateModal(scope.row)">修改</a>-->
<!-- <a type="text" size="small" @click="deleteGroup(scope.row)">删除</a>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
fixed="right"
header-align="center"
align="center"
width="100"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" v-if="scope.row.status=='未开工'" @click="cancelOrder(scope.row)">取消工单</a>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@ -98,15 +99,38 @@
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-dialog title="批量修改计划人员" :close-on-click-modal="false" v-drag :visible.sync="changeModelFlag" width="300px">
<el-form :inline="true" label-position="top" >
<el-form-item style="margin-left: 10px" >
<span slot="label" style="" @click="getBaseList(201)"><a herf="#">计划执行人员</a></span>
<el-input v-model="planOperator" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'人员名称'">
<el-input v-model="planOperatorName" disabled style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="changeOrderOperator()">保存</el-button>
<el-button type="primary" @click="changeModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import {
eamWorkOrderSearch,
cancelOrder,
changeOrderOperator,
} from "@/api/eam/eam.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
export default {
components: {
Chooselist
},
watch: {
searchData: {
deep: true,
@ -124,7 +148,7 @@
},
data () {
return {
tagNo:'',
searchData: {
site: this.$store.state.user.site,
orderNo: '',
@ -230,6 +254,24 @@
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 101014,
serialNumber: '101014TablePropertiesCodeDesc',
tableId: "101014Table",
tableName: "common",
columnProp: 'codeDesc',
headerAlign: "center",
align: "left",
columnLabel: '模板名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 101018,
@ -248,6 +290,24 @@
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 101014,
serialNumber: '101014TableObjectDesc',
tableId: "101014Table",
tableName: "common",
columnProp: 'objectDesc',
headerAlign: "center",
align: "left",
columnLabel: '设备名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 101018,
@ -375,7 +435,9 @@
columnWidth: 150,
},
],
changeModelFlag:false,
planOperator:'',
planOperatorName:'',
}
},
mounted () {
@ -387,6 +449,26 @@
this.getDataList()
},
methods: {
// S
getBaseList (val,type) {
this.tagNo = val
this.$nextTick(() => {
let strVal = ''
if (val === 201) {
strVal = this.planOperator
this.$refs.baseList.init(val, strVal)
}
})
},
/* 列表方法的回调 */
getBaseData (val) {
if (this.tagNo === 201) {
this.planOperator = val.AdminID
this.planOperatorName = val.AdminName
}
},
//
getDataList () {
this.searchData.limit = this.pageSize
@ -401,6 +483,7 @@
this.dataListLoading = false
})
},
//
sizeChangeHandle (val) {
this.pageSize = val
@ -416,9 +499,73 @@
selectionChangeHandle (val) {
this.dataListSelections = val
},
cancelOrder(row){
this.$confirm(`是否取消选定工单?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
cancelOrder(row).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
},
selectFlag(row,index){
if(row.status!='未开工'){
return false;
}else {
return true;
}
},
changeModel(){
if(this.dataListSelections.length==0){
this.$alert('请勾选工单!', '错误', {
confirmButtonText: '确定'
})
return false
}
this.planOperator=''
this.planOperatorName=''
this.changeModelFlag=true;
},
changeOrderOperator(){
let inList=JSON.parse(JSON.stringify(this.dataListSelections));
for (let i = 0; i <inList.length ; i++) {
inList[i].planOperator=this.planOperator
}
changeOrderOperator(inList).then(({data}) => {
if (data && data.code === 0) {
this.changeModelFlag=false;
this.getDataList()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
}
}
</script>

65
src/views/modules/eam/eamWorkPlanForCheck.vue

@ -37,6 +37,7 @@
<el-option label="已计划" value="已计划"></el-option>
<el-option label="进行中" value="进行中"></el-option>
<el-option label="已结束" value="已结束"></el-option>
<el-option label="已取消" value="已取消"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="' '">
@ -82,9 +83,11 @@
label="操作">
<template slot-scope="scope">
<a type="text" size="small" v-if="scope.row.status=='已计划'" @click="createOrder(scope.row)">下达</a>
<a type="text" size="small" @click="updateModal(scope.row)">修改</a>
<a type="text" size="small" v-if="scope.row.status=='进行中'" @click="planOrder(scope.row)">计划</a>
<a type="text" size="small" v-if="scope.row.status!='已结束'||scope.row.status!='已取消'" @click="cancelPlan(scope.row)">取消</a>
<a type="text" size="small" v-if="scope.row.status=='已计划'" @click="updateModal(scope.row)">修改</a>
<a type="text" size="small" v-if="scope.row.status!='进行中'" @click="deletePlan(scope.row)">删除</a>
<a type="text" size="small" @click="itemModal(scope.row)">计划项目</a>
<a type="text" size="small" @click="itemModal(scope.row)">点检项目</a>
</template>
</el-table-column>
</el-table>
@ -389,6 +392,8 @@
objectIDBlur,
modalCodeBlur,
getObjectList,
planOrder,
cancelPlan,
} from "@/api/eam/eam.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
export default {
@ -1426,7 +1431,61 @@
getObjectList(this.objectData).then(({data}) => {
this.objectList = data.rows
})
}
},
planOrder(row){
row.userId=this.$store.state.user.name;
this.$confirm(`是否把进行中的计划变为已计划并取消未完成的工单?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
planOrder(row).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
},
cancelPlan(row){
row.userId=this.$store.state.user.name;
this.$confirm(`是否取消计划?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
cancelPlan(row).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
},
}
}
</script>

77
src/views/modules/eam/eamWorkPlanForMaintenance.vue

@ -37,6 +37,7 @@
<el-option label="已计划" value="已计划"></el-option>
<el-option label="进行中" value="进行中"></el-option>
<el-option label="已结束" value="已结束"></el-option>
<el-option label="已取消" value="已取消"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="' '">
@ -52,12 +53,12 @@
v-loading="dataListLoading"
style="width: 100%;">
<!-- <el-table-column-->
<!-- type="selection"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="50">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- type="selection"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="50">-->
<!-- </el-table-column>-->
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
@ -82,9 +83,11 @@
label="操作">
<template slot-scope="scope">
<a type="text" size="small" v-if="scope.row.status=='已计划'" @click="createOrder(scope.row)">下达</a>
<a type="text" size="small" @click="updateModal(scope.row)">修改</a>
<a type="text" size="small" v-if="scope.row.status=='进行中'" @click="planOrder(scope.row)">计划</a>
<a type="text" size="small" v-if="scope.row.status!='已结束'||scope.row.status!='已取消'" @click="cancelPlan(scope.row)">取消</a>
<a type="text" size="small" v-if="scope.row.status=='已计划'" @click="updateModal(scope.row)">修改</a>
<a type="text" size="small" v-if="scope.row.status!='进行中'" @click="deletePlan(scope.row)">删除</a>
<a type="text" size="small" @click="itemModal(scope.row)">计划项目</a>
<a type="text" size="small" @click="itemModal(scope.row)">维保项目</a>
</template>
</el-table-column>
</el-table>
@ -389,6 +392,8 @@
objectIDBlur,
modalCodeBlur,
getObjectList,
planOrder,
cancelPlan,
} from "@/api/eam/eam.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
export default {
@ -1426,7 +1431,61 @@
getObjectList(this.objectData).then(({data}) => {
this.objectList = data.rows
})
}
},
planOrder(row){
row.userId=this.$store.state.user.name;
this.$confirm(`是否把进行中的计划变为已计划并取消未完成的工单?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
planOrder(row).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
},
cancelPlan(row){
row.userId=this.$store.state.user.name;
this.$confirm(`是否取消计划?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
cancelPlan(row).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
},
}
}
</script>

107
src/views/modules/reportWorkOrder/reportCheckOrder.vue

@ -44,7 +44,7 @@
fixed="right"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="reportModal(scope.row)">执行</a>
<a type="text" size="small" v-if="scope.row.status=='未开工'" @click="reportModal(scope.row)">执行</a>
</template>
</el-table-column>
@ -61,16 +61,25 @@
<el-dialog title="执行点检工单" :close-on-click-modal="false" v-drag :visible.sync="detailModelFlag" width="830px">
<el-form :inline="true" label-position="top" @keyup.enter.native="getDataList()">
<el-form-item :label="'点检模板编码'">
<el-input v-model="modelData.codeNo" readonly style="width: 120px"></el-input>
<el-form-item :label="'工厂编码'">
<el-input v-model="saveData.site" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'点检模板名称'">
<el-input v-model="modelData.codeDesc" readonly style="width: 120px"></el-input>
<el-form-item :label="'工单号'">
<el-input v-model="saveData.orderNo" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<!-- <el-button type="primary" @click="addDetailModal()">新增</el-button>-->
<el-form-item :label="'计划执行人员'">
<el-input v-model="saveData.planOperatorName" disabled style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" @keyup.enter.native="getDataList()">
<el-form-item :label="'工作时间'">
<el-input v-model="saveData.workTime" type="number" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'执行结果备注'">
<el-input v-model="saveData.remark" style="width: 600px"></el-input>
</el-form-item>
</el-form>
<div class="rq ">
<el-table
:height="200"
@ -124,6 +133,7 @@
</el-table>
</div>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="saveCheckReport()">保存</el-button>
<el-button type="primary" @click="detailModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
@ -134,6 +144,7 @@
import {
eamWorkOrderSearch,
eamWorkOrderItemSearch,
saveCheckOrderReport,
} from "@/api/eam/eam.js"
export default {
watch: {
@ -406,8 +417,15 @@
],
detailModelFlag:false,
detailList:[],
modelData:{
saveData:{
site:'',
orderNo:'',
planOperatorName:'',
workTime:'',
remark:'',
mesUser:'',
planID:'',
itemList:[],
},
columnDetailList: [
{
@ -582,15 +600,86 @@
site:row.site,
itemNo:row.itemNo,
planID:row.planID,
orderNo:row.orderNo,
itemType:row.functionType,
}
eamWorkOrderItemSearch(indata).then(({data}) => {
this.detailList=data.rows
})
this.saveData={
site:row.site,
orderNo:row.orderNo,
planID:row.planID,
planOperatorName:row.planOperatorName,
workTime:'',
remark:'',
mesUser:this.$store.state.user.name,
itemList:[],
},
this.detailModelFlag=true;
},
saveCheckReport(){
if(this.saveData.workTime==''||this.saveData.workTime==null){
this.$alert('请输入工作时间!', '错误', {
confirmButtonText: '确定'
})
return false
}
for (let i = 0; i < this.detailList.length; i++) {
if(this.detailList[i].valueTypeDb=='N'&&(this.detailList[i].numberValue==''||this.detailList[i].numberValue==null)){
this.$alert(this.detailList[i].itemDesc+'实测值未填写!', '错误', {
confirmButtonText: '确定'
})
return false
}
if(this.detailList[i].valueTypeDb=='T'&&(this.detailList[i].textValue==''||this.detailList[i].textValue==null)){
this.$alert(this.detailList[i].itemDesc+'实测值未填写!', '错误', {
confirmButtonText: '确定'
})
return false
}
if(this.detailList[i].valueTypeDb=='N'&&this.detailList[i].numberValue!=''&&this.detailList[i].numberValue!=null){
if(this.detailList[i].minValue!=""&&this.detailList[i].minValue!=null&&this.detailList[i].minValue>this.detailList[i].numberValue){
this.$alert(this.detailList[i].itemDesc+'实测值小于最小值!', '错误', {
confirmButtonText: '确定'
})
return false
}
if(this.detailList[i].minValue!=""&&this.detailList[i].minValue!=null&&this.detailList[i].maxValue<this.detailList[i].numberValue){
this.$alert(this.detailList[i].itemDesc+'实测值大于最大值!', '错误', {
confirmButtonText: '确定'
})
return false
}
}
}
this.saveData.itemList=JSON.parse(JSON.stringify(this.detailList))
saveCheckOrderReport(this.saveData).then(({data}) => {
if (data && data.code == '0') {
this.getDataList()
this.detailModelFlag=false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}
}
}
</script>
<style >
</style>

479
src/views/modules/reportWorkOrder/reportDefectOrder.vue

@ -0,0 +1,479 @@
<template>
<div class="mod-config">
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
<el-button @click="getDataList()">查询</el-button>
<!-- <el-button type="primary" @click="addModal()">新增</el-button>-->
</el-form>
<el-table
:height="height"
:data="dataList"
border
v-loading="dataListLoading"
style="width: 100%;">
<!-- <el-table-column-->
<!-- type="selection"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="50">-->
<!-- </el-table-column>-->
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="center"
min-width="100"
fixed="right"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" v-if="scope.row.status=='未开工'" @click="reportModal(scope.row)">执行</a>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[20, 100, 500, 1000]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-dialog title="执行维修工单" :close-on-click-modal="false" v-drag :visible.sync="detailModelFlag" width="720px">
<el-form :inline="true" label-position="top" @keyup.enter.native="getDataList()">
<el-form-item :label="'工厂编码'">
<el-input v-model="saveData.site" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'工单号'">
<el-input v-model="saveData.orderNo" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'计划执行人员'">
<el-input v-model="saveData.planOperatorName" disabled style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" @keyup.enter.native="getDataList()">
<el-form-item :label="'工作时间'">
<el-input v-model="saveData.workTime" type="number" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'维修结果'">
<el-select filterable v-model="saveData.result" style="width: 120px">
<el-option label="成功" value="成功"></el-option>
<el-option label="失败" value="失败"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="'执行结果备注'">
<el-input v-model="saveData.remark" style="width: 400px"></el-input>
</el-form-item>
</el-form>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="saveCheckReport()">保存</el-button>
<el-button type="primary" @click="detailModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
</div>
</template>
<script>
import {
eamWorkOrderSearch,
eamWorkOrderItemSearch,
saveOrderReportForDefect,
} from "@/api/eam/eam.js"
export default {
watch: {
searchData: {
deep: true,
handler: function (newV, oldV) {
this.searchData.groupID = this.searchData.groupID.toUpperCase()
}
},
modalData: {
deep: true,
handler: function (newV, oldV) {
this.modalData.groupID = this.modalData.groupID.toUpperCase()
}
}
},
data () {
return {
searchData: {
site: this.$store.state.user.site,
orderNo: '',
planID: '',
objectID: '',
planOperator: '',
functionType: 'C',
status: '未开工',
startDate:'',
endDate:'',
page: 1,
limit: 10,
},
height: 200,
pageIndex: 1,
pageSize: 100,
totalPage: 0,
dataList: [],
dataListLoading: false,
dataListSelections: [],
modalFlag:false,
modalDisableFlag:false,
modalData:{
flag:'',
site: this.$store.state.user.site,
groupID:'',
groupDesc:'',
active:'',
},
departmentList:[],
//
columnList: [
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TableSite',
tableId: "101020Table",
tableName: "common",
columnProp: 'site',
headerAlign: "center",
align: "left",
columnLabel: '工厂编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TableOrderNo',
tableId: "101020Table",
tableName: "common",
columnProp: 'orderNo',
headerAlign: "center",
align: "left",
columnLabel: '工单编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TablePlanID',
tableId: "101020Table",
tableName: "common",
columnProp: 'planID',
headerAlign: "center",
align: "left",
columnLabel: '计划编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TablePropertiesCode',
tableId: "101020Table",
tableName: "common",
columnProp: 'propertiesCode',
headerAlign: "center",
align: "left",
columnLabel: '模板编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TableObjectID',
tableId: "101020Table",
tableName: "common",
columnProp: 'objectID',
headerAlign: "center",
align: "left",
columnLabel: '设备编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TableStatus',
tableId: "101020Table",
tableName: "common",
columnProp: 'status',
headerAlign: "center",
align: "left",
columnLabel: '状态',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TablePlanOperatorName',
tableId: "101020Table",
tableName: "common",
columnProp: 'planOperatorName',
headerAlign: "center",
align: "left",
columnLabel: '计划机修人员',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TableActualOperatorName',
tableId: "101020Table",
tableName: "common",
columnProp: 'actualOperatorName',
headerAlign: "center",
align: "left",
columnLabel: '实际机修人员',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TableActualPlanDate',
tableId: "101020Table",
tableName: "common",
columnProp: 'planDate',
headerAlign: "center",
align: "left",
columnLabel: '计划执行日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TableActualActualDate',
tableId: "101020Table",
tableName: "common",
columnProp: 'actualDate',
headerAlign: "center",
align: "left",
columnLabel: '实际执行日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TableWorkTime',
tableId: "101020Table",
tableName: "common",
columnProp: 'workTime',
headerAlign: "center",
align: "left",
columnLabel: '工作时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TableActualRemark',
tableId: "101020Table",
tableName: "common",
columnProp: 'remark',
headerAlign: "center",
align: "left",
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 150,
},
],
detailModelFlag:false,
detailList:[],
saveData:{
site:'',
orderNo:'',
planOperatorName:'',
workTime:'',
remark:'',
mesUser:'',
planID:'',
itemList:[],
result:'',
},
}
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 210
})
},
created () {
this.getDataList()
},
methods: {
//
getDataList () {
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
eamWorkOrderSearch(this.searchData).then(({data}) => {
if (data.code == 0) {
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
}
this.dataListLoading = false
})
},
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
//
selectionChangeHandle (val) {
this.dataListSelections = val
},
reportModal(row){
this.saveData={
site:row.site,
orderNo:row.orderNo,
planID:row.planID,
planOperatorName:row.planOperatorName,
workTime:'',
remark:'',
mesUser:this.$store.state.user.name,
itemList:[],
},
this.detailModelFlag=true;
},
saveCheckReport(){
if(this.saveData.workTime==''||this.saveData.workTime==null){
this.$alert('请输入工作时间!', '错误', {
confirmButtonText: '确定'
})
return false
}
if(this.saveData.result==''||this.saveData.result==null){
this.$alert('请选择维修结果!', '错误', {
confirmButtonText: '确定'
})
return false
}
saveOrderReportForDefect(this.saveData).then(({data}) => {
if (data && data.code == '0') {
this.getDataList()
this.detailModelFlag=false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}
}
}
</script>
<style >
</style>

685
src/views/modules/reportWorkOrder/reportMaintenanceOrder.vue

@ -0,0 +1,685 @@
<template>
<div class="mod-config">
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
<el-button @click="getDataList()">查询</el-button>
<!-- <el-button type="primary" @click="addModal()">新增</el-button>-->
</el-form>
<el-table
:height="height"
:data="dataList"
border
v-loading="dataListLoading"
style="width: 100%;">
<!-- <el-table-column-->
<!-- type="selection"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="50">-->
<!-- </el-table-column>-->
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="center"
min-width="100"
fixed="right"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" v-if="scope.row.status=='未开工'" @click="reportModal(scope.row)">执行</a>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[20, 100, 500, 1000]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-dialog title="执行维保工单" :close-on-click-modal="false" v-drag :visible.sync="detailModelFlag" width="830px">
<el-form :inline="true" label-position="top" @keyup.enter.native="getDataList()">
<el-form-item :label="'工厂编码'">
<el-input v-model="saveData.site" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'工单号'">
<el-input v-model="saveData.orderNo" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'计划执行人员'">
<el-input v-model="saveData.planOperatorName" disabled style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" @keyup.enter.native="getDataList()">
<el-form-item :label="'工作时间'">
<el-input v-model="saveData.workTime" type="number" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'执行结果备注'">
<el-input v-model="saveData.remark" style="width: 600px"></el-input>
</el-form-item>
</el-form>
<div class="rq ">
<el-table
:height="200"
:data="detailList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnDetailList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- prop=""-->
<!-- header-align="center"-->
<!-- align="right"-->
<!-- min-width="80"-->
<!-- label="实测值">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input v-if="scope.row.valueTypeDb=='T'&&scope.row.valueChooseFlag=='N'" v-model="scope.row.textValue" style="height: 11px;padding: 0px " filterable-->
<!-- allow-create>;width:98%"></el-input>-->
<!-- <el-input v-if="scope.row.valueTypeDb=='N'&&scope.row.valueChooseFlag=='N'" v-model="scope.row.numberValue" type="number" style="height: 11px;padding: 0px " filterable-->
<!-- allow-create>;width:98%"></el-input>-->
<!-- <el-select v-if="scope.row.valueTypeDb=='T'&&scope.row.valueChooseFlag=='Y'" v-model="scope.row.textValue" placeholder="请选择" style="height: 11px;padding: 0px " filterable-->
<!-- allow-create>-->
<!-- <el-option v-for="item in scope.row.availableList " :key="index" :label="item.availableValue"-->
<!-- :value="item.availableValue">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- <el-select v-if="scope.row.valueTypeDb=='N'&&scope.row.valueChooseFlag=='Y'" v-model="scope.row.numberValue" placeholder="请选择" style="height: 11px;padding: 0px " filterable-->
<!-- allow-create>-->
<!-- <el-option v-for="item in scope.row.availableList " :key="index" :label="item.availableValue"-->
<!-- :value="item.availableValue">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</div>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="saveCheckReport()">保存</el-button>
<el-button type="primary" @click="detailModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
</div>
</template>
<script>
import {
eamWorkOrderSearch,
eamWorkOrderItemSearch,
saveCheckOrderReport,
} from "@/api/eam/eam.js"
export default {
watch: {
searchData: {
deep: true,
handler: function (newV, oldV) {
this.searchData.groupID = this.searchData.groupID.toUpperCase()
}
},
modalData: {
deep: true,
handler: function (newV, oldV) {
this.modalData.groupID = this.modalData.groupID.toUpperCase()
}
}
},
data () {
return {
searchData: {
site: this.$store.state.user.site,
orderNo: '',
planID: '',
objectID: '',
planOperator: '',
functionType: 'B',
status: '未开工',
startDate:'',
endDate:'',
page: 1,
limit: 10,
},
height: 200,
pageIndex: 1,
pageSize: 100,
totalPage: 0,
dataList: [],
dataListLoading: false,
dataListSelections: [],
modalFlag:false,
modalDisableFlag:false,
modalData:{
flag:'',
site: this.$store.state.user.site,
groupID:'',
groupDesc:'',
active:'',
},
departmentList:[],
//
columnList: [
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TableSite',
tableId: "101020Table",
tableName: "common",
columnProp: 'site',
headerAlign: "center",
align: "left",
columnLabel: '工厂编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TableOrderNo',
tableId: "101020Table",
tableName: "common",
columnProp: 'orderNo',
headerAlign: "center",
align: "left",
columnLabel: '工单编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TablePlanID',
tableId: "101020Table",
tableName: "common",
columnProp: 'planID',
headerAlign: "center",
align: "left",
columnLabel: '计划编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TablePropertiesCode',
tableId: "101020Table",
tableName: "common",
columnProp: 'propertiesCode',
headerAlign: "center",
align: "left",
columnLabel: '模板编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TableObjectID',
tableId: "101020Table",
tableName: "common",
columnProp: 'objectID',
headerAlign: "center",
align: "left",
columnLabel: '设备编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TableStatus',
tableId: "101020Table",
tableName: "common",
columnProp: 'status',
headerAlign: "center",
align: "left",
columnLabel: '状态',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TablePlanOperatorName',
tableId: "101020Table",
tableName: "common",
columnProp: 'planOperatorName',
headerAlign: "center",
align: "left",
columnLabel: '计划机修人员',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TableActualOperatorName',
tableId: "101020Table",
tableName: "common",
columnProp: 'actualOperatorName',
headerAlign: "center",
align: "left",
columnLabel: '实际机修人员',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TableActualPlanDate',
tableId: "101020Table",
tableName: "common",
columnProp: 'planDate',
headerAlign: "center",
align: "left",
columnLabel: '计划执行日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TableActualActualDate',
tableId: "101020Table",
tableName: "common",
columnProp: 'actualDate',
headerAlign: "center",
align: "left",
columnLabel: '实际执行日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TableWorkTime',
tableId: "101020Table",
tableName: "common",
columnProp: 'workTime',
headerAlign: "center",
align: "left",
columnLabel: '工作时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020TableActualRemark',
tableId: "101020Table",
tableName: "common",
columnProp: 'remark',
headerAlign: "center",
align: "left",
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 150,
},
],
detailModelFlag:false,
detailList:[],
saveData:{
site:'',
orderNo:'',
planOperatorName:'',
workTime:'',
remark:'',
mesUser:'',
planID:'',
itemList:[],
},
columnDetailList: [
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020Table2EamPropertiesItemID',
tableId: "101020Table2",
tableName: "维保项目表",
columnProp: 'itemNo',
headerAlign: "center",
align: "left",
columnLabel: '维保项目编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 90,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020Table2EamPropertiesItemDesc',
tableId: "101020Table2",
tableName: "维保项目表",
columnProp: 'itemDesc',
headerAlign: "center",
align: "left",
columnLabel: '维保项目名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 90,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020Table2EamPropertiesItemRemark',
tableId: "101020Table2",
tableName: "维保项目表",
columnProp: 'itemRemark',
headerAlign: "center",
align: "left",
columnLabel: '维保方法说明',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020Table2ValueType',
tableId: "101020Table2",
tableName: "维保项目表",
columnProp: 'valueType',
headerAlign: "center",
align: "left",
columnLabel: '检测值类型',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020Table2DefaultValue',
tableId: "101020Table2",
tableName: "维保项目表",
columnProp: 'defaultValue',
headerAlign: "center",
align: "left",
columnLabel: '参照值',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020Table2MaxValue',
tableId: "101020Table2",
tableName: "维保项目表",
columnProp: 'maxValue',
headerAlign: "center",
align: "left",
columnLabel: '最大值',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70,
},
{
userId: this.$store.state.user.name,
functionId: 101020,
serialNumber: '101020Table2MinValue',
tableId: "101020Table2",
tableName: "维保项目表",
columnProp: 'minValue',
headerAlign: "center",
align: "left",
columnLabel: '最小值',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70,
},
],
}
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 210
})
},
created () {
this.getDataList()
},
methods: {
//
getDataList () {
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
eamWorkOrderSearch(this.searchData).then(({data}) => {
if (data.code == 0) {
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
}
this.dataListLoading = false
})
},
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
//
selectionChangeHandle (val) {
this.dataListSelections = val
},
reportModal(row){
let indata={
site:row.site,
itemNo:row.itemNo,
planID:row.planID,
orderNo:row.orderNo,
itemType:row.functionType,
}
eamWorkOrderItemSearch(indata).then(({data}) => {
this.detailList=data.rows
})
this.saveData={
site:row.site,
orderNo:row.orderNo,
planID:row.planID,
planOperatorName:row.planOperatorName,
workTime:'',
remark:'',
mesUser:this.$store.state.user.name,
itemList:[],
},
this.detailModelFlag=true;
},
saveCheckReport(){
if(this.saveData.workTime==''||this.saveData.workTime==null){
this.$alert('请输入工作时间!', '错误', {
confirmButtonText: '确定'
})
return false
}
// for (let i = 0; i < this.detailList.length; i++) {
// if(this.detailList[i].valueTypeDb=='N'&&(this.detailList[i].numberValue==''||this.detailList[i].numberValue==null)){
// this.$alert(this.detailList[i].itemDesc+'', '', {
// confirmButtonText: ''
// })
// return false
// }
// if(this.detailList[i].valueTypeDb=='T'&&(this.detailList[i].textValue==''||this.detailList[i].textValue==null)){
// this.$alert(this.detailList[i].itemDesc+'', '', {
// confirmButtonText: ''
// })
// return false
// }
//
// if(this.detailList[i].valueTypeDb=='N'&&this.detailList[i].numberValue!=''&&this.detailList[i].numberValue!=null){
// if(this.detailList[i].minValue!=""&&this.detailList[i].minValue!=null&&this.detailList[i].minValue>this.detailList[i].numberValue){
// this.$alert(this.detailList[i].itemDesc+'', '', {
// confirmButtonText: ''
// })
// return false
// }
// if(this.detailList[i].minValue!=""&&this.detailList[i].minValue!=null&&this.detailList[i].maxValue<this.detailList[i].numberValue){
// this.$alert(this.detailList[i].itemDesc+'', '', {
// confirmButtonText: ''
// })
// return false
// }
// }
// }
// this.saveData.itemList=JSON.parse(JSON.stringify(this.detailList))
saveCheckOrderReport(this.saveData).then(({data}) => {
if (data && data.code == '0') {
this.getDataList()
this.detailModelFlag=false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}
}
}
</script>
<style >
</style>
Loading…
Cancel
Save