Browse Source

修改泡沫点检提交

master
lijuncheng 7 months ago
parent
commit
730473fedc
  1. 2
      src/api/request2.js
  2. 27
      src/mycomponents/form/customerFrom.vue
  3. 133
      src/pages/foam/check.vue
  4. 106
      src/pages/foam/input.vue
  5. 321
      src/pages/plastics/check.vue
  6. 12
      src/pages/plastics/input.vue

2
src/api/request2.js

@ -243,7 +243,7 @@ export function foamMaterialInputSubmit(params) {
*/ */
export function foamCheckSubmit(params) { export function foamCheckSubmit(params) {
return request({ return request({
url: baseApi + "/system/captcha/captchaImage", url: baseApi + "/MachineClass/Insert",
method: "post", method: "post",
data: params, data: params,
}); });

27
src/mycomponents/form/customerFrom.vue

@ -371,23 +371,24 @@
} }
this.formData.forEach(res => { this.formData.forEach(res => {
if (res.SelectName.includes("班")) { if(res.SelectName){
var value = this.dataClassList.filter(item => item.name == res.SelectName) if (res.SelectName.includes("班")) {
if (value.length > 0) { var value = this.dataClassList.filter(item => item.name == res.SelectName)
res.SelectValue = value[0].value if (value.length > 0) {
} else { res.SelectValue = value[0].value
res.SelectValue = "" } else {
} res.SelectValue = ""
} else { }
var value = this.dataList.filter(item => item.name == res.SelectName)
if (value.length > 0) {
res.SelectValue = value[0].value
} else { } else {
res.SelectValue = res.SelectName var value = this.dataList.filter(item => item.name == res.SelectName)
if (value.length > 0) {
res.SelectValue = value[0].value
} else {
res.SelectValue = res.SelectName
}
} }
} }
}) })
callBack(this.formData) callBack(this.formData)
} catch (error) { } catch (error) {
this.showHint("", error.message) this.showHint("", error.message)

133
src/pages/foam/check.vue

@ -2,28 +2,54 @@
<view class="page-wraper"> <view class="page-wraper">
<view class="page-header flex" <view class="page-header flex"
style="font-size: 32rpx; padding-left: 10rpx; padding-top: 10rpx; flex-direction: column;"> style="font-size: 32rpx; padding-left: 10rpx; padding-top: 10rpx; flex-direction: column;">
<view class="flex u-col-center space-between"> <!-- <view class="flex u-col-center space-between"> -->
<view class=""> <!-- <view class="">
<view class="" style="margin: 5rpx; font-weight: bold;"> <view class="" style="margin: 5rpx; font-weight: bold;">
设备编号 : {{deviceCode}} 设备编号 : {{deviceCode}}
</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}}
</view> </view> -->
<!-- <text v-if="deviceName!=''">({{deviceName}})</text> --> <!-- <text v-if="deviceName!=''">({{deviceName}})</text> -->
</view> <!-- </view> -->
<view class=""> <!-- <view class="">
<button type="primary" size="mini" @click="openScanPopup">扫描</button> <button type="primary" size="mini" @click="openScanPopup">扫描</button>
</view> </view> -->
</view> <!-- </view> -->
<view class="" style="margin: 5rpx;" v-if="deviceName!=''"> <!-- <view class="" style="margin: 5rpx;" v-if="deviceName!=''">
点检日期 : {{dateTime}} 点检日期 : {{dateTime}}
</view> </view>
<view class="" style="margin: 5rpx;" v-if="deviceName!=''"> <view class="" style="margin: 5rpx;" v-if="deviceName!=''">
点检人 : {{worker}} 点检人 : {{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=""
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>
<view class="" style="width: 100%;background-color: gray;height: 2rpx; margin-top: 10rpx;" /> <view class="" style="width: 100%;background-color: gray;height: 2rpx; margin-top: 10rpx;" />
</view> </view>
@ -38,7 +64,7 @@
<view class="uni-flex u-col-center space-between padding_10" <view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; "> style="background-color:ghostwhite; width: 100%; ">
<view class=""> <view class="">
<button class="btn_single_reset" hover-class="btn_single_after" @click="reset">重置</button> <button class="btn_single_reset" hover-class="btn_single_after" @click="clearData">清空</button>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="submit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="submit">提交</button>
@ -76,6 +102,7 @@
return { return {
dateTime: "", dateTime: "",
deviceCode: "", deviceCode: "",
deviceCheckCode:"",
deviceName: "", deviceName: "",
worker: this.$store.state.user.name, worker: this.$store.state.user.name,
dataList: [], dataList: [],
@ -202,9 +229,12 @@
computed: {}, computed: {},
onLoad() { onLoad() {
},
mounted() {
this.$refs.inputDevice.focused = true
}, },
onReady() { onReady() {
this.openScanPopup(); // this.openScanPopup();
}, },
methods: { methods: {
getScanResult(result) { getScanResult(result) {
@ -216,7 +246,6 @@
uni.hideLoading() uni.hideLoading()
this.deviceCode = result; this.deviceCode = result;
console.log(result) console.log(result)
this.reset();
this.closeScanPopup(); this.closeScanPopup();
var groupSelect = { var groupSelect = {
Type: "4", Type: "4",
@ -227,19 +256,10 @@
// this.dataList = this.formData // this.dataList = this.formData
this.dataList = res.Result; this.dataList = res.Result;
this.dataList.push(groupSelect) 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.deviceName=this.dataList[0].Name;
this.dateTime = getCurrDateTime() this.dateTime = getCurrDateTime()
this.worker = this.$store.state.user.name
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
this.showMessage(error) this.showMessage(error)
@ -256,6 +276,7 @@
}, },
submit() { submit() {
if (this.deviceCode == "") { if (this.deviceCode == "") {
this.deviceCheckCode=""
this.$refs.comMessage.showMessage("提示", "请先扫描设备编号") this.$refs.comMessage.showMessage("提示", "请先扫描设备编号")
return return
} }
@ -269,34 +290,35 @@
} }
}) })
var commitData={ var commitData={
LoginUserID:this.$store.state.user.id, id:this.$store.state.user.id,
UserName:this.$store.state.user.name,
createTime:getCurrDateTime(), createTime:getCurrDateTime(),
groupName:groupName, groupName:groupName,
groupValue:groupValue, groupValue:groupValue,
dataList:data 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)
// })
console.log("提交", JSON.stringify(commitData))
foamCheckSubmit(commitData).then(res=>{
uni.hideLoading()
this.showMessage("提交成功")
this.clearData()
}).catch(error=>{
uni.hideLoading()
this.showMessage(error)
})
}) })
}, },
clearData() { clearData() {
this.deviceCode = "" this.deviceCode = ""
this.deviceName="";
this.dateTime ="";
this.dateTime = "", this.dateTime = "",
this.deviceCode = "", this.deviceCode = "",
this.deviceName = "", this.deviceName = "",
this.reset(); this.worker=""
}, this.dataList=[]
// this.reset();
},
reset() { reset() {
this.$refs.customerFrom.reset() this.$refs.customerFrom.reset()
}, },
@ -307,9 +329,44 @@
closeScanPopup() { closeScanPopup() {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
}, },
deviceClear(){
this.deviceCode="";
this.deviceCheckCode=""
},
showMessage(hint){ showMessage(hint){
this.$refs.comMessage.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.closeScanPopup();
var groupSelect = {
Type: "4",
Content: "选择班组",
SelectName: "",
SelectValue: "",
}
this.dataList = res.Result;
this.dataList.push(groupSelect)
this.deviceName=this.dataList[0].Name;
this.dateTime = getCurrDateTime()
}).catch(error => {
uni.hideLoading()
this.showMessage(error)
})
},
} }
} }

