| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | |
| | | getInfo() { |
| | | this.show = true; |
| | | }, |
| | | onSelect(item) { |
| | | // 默认情况下点击选项时不会自动收起 |
| | | // 可以通过 close-on-click-action 属性开启自动收起 |
| | | |
| | | // 修正 onSelect 方法 |
| | | onSelect(item) { // item 是选中的对象(如 { name: "正常入库" }) |
| | | this.rkType = item.name; // 提取 name 字段作为选中值 |
| | | this.show = false; |
| | | |
| | | this.rkType = item.name; |
| | | //this.GetMesItemBlDetailByBillNo(); |
| | | //this.$toast(item.name); |
| | | |
| | | console.log('选中的入库类型:', this.rkType); |
| | | }, |
| | | |
| | | |
| | | getModel() { |
| | | var that = this; |
| | | that.isLoading = true; |
| | |
| | | var json = res; |
| | | if (json.status == 0) { |
| | | that.depotData = json.data.tbBillList; |
| | | that.$playSound('success'); |
| | | that.$refs.barcode.focus(); |
| | | } |
| | | else { |
| | |
| | | that.$playSound('error'); |
| | | return; |
| | | } |
| | | |
| | | console.log('提交前 rkType 的值:', this.rkType); // 确认是否为单个字符串 |
| | | console.log('提交前 rkType 的类型:', typeof this.rkType); // 应输出 "string" |
| | | that.isLoading = true; |
| | | that.AxiosHttp("post", 'MesInvItemInCDetails/SaveBarCodes', { |
| | | sectionCode: that.sectionCode, |
| | | userName: that.userInfo.loginAccount, |
| | | barcode: that.formData.barcode, |
| | | cgrkType: that.actions |
| | | cgrkType: this.rkType // 直接使用 rkType,默认值或选中值 |
| | | }, false) |
| | | .then(function (res) { |
| | | var json = res; |