| | |
| | | actions: [],//列表的值 |
| | | xtName: "",//线体名称 |
| | | xtNum: "",//线体编号 |
| | | AgvDw: "",//AGV点位 |
| | | agvChecked: false,//是否勾选AGV |
| | | showAgvDw: false,//点位展示 |
| | | actionsAgvDw: [],//列表AGV点位 |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | handleAgvPositions(positionStr) { |
| | | if (!positionStr) return []; |
| | | // 将字符串按逗号分割并转换为选项数组 |
| | | return positionStr.split(',').map(pos => ({ |
| | | name: pos.trim() // 去除可能的空格 |
| | | })); |
| | | }, |
| | | getKbBarInfo() { |
| | | var that = this; |
| | | that.isLoading = true; |
| | |
| | | }, false) |
| | | .then(function (res) { |
| | | var json = res; |
| | | |
| | | if (json.status == 0) { |
| | | console.log(json.data.tbBillList.kbBarInfo[0].agvPostion); |
| | | that.KbBarInfo = json.data.tbBillList.kbBarInfo[0]; |
| | | that.DAA001 = that.KbBarInfo.daA001; |
| | | that.KbBarMxInfo = json.data.tbBillList.kbBarMxInfo; |
| | | that.$refs.XBar.focus(); |
| | | that.XbarInfo = []; |
| | | that.XBar = ""; |
| | | that.AgvDw = json.data.tbBillList.kbBarInfo[0].agvPostion.split(',')[0]; |
| | | |
| | | that.actionsAgvDw = that.handleAgvPositions(json.data.tbBillList.kbBarInfo[0].agvPostion); |
| | | } |
| | | else { |
| | | that.$playSound('error'); |
| | |
| | | } |
| | | else { |
| | | that.$playSound('error'); |
| | | that.XBar = ""; |
| | | that.$toast.fail(json.message); |
| | | } |
| | | that.isLoading = false; |
| | | }) |
| | | .catch(function (error) { |
| | | that.isLoading = false; |
| | | that.XBar = ""; |
| | | that.$playSound('error'); |
| | | that.$toast.fail("网络错误,请重试!"); |
| | | }); |
| | |
| | | this.xtName = action.name; // 绑定name到xtName字段 |
| | | this.show = false; |
| | | }, |
| | | |
| | | onSelectAgvDw(action) { |
| | | this.AgvDw = action.name; |
| | | this.showAgvDw = false; |
| | | }, |
| | | |
| | | selectDW() { |
| | | this.showAgvDw = true; |
| | | }, |
| | | |
| | | //获取可呼叫AGV的线体 |
| | | selectXt() { |
| | | this.show = true; |
| | |
| | | //AGV送检 |
| | | handleAGVInspection() { |
| | | |
| | | this.$toast.fail("功能开发测试中!"); |
| | | return; |
| | | //this.$toast.fail("功能开发测试中!"); |
| | | //return; |
| | | |
| | | if (this.isLoading) { |
| | | return; |
| | | } |
| | | |
| | | |
| | | var that = this; |
| | | if (that.agvChecked === false) |
| | | { |
| | | that.$playSound('error'); |
| | | that.$toast.fail("AGV送检请先勾选 AGV"); |
| | | return; |
| | | } |
| | | |
| | | if (!that.KbBar) { |
| | | that.$playSound('error'); |
| | | that.$toast.fail("请先扫描卡板条码"); |
| | |
| | | that.isLoading = true; |
| | | that.AxiosHttp("post", 'Womdaa/handleAGVInspection', { |
| | | KbBar: that.KbBar, |
| | | userAccount: that.userInfo.loginAccount, |
| | | AgvDw: that.AgvDw |
| | | }, false) |
| | | .then(function (res) { |
| | | var json = res; |
| | | if (json.status == 0) { |
| | | that.$playSound('success'); |
| | | that.$notify({ type: 'success', message: json.message }); |
| | | } else { |
| | | that.$playSound('error'); |
| | | that.$toast.fail(json.message); |
| | | } |
| | | that.isLoading = false; |
| | | }) |
| | | .catch(function (error) { |
| | | that.isLoading = false; |
| | | that.$playSound('error'); |
| | | that.$toast.fail("AGV送检失败,请重试!"); |
| | | that.$refs.KbBar.focus(); |
| | | }); |
| | | }, |
| | | |
| | | //AGV呼叫 |
| | | handleAGVCall() { |
| | | //this.$toast.fail("功能开发测试中!"); |
| | | //return; |
| | | |
| | | if (this.isLoading) { |
| | | return; |
| | | } |
| | | |
| | | var that = this; |
| | | if (!that.xtNum) { |
| | | that.$playSound('error'); |
| | | that.$toast.fail("请先选择线体"); |
| | | return; |
| | | } |
| | | |
| | | that.isLoading = true; |
| | | that.AxiosHttp("post", 'Womdaa/handleAGVCall', { |
| | | XtNum: that.xtNum, |
| | | userAccount: that.userInfo.loginAccount |
| | | }, false) |
| | | .then(function (res) { |
| | |
| | | .catch(function (error) { |
| | | that.isLoading = false; |
| | | that.$playSound('error'); |
| | | that.$toast.fail("送检失败,请重试!"); |
| | | that.$toast.fail("AGV呼叫失败,请重试!"); |
| | | that.$refs.KbBar.focus(); |
| | | }); |
| | | }, |
| | | |
| | | //AGV呼叫 |
| | | handleAGVCall() { |
| | | this.$toast.fail("功能开发测试中!"); |
| | | return; |
| | | |
| | | if (this.isLoading) { |
| | | return; |
| | | } |
| | | |
| | | var that = this; |
| | | if (!that.xtNum) { |
| | | that.$playSound('error'); |
| | | that.$toast.fail("请先选择线体"); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | |