<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: 0rpx 0rpx">
|
<u-table>
|
<u-tr>
|
<u-td width="30%">车轴条码</u-td>
|
<u-td>
|
<u-input v-model="cztm" :focus="qrcodeFocus" :border="true" placeholder="请扫描车轴条码"
|
@input="cztmChange" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">车轴号</u-td>
|
<u-td>
|
<u-input v-model="czh" :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="chexing" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
<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="czxh" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">选配轮型(*)</u-td>
|
<u-td>
|
<u-input v-model="clxh" :border="false" :focus="clxhFocus" placeholder="请输入选配轮型" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">左轮座等级</u-td>
|
<u-td>
|
<u-input v-model="zlzdj" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">右轮座等级</u-td>
|
<u-td>
|
<u-input v-model="ylzdj" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">维修任务</u-td>
|
<u-td>
|
<u-input v-model="wxrw" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">左轮座直径</u-td>
|
<u-td>
|
<u-input v-model="zlzzj" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
<u-td width="30%">右轮座直径</u-td>
|
<u-td>
|
<u-input v-model="ylzzj" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">左轮座直径A1</u-td>
|
<u-td>
|
<u-input v-model="zlzA1" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
<u-td width="30%">右轮座直径A1</u-td>
|
<u-td>
|
<u-input v-model="ylzA1" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">左轮座直径A2</u-td>
|
<u-td>
|
<u-input v-model="zlzA2" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
<u-td width="30%">右轮座直径A2</u-td>
|
<u-td>
|
<u-input v-model="ylzA2" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">左轮座直径A3</u-td>
|
<u-td>
|
<u-input v-model="zlzA3" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
<u-td width="30%">右轮座直径A3</u-td>
|
<u-td>
|
<u-input v-model="ylzA3" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">左轮座直径A</u-td>
|
<u-td>
|
<u-input v-model="zlza" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
<u-td width="30%">右轮座直径A</u-td>
|
<u-td>
|
<u-input v-model="ylza" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">左轮座直径B1</u-td>
|
<u-td>
|
<u-input v-model="zlzB1" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
<u-td width="30%">右轮座直径B1</u-td>
|
<u-td>
|
<u-input v-model="ylzB1" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">左轮座直径B2</u-td>
|
<u-td>
|
<u-input v-model="zlzB2" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
<u-td width="30%">右轮座直径B2</u-td>
|
<u-td>
|
<u-input v-model="ylzB2" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">左轮座直径B3</u-td>
|
<u-td>
|
<u-input v-model="zlzB3" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
<u-td width="30%">右轮座直径B3</u-td>
|
<u-td>
|
<u-input v-model="ylzB3" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">左轮座直径B</u-td>
|
<u-td>
|
<u-input v-model="zlzb" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
<u-td width="30%">右轮座直径B</u-td>
|
<u-td>
|
<u-input v-model="ylzb" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">左轮座直径C1</u-td>
|
<u-td>
|
<u-input v-model="zlzC1" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
<u-td width="30%">右轮座直径C1</u-td>
|
<u-td>
|
<u-input v-model="ylzC1" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">左轮座直径C2</u-td>
|
<u-td>
|
<u-input v-model="zlzC2" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
<u-td width="30%">右轮座直径C2</u-td>
|
<u-td>
|
<u-input v-model="ylzC2" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">左轮座直径C3</u-td>
|
<u-td>
|
<u-input v-model="zlzC3" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
<u-td width="30%">右轮座直径C3</u-td>
|
<u-td>
|
<u-input v-model="ylzC3" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">左轮座直径C</u-td>
|
<u-td>
|
<u-input v-model="zlzc" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
<u-td width="30%">右轮座直径C</u-td>
|
<u-td>
|
<u-input v-model="ylzc" :border="false" :disabled="true" placeholder="" />
|
</u-td>
|
</u-tr>
|
<u-tr>
|
<u-td width="30%">车轮方向:</u-td>
|
<u-td>
|
<xfl-select :list="wheelsPositionArray" :initValue="'请选择'" :clearable="false"
|
@change="wheelsPositionChange">
|
</xfl-select>
|
</u-td>
|
</u-tr>
|
<!-- <u-tr>
|
<u-td width="30%">车轮轮型</u-td>
|
<u-td>
|
<u-input v-model="x" :border="true" placeholder="请输入车轮轮型" />
|
</u-td>
|
</u-tr> -->
|
<u-tr>
|
<u-td width="30%">新旧类别:</u-td>
|
<u-td>
|
<xfl-select :list="NOdirectionArray" :initValue="'请选择'" :clearable="false"
|
@change="NOdirectionChange">
|
</xfl-select>
|
</u-td>
|
</u-tr>
|
<!-- <u-tr>
|
<u-td width="30%">轴承类别:</u-td>
|
<u-td>
|
<xfl-select :list="StateArray" :initValue="'请选择'" :clearable="false" @change="StateChange"
|
ref="StateSelect">
|
</xfl-select>
|
</u-td>
|
</u-tr> -->
|
<!-- <u-tr>
|
<u-td width="30%">厂家:</u-td>
|
<u-td>
|
<xfl-select :list="ManufacturerArray" :initValue="'请选择'" :clearable="false"
|
@change="ManufacturerChange" ref="ManufacturerSelect">
|
</xfl-select>
|
</u-td>
|
</u-tr> -->
|
<!-- <u-tr>
|
<u-td width="30%">工位:</u-td>
|
<u-td>
|
<xfl-select :list="StationArray" :initValue="'请选择'" :clearable="false" @change="StationChange">
|
</xfl-select>
|
</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: '', //当前用户
|
cztm: '',
|
czh: '',
|
chexing: '',
|
czxh: '',
|
clxh: '',
|
zlzdj: '',
|
ylzdj: '',
|
wxrw:'',
|
ldtm: '',
|
mttype: '',
|
zlzzj: '',
|
ylzzj: '',
|
zlzA1: '',
|
ylzA1: '',
|
zlzA2: '',
|
ylzA2: '',
|
zlzA3: '',
|
ylzA3: '',
|
zlzB1: '',
|
ylzB1: '',
|
zlzB2: '',
|
ylzB2: '',
|
zlzB3: '',
|
ylzB3: '',
|
zlzC1: '',
|
ylzC1: '',
|
zlzC2: '',
|
ylzC2: '',
|
zlzC3: '',
|
ylzC3: '',
|
zlza: '',
|
ylza: '',
|
zlzb: '',
|
ylzb: '',
|
zlzc: '',
|
ylzc: '',
|
// zzjAVG: '',
|
// yzjAVG: '',
|
// zfcbAVG: '',
|
// yfcbAVG: '',
|
// zydAVG: '',
|
// yydAVG: '',
|
//StateArray: [],
|
//ManufacturerArray: [],
|
StationArray: [{
|
label: '左侧压装位',
|
value: '1左侧压装位'
|
},
|
{
|
label: '右侧压装位',
|
value: '2右侧压装位'
|
}
|
],
|
wheelsPositionArray: [{
|
label: 'all',
|
value: '两侧'
|
}, {
|
label: 'left',
|
value: '左侧'
|
},
|
{
|
label: 'right',
|
value: '右侧'
|
}
|
],
|
NOdirectionArray: [{
|
label: '0',
|
value: '新造'
|
}, {
|
label: '1',
|
value: '检修'
|
}, ],
|
//zcState: '',
|
//Manufacturer: '',
|
//targetStation: '',
|
|
//轴承方向
|
wheelsPosition: '',
|
//轴承号
|
//ldCode: '',
|
//ortherData: '',
|
qrcodeFocus: false,
|
clxhFocus: false
|
}
|
},
|
methods: {
|
setTimer() {
|
if (this.timer == null) {
|
this.timer = setInterval(() => {
|
this.date = this.$DateTool.getDate();
|
}, 1000)
|
}
|
},
|
// ManufacturerChange(value) {
|
// this.Manufacturer = value.orignItem.label;
|
// },
|
// StateChange(value) {
|
// this.zcState = value.orignItem.label;
|
// },
|
// StationChange(value) {
|
// this.targetStation = value.orignItem.label;
|
// },
|
wheelsPositionChange(value) {
|
this.wheelsPosition = value.orignItem.label;
|
},
|
NOdirectionChange(value) {
|
this.NOdirection = value.orignItem.label;
|
},
|
cztmChange() {
|
if (_this.cztm == '' || _this.cztm == null) {
|
return;
|
}
|
let data = {
|
MainData: {
|
cztm: _this.cztm
|
},
|
};
|
_this.$AjaxRequest.Params('post', 'ToZY/getCZInfo',
|
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.yfcbAVG = obj.yfcbAVG;
|
// _this.zfcbAVG = obj.zfcbAVG;
|
// _this.zydAVG = obj.zydAVG;
|
// _this.yydAVG = obj.yydAVG;
|
// _this.zzjAVG = obj.zzjAVG;
|
// _this.yzjAVG = obj.yzjAVG;
|
_this.chexing = obj.chexing;
|
_this.czh = obj.czh;
|
_this.czxh = obj.czxh;
|
_this.clxhFocus = true;
|
_this.zlzdj = obj.zlzdj;
|
_this.ylzdj = obj.ylzdj;
|
_this.wxrw=obj.wxrw;
|
_this.ldtm = obj.ldtm;
|
_this.zlzzj = obj.zlzzj;
|
_this.ylzzj = obj.ylzzj;
|
_this.zlzA1 = obj.zlzA1;
|
_this.ylzA1 = obj.ylzA1;
|
_this.zlzA2 = obj.zlzA2;
|
_this.ylzA2 = obj.ylzA2;
|
_this.zlzA3 = obj.zlzA3;
|
_this.ylzA3 = obj.ylzA3;
|
_this.zlzB1 = obj.zlzB1;
|
_this.ylzB1 = obj.ylzB1;
|
_this.zlzB2 = obj.zlzB2;
|
_this.ylzB2 = obj.ylzB2;
|
_this.zlzB3 = obj.zlzB3;
|
_this.ylzB3 = obj.ylzB3;
|
_this.zlzC1 = obj.zlzC1;
|
_this.ylzC1 = obj.ylzC1;
|
_this.zlzC2 = obj.zlzC2;
|
_this.ylzC2 = obj.ylzC2;
|
_this.zlzC3 = obj.zlzC3;
|
_this.ylzC3 = obj.ylzC3;
|
_this.zlza = obj.zlza;
|
_this.ylza = obj.ylza;
|
_this.zlzb = obj.zlzb;
|
_this.ylzb = obj.ylzb;
|
_this.zlzc = obj.zlzc;
|
_this.ylzc = obj.ylzc;
|
_this.mttype = obj.mttype;
|
//_this.ldCode = obj.ldCode;
|
//_this.ortherData = obj.ortherData;
|
// if (null != obj.manufacturerArray)
|
// obj.manufacturerArray.forEach(function(item, index, arr) {
|
// _this.ManufacturerArray.push({
|
// label: item,
|
// value: item
|
// })
|
// });
|
// if (null != obj.neworold)
|
// obj.neworold.forEach(function(item, index, arr) {
|
// let name = '检修';
|
// if (item.indexOf('0') > -1) {
|
// name = '新品';
|
// }
|
|
// if (null == _this.StateArray.find(r => r.value == name)) {
|
// _this.StateArray.push({
|
// label: item,
|
// value: name
|
// })
|
// }
|
// });
|
//console.log(obj);
|
} 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.yfcbAVG = '';
|
// _this.zfcbAVG = '';
|
// _this.zydAVG = '';
|
// _this.yydAVG = '';
|
// _this.zzjAVG = '';
|
// _this.yzjAVG = '';
|
_this.cztm = '';
|
_this.czh = '';
|
_this.chexing = '';
|
_this.czxh = '';
|
_this.clxh = '';
|
_this.zlzdj = '';
|
_this.ylzdj = '';
|
_this.wxrw='';
|
_this.ldtm = '';
|
_this.zlzzj = '';
|
_this.ylzzj = '';
|
_this.zlzA1 = '';
|
_this.ylzA1 = '';
|
_this.zlzA2 = '';
|
_this.ylzA2 = '';
|
_this.zlzA3 = '';
|
_this.ylzA3 = '';
|
_this.zlzB1 = '';
|
_this.ylzB1 = '';
|
_this.zlzB2 = '';
|
_this.ylzB2 = '';
|
_this.zlzB3 = '';
|
_this.ylzB3 = '';
|
_this.zlzC1 = '';
|
_this.ylzC1 = '';
|
_this.zlzC2 = '';
|
_this.ylzC2 = '';
|
_this.zlzC3 = '';
|
_this.ylzC3 = '';
|
_this.zlza = '';
|
_this.ylza = '';
|
_this.zlzb = '';
|
_this.ylzb = '';
|
_this.zlzc = '';
|
_this.ylzc = '';
|
_this.mttype = '';
|
//_this.wheelsPosition = '';
|
//_this.NOdirection = ''
|
//_this.Manufacturer = '';
|
//_this.zcState = '';
|
//_this.StateArray = [];
|
//_this.ldCode = '';
|
//_this.ortherData = '';
|
//_this.ManufacturerArray = [];
|
//_this.$refs.StateSelect.setInput("请选择");
|
//_this.$refs.StateSelect.clearItemActive();
|
//_this.$refs.ManufacturerSelect.setInput("请选择");
|
//_this.$refs.ManufacturerSelect.clearItemActive();
|
},
|
SaveInfomation() {
|
if (_this.cztm == '') {
|
uni.showToast({
|
title: "请扫描车轴信息.",
|
duration: 5000
|
});
|
return;
|
}
|
if (_this.clxh == '') {
|
uni.showToast({
|
title: "请输入选配轮型.",
|
duration: 5000
|
});
|
return;
|
}
|
// if (_this.yfcbAVG == '' && _this.zfcbAVG == '' &&
|
// _this.zydAVG == '' && _this.yydAVG == '' && _this.zzjAVG == '' &&
|
// _this.yzjAVG == '') {
|
// uni.showToast({
|
// title: "请重新获取轮对选配信息.",
|
// duration: 5000
|
// });
|
// return;
|
// }
|
|
uni.showModal({
|
title: '提示',
|
content: '请核对车轴条码是否正确?',
|
success: function(res) {
|
if (res.confirm) {
|
let data = {
|
MainData: {
|
czh: _this.czh,
|
chexing: _this.chexing,
|
cztm: _this.cztm,
|
czxh: _this.czxh,
|
clxh: _this.clxh,
|
zlzdj: _this.zlzdj,
|
ylzdj: _this.ylzdj,
|
wxrw:_this.wxrw,
|
ldtm: _this.ldtm,
|
zlzzj: _this.zlzzj,
|
ylzzj: _this.ylzzj,
|
zlzA1: _this.zlzA1,
|
ylzA1: _this.ylzA1,
|
zlzA2: _this.zlzA2,
|
ylzA2: _this.ylzA2,
|
zlzA3: _this.zlzA3,
|
ylzA3: _this.ylzA3,
|
zlzB1: _this.zlzB1,
|
ylzB1: _this.ylzB1,
|
zlzB2: _this.zlzB2,
|
ylzB2: _this.ylzB2,
|
zlzB3: _this.zlzB3,
|
ylzB3: _this.ylzB3,
|
zlzC1: _this.zlzC1,
|
ylzC1: _this.ylzC1,
|
zlzC2: _this.zlzC2,
|
ylzC2: _this.ylzC2,
|
zlzC3: _this.zlzC3,
|
ylzC3: _this.ylzC3,
|
zlza: _this.zlza,
|
ylza: _this.ylza,
|
zlzb: _this.zlzb,
|
ylzb: _this.ylzb,
|
zlzc: _this.zlzc,
|
ylzc: _this.ylzc,
|
mttype: _this.mttype,
|
//targetStation: _this.targetStation,
|
wheelsPosition: _this.wheelsPosition,
|
NOdirection: _this.NOdirection,
|
//ldCode: _this.ldCode,
|
//ortherData: _this.ortherData
|
},
|
};
|
_this.$AjaxRequest.Params('post', 'ToAPP/SaveCZInfo',
|
data, _user.token);
|
_this.$AjaxRequest.Request().then(function(result) {
|
if (result.data.status) {
|
uni.showToast({
|
title: "车轴上架成功!",
|
duration: 5000
|
});
|
_this.initInfo();
|
_this.qrcodeFocus = true;
|
_this.clxhFocus = false;
|
} 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.qrcodeFocus = true;
|
//_this.queryOrder();
|
},
|
|
|
}
|
</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>
|