|
|
@ -1,28 +1,68 @@ |
|
|
|
<template> |
|
|
|
<view class="page-wraper"> |
|
|
|
<view class="page-header flex" |
|
|
|
style="font-size: 35rpx; padding-left: 20rpx; padding-top: 20rpx; flex-direction: column;"> |
|
|
|
<view class="flex u-col-center space-between"> |
|
|
|
<view class=""> |
|
|
|
设备编号 : {{deviceCode}} |
|
|
|
<text v-if="deviceName!=''">({{deviceName}})</text> |
|
|
|
style="font-size: 32rpx; padding-left: 10rpx; padding-top: 10rpx; flex-direction: column;"> |
|
|
|
<!-- <view class="flex u-col-center space-between"> --> |
|
|
|
<!-- <view class=""> |
|
|
|
<view class="" style="margin: 5rpx; font-weight: bold;"> |
|
|
|
设备编号 : {{deviceCode}} |
|
|
|
</view> |
|
|
|
<view class="" style="margin: 5rpx; font-weight: bold;" v-if="deviceName!=''"> |
|
|
|
设备名称 : {{deviceName}} |
|
|
|
</view> --> |
|
|
|
|
|
|
|
</view> |
|
|
|
<view class=""> |
|
|
|
<!-- <text v-if="deviceName!=''">({{deviceName}})</text> --> |
|
|
|
<!-- </view> --> |
|
|
|
<!-- <view class=""> |
|
|
|
<button type="primary" size="mini" @click="openScanPopup">扫描</button> |
|
|
|
</view> --> |
|
|
|
|
|
|
|
<!-- </view> --> |
|
|
|
<!-- <view class="" style="margin: 5rpx;" v-if="deviceName!=''"> |
|
|
|
点检日期 : {{dateTime}} |
|
|
|
</view> |
|
|
|
<view class="" style="margin: 5rpx;" v-if="deviceName!=''"> |
|
|
|
点检人 : {{worker}} |
|
|
|
</view> --> |
|
|
|
<view class=""> |
|
|
|
<view class="uni-flex uni-row space-between u-col-center" > |
|
|
|
<view class="" style="margin: 5rpx; font-weight: bold;"> |
|
|
|
设备编号: |
|
|
|
</view> |
|
|
|
<uni-easyinput |
|
|
|
class="uni-mt-5" |
|
|
|
trim="all" |
|
|
|
ref="inputDevice" |
|
|
|
v-model="deviceCode" |
|
|
|
@clear="deviceClear" |
|
|
|
:focus="true" |
|
|
|
@confirm="onConfirmDevice"></uni-easyinput> |
|
|
|
</view> |
|
|
|
<view class="" style="margin: 5rpx; font-weight: bold;" v-if="deviceName!=''"> |
|
|
|
设备名称 : {{deviceName}} |
|
|
|
</view> |
|
|
|
<view class="" style="margin: 5rpx;" v-if="deviceName!=''"> |
|
|
|
点检日期 : {{dateTime}} |
|
|
|
</view> |
|
|
|
<view class="" style="margin: 5rpx;" v-if="deviceName!=''"> |
|
|
|
点检人 : {{worker}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="" style="width: 100%;background-color: gray;height: 2rpx;" /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="" style="width: 100%;background-color: gray;height: 2rpx; margin-top: 10rpx;" /> |
|
|
|
|
|
|
|
</view> |
|
|
|
<view class="page-main"> |
|
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
|
<view> |
|
|
|
<customerFrom ref="customerFrom" :formData="formData"> </customerFrom> |
|
|
|
<view style="padding-bottom: 80rpx;"> |
|
|
|
<customerFrom ref="customerFrom" :formData="dataList"> </customerFrom> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
</view> |
|
|
|
<view class="page-footer"> |
|
|
|
<view class="page-footer" v-if="dataList.length>0"> |
|
|
|
<view class="uni-flex u-col-center space-between padding_10" |
|
|
|
style="background-color:ghostwhite; width: 100%; "> |
|
|
|
<view class=""> |
|
|
@ -34,35 +74,112 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<winScanNormal ref="scanPopup" title="设备编号" @getResult='getScanResult'></winScanNormal> |
|
|
|
<showModal ref="comMessage"></showModal> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import showModal from '../../mycomponents/common/showModal.vue' |
|
|
|
import customerFrom from "@/mycomponents/form/customerFrom.vue" |
|
|
|
import winScanNormal from "@/mycomponents/scan/winScanNormal.vue" |
|
|
|
|
|
|
|
import { |
|
|
|
getCurrDateTime, |
|
|
|
deepCopyData |
|
|
|
} from "@/common/basic.js" |
|
|
|
import { |
|
|
|
getPlaneNumberList, |
|
|
|
getMaterialLists, |
|
|
|
foamCheckSubmit, |
|
|
|
getDeviceInfo |
|
|
|
} from '@/api/request2.js'; |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
customerFrom, |
|
|
|
winScanNormal |
|
|
|
winScanNormal, |
|
|
|
showModal |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
dateTime: "", |
|
|
|
deviceCode: "", |
|
|
|
deviceCheckCode:"", |
|
|
|
deviceName: "", |
|
|
|
worker: this.$store.state.user.name, |
|
|
|
dataList: [], |
|
|
|
formData: [{ |
|
|
|
type: "inputAndSelect", |
|
|
|
type: "stateSelect", |
|
|
|
position: "PB", |
|
|
|
content: "检查各个管路及接头", |
|
|
|
methond: "目视野无液体渗出", |
|
|
|
placeholder: "请输入点检状态", |
|
|
|
name: "", |
|
|
|
value: "", |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: "inputAndSelect", |
|
|
|
check: true, |
|
|
|
position: "开孔机", |
|
|
|
content: "检查油温", |
|
|
|
methond: "目视80°C~100°C", |
|
|
|
lower: 80, |
|
|
|
upper: 100, |
|
|
|
placeholder: "请输入点检状态", |
|
|
|
name: '', |
|
|
|
value: "", |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: "inputAndSelect", |
|
|
|
position: "开孔机", |
|
|
|
content: "待机状态下真空度", |
|
|
|
methond: "目视<=6Bar", |
|
|
|
lower: 0, |
|
|
|
upper: 6, |
|
|
|
placeholder: "请输入待机状态下真空度", |
|
|
|
name: '', |
|
|
|
value: "", |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: "inputAndSelect", |
|
|
|
position: "开孔机", |
|
|
|
content: "工作时真空度", |
|
|
|
methond: "达到-0.07~0.08Mpa", |
|
|
|
lower: -0.07, |
|
|
|
upper: 0.08, |
|
|
|
placeholder: "请输入工作时真空度", |
|
|
|
name: '', |
|
|
|
value: "", |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: "inputAndSelect", |
|
|
|
position: "开孔机", |
|
|
|
content: "检查开孔机压缩空气压力", |
|
|
|
methond: "主表6±0.5bar,副表4±0.5bar", |
|
|
|
placeholder: "请输入检查开孔机压缩空气压力", |
|
|
|
name: '', |
|
|
|
value: "", |
|
|
|
main: { |
|
|
|
name: "", |
|
|
|
value: "", |
|
|
|
placeholder: "请输入主表压力", |
|
|
|
hint: "主表压力范围5.5~6.5bar", |
|
|
|
lower: "5.5", |
|
|
|
upper: "6.5" |
|
|
|
}, |
|
|
|
minor: { |
|
|
|
name: "", |
|
|
|
value: "", |
|
|
|
placeholder: "请输入副表压力", |
|
|
|
hint: "副表压力范围3.5~4.5bar", |
|
|
|
lower: "3.5", |
|
|
|
upper: "4.5" |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
type: "stateSelect", |
|
|
|
position: "PB", |
|
|
|
content: "电机检查", |
|
|
|
methond: "倾听无异响", |
|
|
@ -71,7 +188,7 @@ |
|
|
|
value: "", |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: "inputAndSelect", |
|
|
|
type: "stateSelect", |
|
|
|
position: "PB", |
|
|
|
content: "检查气源气压", |
|
|
|
methond: "倾听无异响", |
|
|
@ -80,7 +197,27 @@ |
|
|
|
value: "", |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: "select", |
|
|
|
type: "inputRange", |
|
|
|
position: "PB", |
|
|
|
content: "检查气袋气压", |
|
|
|
methond: "压力表示数范围2.5bar-4.5bar", |
|
|
|
inputLow: { |
|
|
|
name: "", |
|
|
|
value: "", |
|
|
|
placeholder: "请输入最低压力", |
|
|
|
lower: "2.5", |
|
|
|
upper: "4.5" |
|
|
|
}, |
|
|
|
inputHigh: { |
|
|
|
name: "", |
|
|
|
value: "", |
|
|
|
placeholder: "请输入最高压力", |
|
|
|
lower: "2.5", |
|
|
|
upper: "4.5" |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: "groupSelect", |
|
|
|
content: "选择班组", |
|
|
|
placeholder: "请选择班组", |
|
|
|
name: '', |
|
|
@ -92,24 +229,107 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: {}, |
|
|
|
onLoad() {}, |
|
|
|
onReady() { |
|
|
|
onLoad() { |
|
|
|
|
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.$refs.inputDevice.focused = true |
|
|
|
}, |
|
|
|
onReady() { |
|
|
|
// this.openScanPopup(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getScanResult(result) { |
|
|
|
this.deviceCode = result; |
|
|
|
this.deviceName = "自配料系统" |
|
|
|
console.log(result) |
|
|
|
this.reset(); |
|
|
|
this.closeScanPopup(); |
|
|
|
uni.showLoading({ |
|
|
|
title: "加载中", |
|
|
|
mask: true |
|
|
|
}) |
|
|
|
getDeviceInfo(result).then(res => { |
|
|
|
uni.hideLoading() |
|
|
|
this.deviceCode = result; |
|
|
|
console.log(result) |
|
|
|
this.reset(); |
|
|
|
this.closeScanPopup(); |
|
|
|
var groupSelect = { |
|
|
|
Type: "4", |
|
|
|
Content: "选择班组", |
|
|
|
SelectName: "", |
|
|
|
SelectValue: "", |
|
|
|
} |
|
|
|
// this.dataList = this.formData |
|
|
|
this.dataList = res.Result; |
|
|
|
this.dataList.push(groupSelect) |
|
|
|
this.dataList.forEach(res=>{ |
|
|
|
res.SelectName="" |
|
|
|
res.SelectValue="" |
|
|
|
if(res.putMachine){ |
|
|
|
res.putMachine.forEach(item=>{ |
|
|
|
item.SelectName="" |
|
|
|
item.SelectValue="" |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
this.deviceName=this.dataList[0].Name; |
|
|
|
this.dateTime = getCurrDateTime() |
|
|
|
}).catch(error => { |
|
|
|
uni.hideLoading() |
|
|
|
this.showMessage(error) |
|
|
|
}) |
|
|
|
// this.deviceCode = result; |
|
|
|
// this.deviceName = "自配料系统" |
|
|
|
// console.log(result) |
|
|
|
// this.reset(); |
|
|
|
// this.closeScanPopup(); |
|
|
|
// this.dataList = this.formData; |
|
|
|
// this.dateTime = getCurrDateTime() |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
submit() { |
|
|
|
this.$refs.customerFrom.submit(callBack => { |
|
|
|
console.log("提交", JSON.stringify(callBack)) |
|
|
|
if (this.deviceCode == "") { |
|
|
|
this.deviceCheckCode="" |
|
|
|
this.$refs.comMessage.showMessage("提示", "请先扫描设备编号") |
|
|
|
return |
|
|
|
} |
|
|
|
this.$refs.customerFrom.submit(data => { |
|
|
|
var groupName=""; |
|
|
|
var groupValue="" |
|
|
|
data.forEach(res=>{ |
|
|
|
if(res.Type=="4"){ |
|
|
|
groupName=res.SelectName; |
|
|
|
groupValue=res.SelectValue; |
|
|
|
} |
|
|
|
}) |
|
|
|
var commitData={ |
|
|
|
LoginUserID:this.$store.state.user.id, |
|
|
|
UserName:this.$store.state.user.name, |
|
|
|
createTime:getCurrDateTime(), |
|
|
|
groupName:groupName, |
|
|
|
groupValue:groupValue, |
|
|
|
dataList:data |
|
|
|
} |
|
|
|
var param = commitData |
|
|
|
|
|
|
|
console.log("提交", JSON.stringify(param)) |
|
|
|
// foamCheckSubmit(param).then(res=>{ |
|
|
|
// uni.hideLoading() |
|
|
|
// this.showMessage("提交成功") |
|
|
|
// this.clearData() |
|
|
|
// }).catch(error=>{ |
|
|
|
// uni.hideLoading() |
|
|
|
// this.showMessage(error) |
|
|
|
// }) |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
clearData() { |
|
|
|
this.deviceCode = "" |
|
|
|
this.dateTime = "", |
|
|
|
this.deviceCode = "", |
|
|
|
this.deviceName = "", |
|
|
|
this.reset(); |
|
|
|
}, |
|
|
|
reset() { |
|
|
|
this.$refs.customerFrom.reset() |
|
|
|
}, |
|
|
@ -120,6 +340,57 @@ |
|
|
|
closeScanPopup() { |
|
|
|
this.$refs.scanPopup.closeScanPopup(); |
|
|
|
}, |
|
|
|
deviceClear(){ |
|
|
|
this.deviceCode=""; |
|
|
|
this.deviceCheckCode="" |
|
|
|
}, |
|
|
|
showMessage(hint){ |
|
|
|
this.$refs.comMessage.showMessage("提示", hint) |
|
|
|
}, |
|
|
|
onConfirmDevice(data){ |
|
|
|
if(data==undefined||data==""){ |
|
|
|
this.showMessage("请扫描设备编号") |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
uni.showLoading({ |
|
|
|
title: "加载中", |
|
|
|
mask: true |
|
|
|
}) |
|
|
|
getDeviceInfo(data).then(res => { |
|
|
|
uni.hideLoading() |
|
|
|
this.deviceCode = data; |
|
|
|
this.deviceCheckCode = data; |
|
|
|
console.log(data) |
|
|
|
this.reset(); |
|
|
|
this.closeScanPopup(); |
|
|
|
var groupSelect = { |
|
|
|
Type: "4", |
|
|
|
Content: "选择班组", |
|
|
|
SelectName: "", |
|
|
|
SelectValue: "", |
|
|
|
} |
|
|
|
// this.dataList = this.formData |
|
|
|
this.dataList = res.Result; |
|
|
|
this.dataList.push(groupSelect) |
|
|
|
this.dataList.forEach(res=>{ |
|
|
|
res.SelectName="" |
|
|
|
res.SelectValue="" |
|
|
|
if(res.putMachine){ |
|
|
|
res.putMachine.forEach(item=>{ |
|
|
|
item.SelectName="" |
|
|
|
item.SelectValue="" |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
this.deviceName=this.dataList[0].Name; |
|
|
|
this.dateTime = getCurrDateTime() |
|
|
|
}).catch(error => { |
|
|
|
uni.hideLoading() |
|
|
|
this.showMessage(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|