|
@ -25,18 +25,17 @@ |
|
|
点检人 : {{worker}} |
|
|
点检人 : {{worker}} |
|
|
</view> --> |
|
|
</view> --> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<view class="uni-flex uni-row space-between u-col-center" > |
|
|
<uni-section title="设备编号" subTitle="" subTitleFontSize="26rpx" titleFontSize="35rpx" type="line"> |
|
|
<view class="" style="margin: 5rpx; font-weight: bold;"> |
|
|
</uni-section> |
|
|
|
|
|
<view class="uni-flex uni-row space-between u-col-center"> |
|
|
|
|
|
<!-- <view class="" style="margin: 5rpx; font-weight: bold;"> |
|
|
设备编号: |
|
|
设备编号: |
|
|
|
|
|
</view> --> |
|
|
|
|
|
<uni-easyinput class="" trim="all" ref="inputDevice" v-model="deviceCode" @clear="deviceClear" |
|
|
|
|
|
:focus="true" @confirm="onConfirmDevice"></uni-easyinput> |
|
|
</view> |
|
|
</view> |
|
|
<uni-easyinput |
|
|
<view class="" style="margin: 5rpx; font-weight: bold;" v-if="deviceName!=''"> |
|
|
class="" |
|
|
设备编号 : {{deviceCheckCode}} |
|
|
trim="all" |
|
|
|
|
|
ref="inputDevice" |
|
|
|
|
|
v-model="deviceCode" |
|
|
|
|
|
@clear="deviceClear" |
|
|
|
|
|
:focus="true" |
|
|
|
|
|
@confirm="onConfirmDevice"></uni-easyinput> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<view class="" style="margin: 5rpx; font-weight: bold;" v-if="deviceName!=''"> |
|
|
<view class="" style="margin: 5rpx; font-weight: bold;" v-if="deviceName!=''"> |
|
|
设备名称 : {{deviceName}} |
|
|
设备名称 : {{deviceName}} |
|
@ -102,7 +101,7 @@ |
|
|
return { |
|
|
return { |
|
|
dateTime: "", |
|
|
dateTime: "", |
|
|
deviceCode: "", |
|
|
deviceCode: "", |
|
|
deviceCheckCode:"", |
|
|
deviceCheckCode: "", |
|
|
deviceName: "", |
|
|
deviceName: "", |
|
|
worker: this.$store.state.user.name, |
|
|
worker: this.$store.state.user.name, |
|
|
dataList: [], |
|
|
dataList: [], |
|
@ -241,7 +240,8 @@ |
|
|
}) |
|
|
}) |
|
|
getFoamDeviceInfo(result).then(res => { |
|
|
getFoamDeviceInfo(result).then(res => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.deviceCode = result; |
|
|
this.deviceCode = ""; |
|
|
|
|
|
this.deviceCheckCode = result |
|
|
console.log(result) |
|
|
console.log(result) |
|
|
var groupSelect = { |
|
|
var groupSelect = { |
|
|
Type: "4", |
|
|
Type: "4", |
|
@ -253,44 +253,47 @@ |
|
|
this.dataList = res.Result; |
|
|
this.dataList = res.Result; |
|
|
this.dataList.push(groupSelect) |
|
|
this.dataList.push(groupSelect) |
|
|
|
|
|
|
|
|
this.deviceName=this.dataList[0].Name; |
|
|
this.deviceName = this.dataList[0].Name; |
|
|
this.dateTime = getCurrDateTime() |
|
|
this.dateTime = getCurrDateTime() |
|
|
this.worker = this.$store.state.user.name |
|
|
this.worker = this.$store.state.user.name |
|
|
|
|
|
this.$forceUpdate(); |
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
|
|
|
this.deviceCode = "" |
|
|
|
|
|
this.deviceCheckCode = result |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.showMessage(error) |
|
|
this.showMessage("扫描设备[" + data + "]" + error) |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
submit() { |
|
|
submit() { |
|
|
if (this.deviceCode == "") { |
|
|
if (this.deviceCheckCode == "") { |
|
|
this.deviceCheckCode="" |
|
|
this.deviceCheckCode = "" |
|
|
this.showMessage("请先扫描设备编号") |
|
|
this.showMessage("请先扫描设备编号") |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
this.$refs.customerFrom.submit(data => { |
|
|
this.$refs.customerFrom.submit(data => { |
|
|
var groupName=""; |
|
|
var groupName = ""; |
|
|
var groupValue="" |
|
|
var groupValue = "" |
|
|
data.forEach(res=>{ |
|
|
data.forEach(res => { |
|
|
if(res.Type=="4"){ |
|
|
if (res.Type == "4") { |
|
|
groupName=res.SelectName; |
|
|
groupName = res.SelectName; |
|
|
groupValue=res.SelectValue; |
|
|
groupValue = res.SelectValue; |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
var commitData={ |
|
|
var commitData = { |
|
|
id:this.$store.state.user.id, |
|
|
id: this.$store.state.user.id, |
|
|
createTime:getCurrDateTime(), |
|
|
createTime: getCurrDateTime(), |
|
|
groupName:groupName, |
|
|
groupName: groupName, |
|
|
groupValue:groupValue, |
|
|
groupValue: groupValue, |
|
|
dataList:data |
|
|
dataList: data |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
console.log("提交", JSON.stringify(commitData)) |
|
|
console.log("提交", JSON.stringify(commitData)) |
|
|
foamCheckSubmit(commitData).then(res=>{ |
|
|
foamCheckSubmit(commitData).then(res => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.showMessage("提交成功") |
|
|
this.showMessage("提交成功") |
|
|
this.clearData() |
|
|
this.clearData() |
|
|
}).catch(error=>{ |
|
|
}).catch(error => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.showMessage(error) |
|
|
this.showMessage(error) |
|
|
}) |
|
|
}) |
|
@ -298,13 +301,13 @@ |
|
|
}, |
|
|
}, |
|
|
clearData() { |
|
|
clearData() { |
|
|
this.deviceCode = "" |
|
|
this.deviceCode = "" |
|
|
this.deviceName=""; |
|
|
this.deviceCheckCode = "" |
|
|
this.dateTime =""; |
|
|
this.deviceName = ""; |
|
|
|
|
|
this.dateTime = ""; |
|
|
this.dateTime = "", |
|
|
this.dateTime = "", |
|
|
this.deviceCode = "", |
|
|
|
|
|
this.deviceName = "", |
|
|
this.deviceName = "", |
|
|
this.worker="" |
|
|
this.worker = "" |
|
|
this.dataList=[] |
|
|
this.dataList = [] |
|
|
// this.reset(); |
|
|
// this.reset(); |
|
|
}, |
|
|
}, |
|
|
reset() { |
|
|
reset() { |
|
@ -317,18 +320,18 @@ |
|
|
closeScanPopup() { |
|
|
closeScanPopup() { |
|
|
this.$refs.scanPopup.closeScanPopup(); |
|
|
this.$refs.scanPopup.closeScanPopup(); |
|
|
}, |
|
|
}, |
|
|
deviceClear(){ |
|
|
deviceClear() { |
|
|
this.deviceCode=""; |
|
|
this.deviceCode = ""; |
|
|
this.deviceCheckCode="" |
|
|
this.deviceCheckCode = "" |
|
|
}, |
|
|
}, |
|
|
showMessage(hint){ |
|
|
showMessage(hint) { |
|
|
showConfirmMsg("提示", hint,false,callBack=>{ |
|
|
showConfirmMsg("提示", hint, false, callBack => { |
|
|
|
|
|
|
|
|
} ) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
onConfirmDevice(data){ |
|
|
onConfirmDevice(data) { |
|
|
if(data==undefined||data==""){ |
|
|
if (data == undefined || data == "") { |
|
|
this.showMessage("请扫描设备编号") |
|
|
this.showMessage("扫描数据为空,请输入设备编号") |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -338,7 +341,7 @@ |
|
|
}) |
|
|
}) |
|
|
getFoamDeviceInfo(data).then(res => { |
|
|
getFoamDeviceInfo(data).then(res => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.deviceCode = data; |
|
|
this.deviceCode = ""; |
|
|
this.deviceCheckCode = data; |
|
|
this.deviceCheckCode = data; |
|
|
console.log(data) |
|
|
console.log(data) |
|
|
var groupSelect = { |
|
|
var groupSelect = { |
|
@ -349,11 +352,12 @@ |
|
|
} |
|
|
} |
|
|
this.dataList = res.Result; |
|
|
this.dataList = res.Result; |
|
|
this.dataList.push(groupSelect) |
|
|
this.dataList.push(groupSelect) |
|
|
this.deviceName=this.dataList[0].Name; |
|
|
this.deviceName = this.dataList[0].Name; |
|
|
this.dateTime = getCurrDateTime() |
|
|
this.dateTime = getCurrDateTime() |
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
|
|
|
this.deviceCode = ""; |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.showMessage(error) |
|
|
this.showMessage("扫描设备[" + data + "]" + error) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|