Browse Source

2023-11-10 设备和质量修改2

java8
杨奉源 2 years ago
parent
commit
c33f6f3a3c
  1. 25
      src/views/modules/eam/eamWorkOrderForMaintenance.vue
  2. 8
      src/views/modules/qc/com_qc_itemImage_upload_file.vue
  3. 2
      src/views/modules/reportWorkOrder/com_eam_itemImage_upload_file.vue
  4. 47
      src/views/modules/reportWorkOrder/reportCheckOrder.vue
  5. 114
      src/views/modules/reportWorkOrder/reportMaintenanceOrder.vue
  6. 2
      src/views/modules/reportWorkOrder/report_image_upload.vue

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

@ -136,7 +136,7 @@
</el-pagination>
<el-dialog title="执行结果" :close-on-click-modal="false" v-drag :visible.sync="detailModelFlag" width="1200px">
<el-form :inline="true" label-position="top" >
<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>
@ -227,16 +227,19 @@
<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="80"-->
<!-- label="是否完成">-->
<!-- <template slot-scope="scope">-->
<!-- {{scope.row.finishFlag=='Y'?"是":"否"}}-->
<!-- </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' && saveData.status === '待审核'" v-model="scope.row.textValue" style="height: 11px;padding: 0px " filterable allow-create>;width:98%"></el-input>
<el-input v-if="scope.row.valueTypeDb === 'T' && saveData.status === '已完工'" 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' && saveData.status === '待审核'" v-model="scope.row.numberValue" style="height: 11px;padding: 0px " filterable allow-create>;width:98%"></el-input>
<el-input v-if="scope.row.valueTypeDb === 'N' && saveData.status === '已完工'" v-model="scope.row.numberValue" readonly style="height: 11px;padding: 0px " filterable allow-create>;width:98%"></el-input>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"

8
src/views/modules/qc/com_qc_itemImage_upload_file.vue