106
src/pages/foam/input.vue

@ -22,12 +22,13 @@
<!-- <view class="" style="font-size: 35rpx;"> <!-- <view class="" style="font-size: 35rpx;">
计划单号 计划单号
</view> --> </view> -->
<uni-section title="计划单号" subTitle="选择计划单号" subTitleFontSize="26rpx" titleFontSize="35rpx" type="line" > <uni-section title="计划单号" subTitle="选择计划单号" subTitleFontSize="26rpx" titleFontSize="35rpx"
</uni-section> type="line">
</uni-section>
<view class="uni-flex space-between"> <view class="uni-flex space-between">
<view class="" style="width: 80%; "> <view class="" style="width: 80%; ">
<input class="input" disabled v-model="planNumber" /> <uni-easyinput disabled style="margin-left: 10rpx; margin-right: 10rpx;" trim="all" v-model="planNumber"></uni-easyinput>
</view> </view>
<view class="uni-flex" style="width: 20%; align-items: center;"> <view class="uni-flex" style="width: 20%; align-items: center;">
<button type="primary" size="mini" @click="showPlanSelect">单号</button> <button type="primary" size="mini" @click="showPlanSelect">单号</button>
@ -37,28 +38,35 @@
</view> </view>
<view class="uni-flex uni-column " style="margin: 10rpx;"> <view class="uni-flex uni-column " style="margin: 10rpx;">
<uni-section title="原料名称" subTitle="输入或者选择原料名称" subTitleFontSize="26rpx" titleFontSize="35rpx" type="line"> <uni-section title="原料名称" subTitle="输入或者选择原料名称" subTitleFontSize="26rpx" titleFontSize="35rpx"
</uni-section> type="line">
<view class="uni-flex space-between"> </uni-section>
<view class="uni-flex space-between uni-row u-col-center" >
<view class="" style="width: 80%;"> <view class="" style="width: 80%;">
<!-- <input id='inputSelect' class="input" v-model="materialName" @focus="render._inputFocus" /> --> <!-- <input id='inputSelect' class="input" v-model="materialName" @focus="render._inputFocus" /> -->
<input id='inputSelect' class="input" v-model="materialName" @focus="render._inputFocus" /> <!-- <input id='inputSelect' class="input" v-model="materialName" @focus="render._inputFocus" /> -->
<uni-easyinput class="" style="margin-left: 10rpx; margin-right: 10rpx;" trim="all" v-model="materialName"></uni-easyinput>
</view> </view>
<view class="uni-flex" style="width: 20%; align-items: center;"> <view class="uni-flex u-col-center" style="width: 20%; margin-left: 10rpx; ">
<button type="primary" size="mini" @click="showMaterialSelect">原料</button> <button type="primary" size="mini" @click="showMaterialSelect">原料</button>
</view> </view>
</view> </view>
</view> </view>
<view class="uni-flex uni-column " style="margin: 10rpx;"> <view class="uni-flex uni-column " style="margin: 10rpx;">
<uni-section title="原料投入量" subTitle="输入原料投入量" subTitleFontSize="26rpx" titleFontSize="35rpx" type="line"> <uni-section title="原料投入量" subTitle="输入原料投入量" subTitleFontSize="26rpx" titleFontSize="35rpx"
</uni-section> type="line">
</uni-section>
<view class="uni-flex space-between"> <view class="uni-flex space-between">
<view class="" style="width: 50%;"> <view class="" style="width: 50%;">
<input class="input" v-model="materialQty" type="digit" /> <uni-easyinput class="uni-mt-5" trim="all" type="digit" ref="inputQty"
v-model="materialQty"></uni-easyinput>
<!-- <input class="input" v-model="materialQty" type="digit" /> -->
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
@ -85,13 +93,13 @@
</template> </template>
<script module="render" lang="renderjs"> <script module="render" lang="renderjs">
export default { export default {
methods: { methods: {
_inputFocus (event) { _inputFocus(event) {
document.querySelector('#inputSelect input').select() document.querySelector('#inputSelect input').select()
} }
} }
} }
</script> </script>
<script> <script>
import { import {
@ -102,7 +110,7 @@
import { import {
getPlaneNumberList, getPlaneNumberList,
getMaterialLists, getMaterialLists,
foamCheckSubmit foamInputSubmit
} from '@/api/request2.js'; } from '@/api/request2.js';
import showModal from '../../mycomponents/common/showModal.vue' import showModal from '../../mycomponents/common/showModal.vue'
import winScanNormal from "@/mycomponents/scan/winScanNormal.vue" import winScanNormal from "@/mycomponents/scan/winScanNormal.vue"
@ -118,25 +126,24 @@
return { return {
dateTime: "", dateTime: "",
planNumber: "", planNumber: "",
materialName:"", materialName: "",
materialCode:"", materialCode: "",
materialQty:"", materialQty: "",
planName: "", planName: "",
dataList: [], dataList: [],
userForm: { userForm: {
names: [], names: [],
values: [], values: [],
origin: [] origin: []
} },
materialList:[]
} }
}, },
computed: {}, computed: {},
onLoad() { onLoad() {},
}, onUnload() {},
onUnload() {
},
onReady() { onReady() {
}, },
@ -150,7 +157,7 @@
console.log(event.detail); console.log(event.detail);
}, },
submit() { submit() {
if (this.planNumber == "") { if (this.planNumber == "123") {
this.showMessage("请选择计划单号") this.showMessage("请选择计划单号")
return return
} }
@ -158,20 +165,24 @@
this.showMessage("请输入原料名称") this.showMessage("请输入原料名称")
return return
} }
if (this.materialQty == ""||this.materialQty==0) { if (this.materialQty == "" || this.materialQty == 0) {
this.showMessage("请输入原料数量") this.showMessage("请输入原料数量")
return return
} }
uni.showLoading({ uni.showLoading({
title:"加载中", title: "加载中",
mask:true mask: true
}) })
var param ={ var param = {
planNumber:this.planNumber, planNumber: this.planNumber,
materialName:this.materialName, materialName: this.materialName,
materialQty:this.materialQty materialQty: this.materialQty,
UserName:this.$store.state.user.id,
createTime:getCurrDateTime(),
} }
// foamMaterialInputSubmit(param).then(res=>{ console.log("提交", JSON.stringify(param))
// foamInputSubmit(param).then(res=>{
// uni.hideLoading() // uni.hideLoading()
// this.showMessage("") // this.showMessage("")
// this.resetData() // this.resetData()
@ -180,20 +191,20 @@
// this.showMessage(error) // this.showMessage(error)
// }) // })
}, },
showMessage(hint){ showMessage(hint) {
this.$refs.comMessage.showMessage("提示", hint) this.$refs.comMessage.showMessage("提示", hint)
}, },
resetData() { resetData() {
this.planNumber =""; this.planNumber = "";
this.materialName="" this.materialName = ""
this.materialQty=0 this.materialQty = 0
}, },
showPlanSelect() { showPlanSelect() {
uni.showLoading({ uni.showLoading({
title:"加载中", title: "加载中",
mask:true mask: true
}) })
getPlaneNumberList().then(res=>{ getPlaneNumberList().then(res => {
uni.hideLoading() uni.hideLoading()
this.$refs.selectPopup.open({ this.$refs.selectPopup.open({
mode: 'radio', //radio checkbox mode: 'radio', //radio checkbox
@ -211,7 +222,7 @@
value: 'code' value: 'code'
} }
}) })
}).catch(error=>{ }).catch(error => {
uni.hideLoading() uni.hideLoading()
this.showMessage(error) this.showMessage(error)
}) })
@ -269,7 +280,7 @@
this.$refs.selectPopupMaterial.open({ this.$refs.selectPopupMaterial.open({
mode: 'radio', //radio checkbox mode: 'radio', //radio checkbox
dataList: getMaterialList(), //dataList使proxyConfig dataList: this.materialList, //dataList使proxyConfig
// selected: this.userForm.values, // // selected: this.userForm.values, //
// proxyConfig: { // // proxyConfig: { //
// reqFun: this.reqGetList, // // reqFun: this.reqGetList, //
@ -285,8 +296,9 @@
}) })
}, },
selectMaterial(mode, data){ selectMaterial(mode, data) {
this.materialName = data.name this.materialName = data.name
this.$refs.inputQty.focused = true
console.log("selectPopupMaterial") console.log("selectPopupMaterial")
}, },
reqGetList(data) { reqGetList(data) {

321
src/pages/plastics/check.vue

@ -1,28 +1,68 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class="page-header flex" <view class="page-header flex"
style="font-size: 35rpx; padding-left: 20rpx; padding-top: 20rpx; flex-direction: column;"> style="font-size: 32rpx; padding-left: 10rpx; padding-top: 10rpx; flex-direction: column;">
<view class="flex u-col-center space-between"> <!-- <view class="flex u-col-center space-between"> -->
<view class=""> <!-- <view class="">
设备编号 : {{deviceCode}} <view class="" style="margin: 5rpx; font-weight: bold;">
<text v-if="deviceName!=''">({{deviceName}})</text> 设备编号 : {{deviceCode}}
</view>
<view class="" style="margin: 5rpx; font-weight: bold;" v-if="deviceName!=''">
设备名称 : {{deviceName}}
</view> -->
</view> <!-- <text v-if="deviceName!=''">({{deviceName}})</text> -->
<view class=""> <!-- </view> -->
<!-- <view class="">
<button type="primary" size="mini" @click="openScanPopup">扫描</button> <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> </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>
<view class="page-main"> <view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view> <view style="padding-bottom: 80rpx;">
<customerFrom ref="customerFrom" :formData="formData"> </customerFrom> <customerFrom ref="customerFrom" :formData="dataList"> </customerFrom>
</view> </view>
</scroll-view> </scroll-view>
</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" <view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; "> style="background-color:ghostwhite; width: 100%; ">
<view class=""> <view class="">
@ -34,35 +74,112 @@
</view> </view>
</view> </view>
<winScanNormal ref="scanPopup" title="设备编号" @getResult='getScanResult'></winScanNormal> <winScanNormal ref="scanPopup" title="设备编号" @getResult='getScanResult'></winScanNormal>
<showModal ref="comMessage"></showModal>
</view> </view>
</template> </template>
<script> <script>
import showModal from '../../mycomponents/common/showModal.vue'
import customerFrom from "@/mycomponents/form/customerFrom.vue" import customerFrom from "@/mycomponents/form/customerFrom.vue"
import winScanNormal from "@/mycomponents/scan/winScanNormal.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 { export default {
components: { components: {
customerFrom, customerFrom,
winScanNormal winScanNormal,
showModal
}, },
data() { data() {
return { return {
dateTime: "",
deviceCode: "", deviceCode: "",
deviceCheckCode:"",
deviceName: "", deviceName: "",
worker: this.$store.state.user.name,
dataList: [],
formData: [{ formData: [{
type: "inputAndSelect", type: "stateSelect",
position: "PB", position: "PB",
content: "检查各个管路及接头", content: "检查各个管路及接头",
methond: "目视野无液体渗出", methond: "目视野无液体渗出",
placeholder: "请输入点检状态", placeholder: "请输入点检状态",
name: "",
value: "",
},
{
type: "inputAndSelect",
check: true,
position: "开孔机",
content: "检查油温",
methond: "目视80°C~100°C",
lower: 80,
upper: 100,
placeholder: "请输入点检状态",
name: '', name: '',
value: "", value: "",
}, },
{ {
type: "inputAndSelect", 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", position: "PB",
content: "电机检查", content: "电机检查",
methond: "倾听无异响", methond: "倾听无异响",
@ -71,7 +188,7 @@
value: "", value: "",
}, },
{ {
type: "inputAndSelect", type: "stateSelect",
position: "PB", position: "PB",
content: "检查气源气压", content: "检查气源气压",
methond: "倾听无异响", methond: "倾听无异响",
@ -80,7 +197,27 @@
value: "", 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: "选择班组", content: "选择班组",
placeholder: "请选择班组", placeholder: "请选择班组",
name: '', name: '',
@ -92,24 +229,107 @@
} }
}, },
computed: {}, computed: {},
onLoad() {}, onLoad() {
onReady() {
},
mounted() {
this.$refs.inputDevice.focused = true
},
onReady() {
// this.openScanPopup();
}, },
methods: { methods: {
getScanResult(result) { getScanResult(result) {
this.deviceCode = result; uni.showLoading({
this.deviceName = "自配料系统" title: "加载中",
console.log(result) mask: true
this.reset(); })
this.closeScanPopup(); 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() { submit() {
this.$refs.customerFrom.submit(callBack => { if (this.deviceCode == "") {
console.log("提交", JSON.stringify(callBack)) 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() { reset() {
this.$refs.customerFrom.reset() this.$refs.customerFrom.reset()
}, },
@ -120,6 +340,57 @@
closeScanPopup() { closeScanPopup() {
this.$refs.scanPopup.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)
})
},
} }
} }

12
src/pages/plastics/input.vue

@ -38,7 +38,7 @@
<view class="uni-flex"> <view class="uni-flex">
<uni-easyinput <uni-easyinput
@clear="bucketClear" @clear="bucketClear"
ref="inputBucketCode" class="uni-mt-5" trim="all" v-model="bucketCode" ref="inputBucketCode" class="" trim="all" v-model="bucketCode"
@confirm="onConfirmBucketCode" ></uni-easyinput> @confirm="onConfirmBucketCode" ></uni-easyinput>
</view> </view>
@ -52,7 +52,7 @@
<uni-easyinput <uni-easyinput
ref="inputItemCode" ref="inputItemCode"
@clear="itemClear" @clear="itemClear"
class="uni-mt-5" trim="all" v-model="itemCode" class="" trim="all" v-model="itemCode"
@confirm="onConfirmItemCode" ></uni-easyinput> @confirm="onConfirmItemCode" ></uni-easyinput>
</view> </view>
</view> </view>
@ -62,7 +62,7 @@
</uni-section> </uni-section>
<view class="uni-flex space-between"> <view class="uni-flex space-between">
<uni-easyinput <uni-easyinput
class="uni-mt-5" class=""
trim="all" trim="all"
ref="inputBatchCode" ref="inputBatchCode"
v-model="batchCode" v-model="batchCode"
@ -75,7 +75,7 @@
</uni-section> </uni-section>
<view class="uni-flex space-between"> <view class="uni-flex space-between">
<uni-easyinput <uni-easyinput
class="uni-mt-5" class=""
trim="all" trim="all"
ref="inputReferenceCode" ref="inputReferenceCode"
v-model="referenceCode" v-model="referenceCode"
@ -88,7 +88,7 @@
</uni-section> </uni-section>
<view class="uni-flex space-between"> <view class="uni-flex space-between">
<uni-easyinput <uni-easyinput
class="uni-mt-5" class=""
ref="inputSupplierCode" ref="inputSupplierCode"
trim="all" trim="all"
v-model="supplierCode" v-model="supplierCode"
@ -101,7 +101,7 @@
</uni-section> </uni-section>
<view class="uni-flex space-between"> <view class="uni-flex space-between">
<uni-easyinput <uni-easyinput
class="uni-mt-5" class=""
trim="all" trim="all"
ref="inputWeight" ref="inputWeight"
v-model="weight" v-model="weight"

Loading…
Cancel
Save