<template>
|
<view>
|
<view>
|
<u-table font-size="25">
|
<u-tr>
|
<u-td>
|
<xfl-select :list="UserArray" :initValue="this.$UserTool.UserInfo.userName" :clearable="false"
|
:disabled="true">
|
</xfl-select>
|
</u-td>
|
<u-td width="25%">现在时间:</u-td>
|
<u-td width="25%">{{date}}</u-td>
|
</u-tr>
|
</u-table>
|
</view>
|
|
<view style="padding: 20rpx 0rpx">
|
<u-table>
|
<u-tr>
|
<u-td width="30%">车轮条码</u-td>
|
<u-td>
|
<u-input v-model="value_cltm" :border="true" :focus="qrcodeFocus" @input="barcodeChange"
|
placeholder="车轮条码" />
|
</u-td>
|
</u-tr>
|
<!-- <u-tr>
|
<u-td width="30%">序列号</u-td>
|
<u-td>
|
<u-input v-model="xlh" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr> -->
|
<u-tr>
|
<u-td width="30%">车轮号</u-td>
|
<u-td>
|
<u-input v-model="clh" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">轮对条码</u-td>
|
<u-td>
|
<u-input v-model="ldtm" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">动拖属性(动/拖)</u-td>
|
<u-td>
|
<u-input v-model="mttype" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">轮对号</u-td>
|
<u-td>
|
<u-input v-model="ldh" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">车型</u-td>
|
<u-td>
|
<u-input v-model="chexing" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">轮型</u-td>
|
<u-td>
|
<u-input v-model="ldxh" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">新/旧</u-td>
|
<u-td>
|
<u-input v-model="neworold" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">毂孔等级</u-td>
|
<u-td>
|
<u-input v-model="gkdj" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">毂孔a界面均值</u-td>
|
<u-td>
|
<u-input v-model="gkzja" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">毂孔b界面均值</u-td>
|
<u-td>
|
<u-input v-model="gkzjb" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">毂孔c界面均值</u-td>
|
<u-td>
|
<u-input v-model="gkzjc" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">毂孔均值</u-td>
|
<u-td>
|
<u-input v-model="gkcc" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">轮径值</u-td>
|
<u-td>
|
<u-input v-model="ljz" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">预估轮径值</u-td>
|
<u-td>
|
<u-input v-model="yglj" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">属性</u-td>
|
<u-td>
|
<u-input v-model="clsx" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">入库日期</u-td>
|
<u-td>
|
<u-input v-model="rksj" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">配属局</u-td>
|
<u-td>
|
<u-input v-model="psj" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">车组号</u-td>
|
<u-td>
|
<u-input v-model="lcch" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">轮缘</u-td>
|
<u-td>
|
<u-input v-model="lyh" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
</u-table>
|
</view>
|
<view style="padding: 0rpx 0rpx;">
|
<u-table>
|
<u-tr>
|
<u-td>
|
<u-button style="width:100px" type="primary" @click="SaveInfomation">确认</u-button>
|
</u-td>
|
</u-tr>
|
</u-table>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
var _this;
|
var _user;
|
export default {
|
data() {
|
return {
|
date: '',
|
CurrentUser: '', //当前用户
|
|
//车轮码
|
value_cltm: '',
|
|
//序列号
|
//xlh: '',
|
//车轮号
|
clh: '',
|
//车类别
|
mttype: '',
|
//轮对条码
|
ldtm: '',
|
//轮类型
|
ldh: '',
|
//车型
|
chexing: '',
|
//轮型
|
ldxh: '',
|
//属性
|
clsx: '',
|
//车组号
|
lcch: '',
|
//轮缘
|
lyh:'',
|
//等级
|
gkdj: '',
|
//毂孔直径均值
|
ljz: '',
|
//预估轮径值
|
yglj: '',
|
//毂孔a界面均值
|
gkzja: '',
|
//毂孔b界面均值
|
gkzjb: '',
|
//毂孔c界面均值
|
gkzjc: '',
|
//入库日期
|
rksj: '',
|
//配属局
|
psj: '',
|
//新/旧
|
neworold: '',
|
//毂孔均值
|
gkcc:'',
|
qrcodeFocus: true,
|
}
|
},
|
methods: {
|
UserChange(value) {
|
|
},
|
setTimer() {
|
if (this.timer == null) {
|
this.timer = setInterval(() => {
|
this.date = this.$DateTool.getDate();
|
}, 1000)
|
}
|
|
},
|
barcodeChange() {
|
if (_this.value_cltm == '') {
|
_this.initInfo();
|
return;
|
}
|
let data = {
|
MainData: {
|
cltm: _this.value_cltm
|
},
|
};
|
_this.$AjaxRequest.Params('post', 'ToZY/ZY_GetCLInfo', data, _user.token);
|
_this.$AjaxRequest.Request().then(function(result) {
|
console.log(result);
|
if (result.data.status) {
|
let obj = JSON.parse(JSON.stringify(result.data.data));
|
//序列号
|
//_this.xlh = obj.xlh;
|
//车轮号
|
_this.clh = obj.clh;
|
//轮对条码
|
_this.ldtm = obj.ldtm;
|
//车类别
|
_this.mttype = obj.mttype;
|
//轮类型
|
_this.ldh = obj.ldh;
|
//车型
|
_this.chexing = obj.chexing;
|
//轮型
|
_this.ldxh = obj.ldxh;
|
//新/旧
|
_this.neworold = obj.newold;
|
//预估轮径值
|
_this.yglj = obj.yglj;
|
//毂孔a界面均值
|
_this.gkzja = obj.gkzja;
|
//毂孔b界面均值
|
_this.gkzjb = obj.gkzjb;
|
//毂孔c界面均值
|
_this.gkzjc = obj.gkzjc;
|
//轮径值
|
_this.ljz = obj.ljz;
|
//属性
|
_this.clsx = obj.clsx;
|
//入库日期
|
_this.rksj = obj.rksj;
|
//配属局
|
_this.psj = obj.psj;
|
//车组号
|
_this.lcch = obj.lcch;
|
//轮缘
|
_this.lyh=obj.lyh;
|
//等级
|
_this.gkdj = obj.gkdj;
|
//毂孔均值
|
_this.gkcc=obj.gkcc;
|
} else {
|
uni.showToast({
|
icon: 'none',
|
title: "请求错误:" + result.data.message,
|
duration: 2000
|
});
|
_this.initInfo();
|
}
|
}).catch(function(err) {
|
uni.showToast({
|
icon: 'none',
|
title: "请求后台异常,错误信息." + err.errMsg,
|
duration: 2000
|
});
|
_this.initInfo();
|
});
|
},
|
initInfo() {
|
//序列号
|
//_this.xlh = '';
|
//车轮号
|
_this.clh = '';
|
_this.ldtm = '';
|
//车类别
|
_this.mttype = '';
|
//轮类型
|
_this.ldh = '';
|
//车型
|
_this.chexing = '';
|
//轮型
|
_this.ldxh = '';
|
//新/旧
|
_this.neworold = '';
|
//预估轮径值
|
_this.yglj = '';
|
//毂孔a界面均值
|
_this.gkzja = '';
|
//毂孔b界面均值
|
_this.gkzjb = '';
|
//毂孔c界面均值
|
_this.gkzjc = '';
|
//轮径值
|
_this.ljz = '';
|
//属性
|
_this.clsx = '';
|
//入库日期
|
_this.rksj = '';
|
//配属局
|
_this.psj = '';
|
//车组号
|
_this.lcch = '';
|
_this.lyh='';
|
//等级
|
_this.gkdj = '';
|
|
_this.gkcc='';
|
|
},
|
SaveInfomation() {
|
//_this.LotNumber == '' || _this.value_rfid.length == 0 ||
|
|
if (_this.value_cltm.length == 0 ) {
|
|
uni.showToast({
|
title: "车轮信息不能为空",
|
duration: 2000,
|
icon: 'none',
|
});
|
return;
|
}
|
|
uni.showModal({
|
title: '提示',
|
content: '是否确认组盘?',
|
success: function(res) {
|
if (res.confirm) {
|
let data = {
|
MainData: {
|
code: _this.value_cltm,
|
//xlh: _this.xlh,
|
clh: _this.clh,
|
ldtm: _this.ldtm,
|
mttype: _this.mttype,
|
ldh: _this.ldh,
|
chexing: _this.chexing,
|
ldxh: _this.ldxh,
|
neworold: _this.neworold,
|
yglj: _this.yglj,
|
gkzja: _this.gkzja,
|
gkzjb: _this.gkzjb,
|
gkzjc: _this.gkzjc,
|
clsx: _this.clsx,
|
rksj: _this.rksj,
|
psj: _this.psj,
|
lcch: _this.lcch,
|
lyh:_this.lyh,
|
gkdj: _this.gkdj,
|
ljz:_this.ljz,
|
gkcc:_this.gkcc,
|
user: _this.$UserTool.UserInfo.userName
|
},
|
};
|
_this.$AjaxRequest.Params('post', 'ToAPP/SaveCLinfo',
|
data, _user.token);
|
_this.$AjaxRequest.Request().then(function(result) {
|
if (result.data.status) {
|
uni.showToast({
|
title: "保存成功!",
|
duration: 2000
|
});
|
_this.value_cltm = "";
|
_this.initInfo();
|
_this.qrcodeFocus = true;
|
} else {
|
uni.showToast({
|
icon: 'none',
|
title: "请求错误:" + result.data.message,
|
duration: 2000
|
});
|
}
|
}).catch(function(err) {
|
uni.showToast({
|
icon: 'none',
|
title: "请求后台异常,错误信息:" + err.errMsg,
|
duration: 2000
|
});
|
});
|
} else if (res.cancel) {}
|
}
|
});
|
},
|
},
|
created: function() {
|
// 每次进入界面时,先清除之前的所有定时器,然后启动新的定时器
|
clearInterval(this.timer)
|
this.timer = null;
|
this.setTimer();
|
_user = this.$UserTool.UserInfo;
|
this.CurrentUser = _user.userName;
|
this.UserArray = [this.$UserTool.AllUserInfo];
|
},
|
destroyed: function() {
|
// 每次离开当前界面时,清除定时器
|
clearInterval(this.timer);
|
this.timer = null;
|
},
|
mounted() {
|
_this = this;
|
_this.rfidFocus = true;
|
},
|
|
|
}
|
</script>
|
|
<style scoped lang="scss">
|
.tdHeight {
|
height: 80rpx;
|
}
|
|
.loopView {
|
height: 160px;
|
background-color: #f0f0f0;
|
margin-top: 10px;
|
}
|
|
.loopItem {
|
margin-top: 5px;
|
margin-left: 15px;
|
|
}
|
|
.deleteBtn {
|
margin-top: 25px;
|
margin-left: 10px;
|
width: 120px;
|
background-color: orangered;
|
}
|
</style>
|