@ -1,11 +1,11 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" :close-on-click-modal="false" :visible.sync="visible" :before-close="closeDialog" width="390px" style="height: 530px;" class="customer-dialog">
<el-dialog :title="titleCon" :close-on-click-modal="false" :visible.sync="visible" :before-close="closeDialog" :showClose="false" width="390px" style="height: 530px;" class="customer-dialog">
<el-form :inline="true" label-position="top" label-width="80px">
<el-row>
<el-col :span="12" style="width:36%">
<el-form-item class="customer-item" label="检验单号">
<el-input v-model="pageData.orderNo" style="width: 120px;" disabled ></el-input>
<el-input v-model="pageData.inspectionNo" style="width: 120px;" disabled ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
@ -93,7 +93,7 @@ export default {
for (let i = 0; i < data.rows.length; i++) {
this.descImgs.push(data.rows[i])
}
}else {
} else {
this.$message.warning(data.msg)
}
})
@ -111,7 +111,7 @@ export default {
this.fileList.push(file)
},
/*关闭modal*/
closeDialog(){
closeDialog () {
this.fileList = []
//
this.$emit('refreshPageTables2')

2
src/views/modules/reportWorkOrder/com_eam_itemImage_upload_file.vue

@ -1,6 +1,6 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" :close-on-click-modal="false" :visible.sync="visible" :before-close="closeDialog" width="390px" style="height: 530px;" class="customer-dialog">
<el-dialog :title="titleCon" :close-on-click-modal="false" :visible.sync="visible" :before-close="closeDialog" :showClose="false" width="390px" style="height: 530px;" class="customer-dialog">
<el-form :inline="true" label-position="top" label-width="80px">
<el-row>
<el-col :span="12" style="width:36%">

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

@ -212,8 +212,8 @@
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 " 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 " allow-create>;width:98%"></el-input>
<el-input :ref="`textValue${scope.$index}`" v-if="scope.row.valueTypeDb === 'T'&&scope.row.valueChooseFlag === 'N'" v-model="scope.row.textValue" @keyup.enter.native="focusNextInput(scope.$index, 'textValue')" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
<el-input :ref="`textValue${scope.$index}`" v-if="scope.row.valueTypeDb === 'N'&&scope.row.valueChooseFlag === 'N'" v-model="scope.row.numberValue" @keyup.enter.native="focusNextInput(scope.$index, 'textValue')" type="number" style="height: 11px;padding: 0px " 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 " allow-create>
<el-option
v-for="item in scope.row.availableList"
@ -522,23 +522,6 @@
status: true,
fixed: '',
},
// {
// userId: this.$store.state.user.name,
// functionId: 101019,
// serialNumber: '101019TableActualOperatorName',
// tableId: "101019Table",
// tableName: "common",
// columnProp: 'actualOperatorName',
// headerAlign: "center",
// align: "center",
// columnLabel: '',
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: '',
// },
{
userId: this.$store.state.user.name,
functionId: 101019,
@ -986,6 +969,19 @@
this.getDataList()
},
methods: {
//
focusNextInput(index, type) {
let aaa = ''
if (this.detailList.length - 1 === index) {
aaa = `${type}0`
} else {
aaa = `${type}${index + 1}`
}
this.$nextTick(() => {
this.$refs[aaa].focus()
})
},
/**
* 刷新项目
*/
@ -1148,11 +1144,13 @@
itemList: [],
checkResult: '',
functionType: 'A',
propertiesCode: row.propertiesCode
propertiesCode: row.propertiesCode,
startDate: new Date(),
endDate: ''
}
this.getInspectionFormData();
this.queryHistoryRecord();
this.detailModelFlag = true;
this.getInspectionFormData()
this.queryHistoryRecord()
this.detailModelFlag = true
},
async saveCheckReport(){
let tempFlag = 'N'
@ -1207,8 +1205,7 @@
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {

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

@ -198,6 +198,33 @@
</div>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="right"
min-width="80"
label="实测值">
<template slot-scope="scope">
<el-input :ref="`textValue${scope.$index}`" v-if="scope.row.valueTypeDb === 'T' && scope.row.valueChooseFlag === 'N'" v-model="scope.row.textValue" @keyup.enter.native="focusNextInput(scope.$index, 'textValue')" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
<el-input :ref="`textValue${scope.$index}`" v-if="scope.row.valueTypeDb === 'N' && scope.row.valueChooseFlag === 'N'" v-model="scope.row.numberValue" @keyup.enter.native="focusNextInput(scope.$index, 'textValue')" type="number" style="height: 11px;padding: 0px " 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 " 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 " 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-column
prop=""
header-align="center"
@ -289,6 +316,17 @@
{{scope.row.finishFlag=='Y'?"是":"否"}}
</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'" disabled v-model="scope.row.textValue" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
<el-input v-if="scope.row.valueTypeDb === 'N'" disabled v-model="scope.row.numberValue" type="number" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
@ -1135,6 +1173,19 @@
this.getDataList()
},
methods: {
//
focusNextInput(index, type) {
let aaa = ''
if (this.detailList.length - 1 === index) {
aaa = `${type}0`
} else {
aaa = `${type}${index + 1}`
}
this.$nextTick(() => {
this.$refs[aaa].focus()
})
},
/**
* 刷新项目
*/
@ -1226,6 +1277,7 @@
this.queryHistoryRecord();
}
},
//
getInspectionFormData(){
let tempData = {
@ -1246,6 +1298,7 @@
}
})
},
//
queryHistoryRecord(){
let tempData = {
@ -1261,6 +1314,7 @@
}
})
},
//
detailModal(row){
let tempData = {
@ -1273,7 +1327,6 @@
this.historyDetailModelFlag = true;
},
//
favoriteIsOk() {
let userFavorite = {
@ -1355,12 +1408,8 @@
})
return this.exportList;
},
startDownload() {
},
finishDownload() {
},
startDownload() {},
finishDownload() {},
fields() {
let json = "{"
this.columnList.forEach((item, index) => {
@ -1447,23 +1496,8 @@
this.detailModelFlag = true
},
saveCheckReport(){
// if(this.saveData.startDate === ''||this.saveData.startDate == null){
// this.$message.warning('')
// return
// }
// if(this.saveData.endDate === ''||this.saveData.endDate == null){
// this.$message.warning('')
// return
// }
// if(this.saveData.workTime === 0){
// this.$message.warning('0')
// return
// }
// if(this.saveData.workTime < 0){
// this.$message.warning('0')
// return
// }
async saveCheckReport(){
let tempFlag = 'N'
if(this.saveData.checkResult === ''||this.saveData.checkResult == null){
this.$message.warning('请选择维保结论!')
return
@ -1472,13 +1506,30 @@
this.$message.warning('请选择异常原因!')
return
}
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.$message.warning(this.detailList[i].itemDesc+'实测值未填写!')
return
}
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.detailList[i].minValue != ""&& this.detailList[i].minValue != null && this.detailList[i].maxValue < this.detailList[i].numberValue)){
this.detailList[i].itemResult = '不合格'
}
}
}
if (this.saveData.checkResult == '不合格') {
this.detailList.forEach(val => {
if (val.itemResult == '不合格') {
tempFlag = 'Y'
}
})
if (tempFlag != 'Y') {
this.$message.warning('请选择不合格项目!')
return
}
}
this.saveData.itemList = JSON.parse(JSON.stringify(this.detailList))
// for (let j = 0; j < this.saveData.itemList.length ; j++) {
// if(this.saveData.itemList[j].itemResult === '' || this.saveData.itemList[j].itemResult == null){
// this.saveData.itemList[j].itemResult = ''
// }
// }
saveCheckOrderReport(this.saveData).then(({data}) => {
await saveCheckOrderReport(this.saveData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.detailModelFlag = false
@ -1486,8 +1537,7 @@
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {

2
src/views/modules/reportWorkOrder/report_image_upload.vue

@ -1,6 +1,6 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" :close-on-click-modal="false" :visible.sync="visible" width="390px" style="height: 550px;" class="customer-dialog">
<el-dialog :title="titleCon" :close-on-click-modal="false" :visible.sync="visible" width="390px" :showClose="false" style="height: 550px;" class="customer-dialog">
<el-form :inline="true" label-position="top" label-width="80px">
<el-row>
<el-col :span="12">

Loading…
Cancel
Save