<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_ZPH" :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="ZPH" :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="neworold" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">位置(侧/中)</u-td>
|
<u-td>
|
<u-input v-model="POS" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">螺栓型号</u-td>
|
<u-td>
|
<u-input v-model="LSXH" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">材质(铸钢)</u-td>
|
<u-td>
|
<u-input v-model="MAT" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
|
<u-tr>
|
<u-td width="30%">产地(进口/国产)</u-td>
|
<u-td>
|
<u-input v-model="SITE" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">毂孔直径A1</u-td>
|
<u-td>
|
<u-input v-model="GKA1" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">毂孔直径A2</u-td>
|
<u-td>
|
<u-input v-model="GKA2" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">毂孔直径A3</u-td>
|
<u-td>
|
<u-input v-model="GKA3" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">毂孔直径A</u-td>
|
<u-td>
|
<u-input v-model="GKA" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">毂孔直径B1</u-td>
|
<u-td>
|
<u-input v-model="GKB1" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">毂孔直径B2</u-td>
|
<u-td>
|
<u-input v-model="GKB2" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">毂孔直径B3</u-td>
|
<u-td>
|
<u-input v-model="GKB3" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">毂孔直径B</u-td>
|
<u-td>
|
<u-input v-model="GKB" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">毂孔直径C1</u-td>
|
<u-td>
|
<u-input v-model="GKC1" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">毂孔直径C2</u-td>
|
<u-td>
|
<u-input v-model="GKC2" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">毂孔直径C3</u-td>
|
<u-td>
|
<u-input v-model="GKC3" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">毂孔直径C</u-td>
|
<u-td>
|
<u-input v-model="GKC" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">毂孔直径</u-td>
|
<u-td>
|
<u-input v-model="GKJZ" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">螺栓侧剩余磨耗</u-td>
|
<u-td>
|
<u-input v-model="LSCSYMH" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">螺母侧剩余磨耗</u-td>
|
<u-td>
|
<u-input v-model="LMCSYMH" :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-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_ZPH: '',
|
ZPH: '',
|
LSXH: '',
|
POS: '',
|
MAT: '',
|
//车型
|
chexing: '',
|
SITE: '',
|
LMCSYMH: '',
|
GKA1: '',
|
GKA3: '',
|
GKA2: '',
|
GKA: '',
|
GKB1: '',
|
GKB3: '',
|
GKB2: '',
|
GKB: '',
|
GKC1: '',
|
GKC3: '',
|
GKC2: '',
|
GKC: '',
|
GKJZ: '',
|
//入库日期
|
rksj: '',
|
//新/旧
|
neworold: '',
|
LSCSYMH:'',
|
qrcodeFocus: true,
|
}
|
},
|
methods: {
|
UserChange(value) {
|
|
},
|
setTimer() {
|
if (this.timer == null) {
|
this.timer = setInterval(() => {
|
this.date = this.$DateTool.getDate();
|
}, 1000)
|
}
|
|
},
|
barcodeChange() {
|
if (_this.value_ZPH == '') {
|
_this.initInfo();
|
return;
|
}
|
let data = {
|
MainData: {
|
ZPH: _this.value_ZPH
|
},
|
};
|
_this.$AjaxRequest.Params('post', 'ToZY/getZDPInfo', 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.ZPH = obj.ZPH;
|
_this.POS = obj.POS;
|
_this.LSXH = obj.LSXH;
|
_this.MAT = obj.MAT;
|
_this.chexing = obj.chexing;
|
_this.SITE = obj.SITE;
|
//新/旧
|
_this.neworold = obj.newold;
|
_this.GKA1 = obj.GKA1;
|
_this.GKA2 = obj.GKA2;
|
_this.GKA3 = obj.GKA3;
|
_this.GKA = obj.GKA;
|
_this.GKB1 = obj.GKB1;
|
_this.GKB2 = obj.GKB2;
|
_this.GKB3 = obj.GKB3;
|
_this.GKB = obj.GKB;
|
_this.GKC1 = obj.GKC1;
|
_this.GKC2 = obj.GKC2;
|
_this.GKC3 = obj.GKC3;
|
_this.GKC = obj.GKC;
|
_this.GKJZ = obj.GKJZ;
|
_this.LMCSYMH = obj.LMCSYMH;
|
//入库日期
|
_this.rksj = obj.rksj;
|
_this.LSCSYMH=obj.LSCSYMH;
|
} else {
|
uni.showToast({
|
icon: 'none',
|
title: "请求错误:" + result.data.message,
|
duration: 5000
|
});
|
_this.initInfo();
|
}
|
}).catch(function(err) {
|
uni.showToast({
|
icon: 'none',
|
title: "请求后台异常,错误信息." + err.errMsg,
|
duration: 5000
|
});
|
_this.initInfo();
|
});
|
},
|
initInfo() {
|
//制动盘号
|
_this.ZPH = '';
|
_this.POS = '';
|
//车类别
|
_this.LSXH = '';
|
//轮类型
|
_this.MAT = '';
|
//车型
|
_this.chexing = '';
|
//轮型
|
_this.SITE = '';
|
//新/旧
|
_this.neworold = '';
|
_this.GKA1 = '';
|
_this.GKA2 = '';
|
_this.GKA3 = '';
|
_this.GKA = '';
|
_this.GKB1 = '';
|
_this.GKB2 = '';
|
_this.GKB3 = '';
|
_this.GKB = '';
|
_this.GKC1 = '';
|
_this.GKC2 = '';
|
_this.GKC3 = '';
|
_this.GKC = '';
|
_this.GKJZ = '';
|
_this.LMCSYMH = '';
|
_this.rksj = '';
|
|
_this.LSCSYMH='';
|
|
},
|
SaveInfomation() {
|
//_this.LotNumber == '' || _this.value_rfid.length == 0 ||
|
|
if (_this.value_ZPH.length == 0 ) {
|
|
uni.showToast({
|
title: "制动盘信息不能为空",
|
duration: 5000,
|
icon: 'none',
|
});
|
return;
|
}
|
|
uni.showModal({
|
title: '提示',
|
content: '是否确认组盘?',
|
success: function(res) {
|
if (res.confirm) {
|
let data = {
|
MainData: {
|
code: _this.value_ZPH,
|
ZPH: _this.ZPH,
|
POS: _this.POS,
|
LSXH: _this.LSXH,
|
MAT: _this.MAT,
|
chexing: _this.chexing,
|
SITE: _this.SITE,
|
neworold: _this.neworold,
|
GKA1: _this.GKA1,
|
GKA2: _this.GKA2,
|
GKA3: _this.GKA3,
|
GKA: _this.GKA,
|
GKB1: _this.GKB1,
|
GKB2: _this.GKB2,
|
GKB3: _this.GKB3,
|
GKB: _this.GKB,
|
GKC1: _this.GKC1,
|
GKC2: _this.GKC2,
|
GKC3: _this.GKC3,
|
GKC: _this.GKC,
|
GKJZ: _this.GKJZ,
|
clsx: _this.clsx,
|
rksj: _this.rksj,
|
LMCSYMH:_this.LMCSYMH,
|
LSCSYMH:_this.LSCSYMH,
|
},
|
};
|
_this.$AjaxRequest.Params('post', 'ToAPP/SaveCLinfo',
|
data, _user.token);
|
_this.$AjaxRequest.Request().then(function(result) {
|
if (result.data.status) {
|
uni.showToast({
|
title: "保存成功!",
|
duration: 5000
|
});
|
_this.value_ZPH = "";
|
_this.initInfo();
|
_this.qrcodeFocus = true;
|
} else {
|
uni.showToast({
|
icon: 'none',
|
title: "请求错误:" + result.data.message,
|
duration: 5000
|
});
|
}
|
}).catch(function(err) {
|
uni.showToast({
|
icon: 'none',
|
title: "请求后台异常,错误信息:" + err.errMsg,
|
duration: 5000
|
});
|
});
|
} 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>
|