| | |
| | | if (staf.length > 0) { |
| | | this.stafName = staf[0].staffName; |
| | | this.stafId = staf[0].staffNo; |
| | | this.$refs.barcode.focus(); |
| | | } else { |
| | | this.$toast("未找到匹配的 staffName"); |
| | | } |
| | |
| | | //this.$toast(item.name); |
| | | |
| | | }, |
| | | getBarcode(value) { |
| | | getStaff() { |
| | | |
| | | this.barcode = value; |
| | | var that = this; |
| | | that.isLoading = true; |
| | | that.AxiosHttp("post", 'MesStaff/GetList', { |
| | | //name: that.userInfo.loginAccount, |
| | | }, false) |
| | | .then(function (res) { |
| | | var json = res; |
| | | if (json.status == 0) { |
| | | that.actions = json.data.tbBillList.map(item => { |
| | | return { name: item.staffName } |
| | | }); |
| | | |
| | | that.stafList = json.data.tbBillList; |
| | | } |
| | | else { |
| | | that.$toast.fail(json.message); |
| | | } |
| | | that.isLoading = false; |
| | | }) |
| | | .catch(function (error) { |
| | | that.isLoading = false; |
| | | that.$toast.fail("网络错误,请重试!"); |
| | | console.log(error); |
| | | }); |
| | | // 默认情况下点击选项时不会自动收起 |
| | | // 可以通过 close-on-click-action 属性开启自动收起 |
| | | |
| | | let staf = that.stafList.filter(it => it.staffNo === that.stafId); |
| | | |
| | | if (staf.length > 0) { |
| | | that.stafName = staf[0].staffName; |
| | | that.stafId = staf[0].staffNo; |
| | | that.$refs.barcode.focus(); |
| | | } else { |
| | | that.$toast("未找到匹配的 用户名称"); |
| | | } |
| | | //this.GetMesItemBlDetailByBillNo(); |
| | | //this.$toast(item.name); |
| | | |
| | | }, |
| | | getBarcode() { |
| | | |
| | | //this.barcode = value; |
| | | |
| | | var that = this; |
| | | |
| | |
| | | that.itemName = entity.itemName; //物料名称 |
| | | that.itemModel = entity.itemModel; //物料型号 |
| | | that.$notify({ type: 'success', message: '扫描成功' }); |
| | | that.$refs.barcode.focus(); |
| | | that.barcode = null; |
| | | } |
| | | else { |
| | | that.$toast.fail(json.message); |
| | | that.$refs.barcode.focus(); |
| | | that.barcode = null; |
| | | } |
| | | that.isLoading = false; |
| | | }) |