| | |
| | | active: 0, |
| | | show: false, |
| | | actions: [], |
| | | ItemTblDetail: [], |
| | | ItemDetail: [], |
| | | ItemBarKw: [], |
| | | currentIndex: -1, |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | handleRowClick(item, index) { |
| | | if (this.isLoading) { |
| | | return; |
| | | } |
| | | |
| | | // 重置所有行的选中状态 |
| | | this.currentIndex = -1; |
| | | |
| | | // 设置当前选中行 |
| | | this.currentIndex = index; |
| | | this.selItem = { |
| | | itemid: item.itemId, |
| | | 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 = []; |
| | | }); |
| | | }, |
| | | //获取发货通知单号 |
| | | getInfo() { |
| | | |
| | | this.show = true; |
| | | var that = this; |
| | | that.isLoading = true |
| | |
| | | that.actions = json.data.tbBillList.map(item => { |
| | | return { name: item } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | else { |
| | | that.$toast.fail(json.message); |
| | | that.show = false; |
| | | } |
| | | that.isLoading = false; |
| | | }) |
| | |
| | | // this.$notify({ type: 'success', message: '某某物料扫码成功某某物料扫码成功某某物料扫码成功某某物料扫码成功' }); |
| | | |
| | | //}, |
| | | //点击事件 |
| | | onSelect(item) { |
| | | // 默认情况下点击选项时不会自动收起 |
| | | // 可以通过 close-on-click-action 属性开启自动收起 |
| | |
| | | //this.$toast(item.name); |
| | | |
| | | }, |
| | | //根据发货通知单号获取明细 |
| | | GetMesItemDetailByBillNo() { |
| | | var that = this; |
| | | that.isLoading = true; |
| | |
| | | that.ItemBlDetail = []; |
| | | }); |
| | | }, |
| | | //扫码 |
| | | getBarcode() { |
| | | |
| | | //this.barcode = value; |
| | |
| | | that.barcode = null; |
| | | that.sms = null; |
| | | that.num = null; |
| | | //that.ItemBlDetail = json.data.tbBillList.item2 |
| | | that.$notify({ type: 'success', message: '扫描成功' }); |
| | | that.GetMesItemDetailByBillNo(); |
| | | that.$refs.barcode.focus(); |
| | |
| | | that.splitNum = ""; |
| | | }); |
| | | }, |
| | | //条码拆分 |
| | | tmcf() { |
| | | //this.show = true; |
| | | |