| | |
| | | // { printerId: 'Printer2', ipAddress: '192.168.1.2' }, |
| | | // { printerId: 'Printer3', ipAddress: '192.168.1.3' } |
| | | //], // 打印机列表 |
| | | // 当前选中行的索引 |
| | | currentIndex: -1, |
| | | // 存储选中行数据对象 |
| | | selItem: {} , |
| | | ItemBarKw: [],//当天行相关条码库位信息 |
| | | DaaInfo: {}, |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | |
| | | |
| | | /** |
| | | * 处理行点击事件(单选逻辑) |
| | | * @param {Object} item 当前行数据 |
| | | * @param {Number} index 当前行索引 |
| | | */ |
| | | handleRowClick(item, index) { |
| | | if (this.isLoading) { |
| | | return; |
| | | } |
| | | |
| | | // 重置所有行的选中状态 |
| | | this.currentIndex = -1; |
| | | |
| | | // 设置当前选中行 |
| | | this.currentIndex = index; |
| | | this.selItem = { |
| | | itemid: item.fMaterialId, |
| | | index: index |
| | | }; |
| | | |
| | | console.log('当前选中项:', this.selItem); // 调试用 |
| | | |
| | | this.GetBarKwByItem(); |
| | | }, |
| | | GetBarKwByItem() { |
| | | |
| | | var that = this; |
| | | that.isLoading = true; |
| | | that.AxiosHttp("post", 'Womdaa/GetBarKwByItem', { |
| | | itemId: that.selItem.itemid, |
| | | userName: that.userInfo.loginAccount |
| | | }, false) |
| | | .then(function (res) { |
| | | var json = res; |
| | | if (json.status == 0) { |
| | | that.ItemBarKw = json.data.tbBillList; |
| | | } |
| | | else { |
| | | that.$toast.fail(json.message); |
| | | that.$playSound('error'); |
| | | that.ItemBarKw = []; |
| | | } |
| | | that.isLoading = false; |
| | | }) |
| | | .catch(function (error) { |
| | | that.isLoading = false; |
| | | that.$toast.fail("网络错误,请重试!"); |
| | | that.$playSound('error'); |
| | | console.log(error); |
| | | that.ItemBarKw = []; |
| | | }); |
| | | }, |
| | | |
| | | |
| | | getModel() { |
| | | var that = this; |
| | | that.isLoading = true; |
| | |
| | | var json = res; |
| | | if (json.status == 0) { |
| | | that.ItemDetail = json.data.tbBillList; |
| | | that.DaaInfo = json.data.tbBillList.daaInfo; |
| | | that.modeInfo.planNo = json.data.tbBillList.planNo; |
| | | that.modeInfo.startTime = json.data.tbBillList.startTime; |
| | | that.$refs.barcode.focus(); |
| | | // 重置所有行的选中状态 |
| | | that.currentIndex = -1; |
| | | that.ItemBarKw = []; |
| | | } |
| | | else { |
| | | that.$toast.fail(json.message); |
| | | that.$playSound('error'); |
| | | that.$refs.daa001.focus(); |
| | | that.modeInfo.daa001 = ""; |
| | | that.modeInfo.planNo = ""; |
| | | that.modeInfo.startTime = ""; |
| | | that.ItemDetail = []; |
| | | } |
| | | that.isLoading = false; |
| | |
| | | .catch(function (error) { |
| | | that.isLoading = false; |
| | | that.$toast.fail("网络错误,请重试!"); |
| | | that.$playSound('error'); |
| | | console.log(error); |
| | | that.$refs.daa001.focus(); |
| | | that.modeInfo.daa001 = ""; |
| | |
| | | that.itemInfo = json.data.tbBillList; |
| | | that.actions = json.data.tbBillList.map(item => { |
| | | return { |
| | | name: item.daaInfo // 拼接字段 |
| | | |
| | | name: item.daaInfo, // 拼接字段 |
| | | subname: item.startTime |
| | | }; |
| | | }); |
| | | } |