¶Ô±ÈÐÂÎļþ |
| | |
| | | var vm = new Vue({ |
| | | el: '#app', |
| | | data: function () { |
| | | return { |
| | | isLoading: false, |
| | | userInfo: { |
| | | "loginGuid": '', |
| | | "loginAccount": '', |
| | | }, |
| | | splitNum: "", |
| | | num: "", |
| | | //type: "", |
| | | billNo: "", |
| | | selectType: "", |
| | | daa001: "", |
| | | barcode: "", |
| | | ItemBlDetail:[], |
| | | modeInfo: [], |
| | | active: 0, |
| | | show: false, |
| | | actions: [], |
| | | } |
| | | }, |
| | | mounted() { |
| | | var that = this; |
| | | this.userInfo = { |
| | | loginGuid: this.GetLoginInfor().loginGuid, |
| | | loginAccount: this.GetLoginInfor().loginAccount, |
| | | }; |
| | | }, |
| | | methods: { |
| | | getInfo() { |
| | | |
| | | this.show = true; |
| | | var that = this; |
| | | that.isLoading = true |
| | | that.AxiosHttp("post", 'MesXsck/GetFHTZBillNo', { |
| | | // type: "selectType", |
| | | }, false) |
| | | .then(function (res) { |
| | | var json = res; |
| | | if (json.status == 0) { |
| | | if (json.data.tbBillList.length <= 0) { |
| | | that.$toast.fail("没æå¯ç¨çæ°æ®"); |
| | | that.show = false; |
| | | } else { |
| | | that.actions = json.data.tbBillList.map(item => { |
| | | return { name: item } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | else { |
| | | that.$toast.fail(json.message); |
| | | } |
| | | that.isLoading = false; |
| | | }) |
| | | .catch(function (error) { |
| | | that.isLoading = false; |
| | | that.$toast.fail("ç½ç»é误ï¼è¯·éè¯ï¼"); |
| | | console.log(error); |
| | | that.show = false; |
| | | }); |
| | | }, |
| | | //onClick(index, title) { |
| | | // this.$toast(`${index} ${title}`); |
| | | // this.$notify({ type: 'success', message: 'ææç©ææ«ç æåææç©ææ«ç æåææç©ææ«ç æåææç©ææ«ç æå' }); |
| | | |
| | | //}, |
| | | onSelect(item) { |
| | | // é»è®¤æ
åµä¸ç¹å»é项æ¶ä¸ä¼èªå¨æ¶èµ· |
| | | // å¯ä»¥éè¿ close-on-click-action 屿§å¼å¯èªå¨æ¶èµ· |
| | | this.show = false; |
| | | |
| | | this.billNo = item.name; |
| | | this.GetMesItemDetailByBillNo(); |
| | | //this.$toast(item.name); |
| | | |
| | | }, |
| | | GetMesItemDetailByBillNo() { |
| | | var that = this; |
| | | that.isLoading = true; |
| | | that.AxiosHttp("post", 'MesXsck/GetMesItemFHTZetailByBillNo', { |
| | | billNo: that.billNo, |
| | | //type: selectType |
| | | }, false) |
| | | .then(function (res) { |
| | | var json = res; |
| | | if (json.status == 0) { |
| | | that.ItemBlDetail = json.data.tbBillList; |
| | | //that.daa001 = json.data.tbBillList.item1; |
| | | that.$refs.barcode.focus(); |
| | | } |
| | | else { |
| | | that.$toast.fail(json.message); |
| | | that.$refs.billNo.focus(); |
| | | that.billNo = ""; |
| | | that.daa001 = ""; |
| | | that.ItemBlDetail = []; |
| | | } |
| | | that.isLoading = false; |
| | | }) |
| | | .catch(function (error) { |
| | | that.isLoading = false; |
| | | that.$toast.fail("ç½ç»é误ï¼è¯·éè¯ï¼"); |
| | | //console.log(error); |
| | | tthat.$refs.billNo.focus(); |
| | | that.billNo = ""; |
| | | that.daa001 = ""; |
| | | that.ItemBlDetail = []; |
| | | }); |
| | | }, |
| | | getBarcode() { |
| | | |
| | | //this.barcode = value; |
| | | |
| | | var that = this; |
| | | that.isLoading = true; |
| | | |
| | | if (!that.userInfo.loginAccount) { |
| | | this.$toast.fail("è¯·éæ°æ£æ¥ç»å½ç¶æ"); |
| | | that.isLoading = false; |
| | | return; |
| | | } |
| | | |
| | | if (!that.barcode) { |
| | | this.$toast.fail("æ¡ç ä¸è½ä¸ºç©º"); |
| | | that.isLoading = false; |
| | | return; |
| | | } |
| | | |
| | | if (!that.billNo) { |
| | | this.$toast.fail("åè´§éç¥åå·ä¸è½ä¸ºç©º"); |
| | | that.isLoading = false; |
| | | return; |
| | | } |
| | | |
| | | //if (!that.daa001) { |
| | | // this.$toast.fail("å·¥åå·ä¸è½ä¸ºç©º"); |
| | | // that.isLoading = false; |
| | | // return; |
| | | //} |
| | | |
| | | |
| | | that.AxiosHttp("post", 'MesXsck/XSCKScanBarcode', { |
| | | userName: that.userInfo.loginAccount, |
| | | barcode: that.barcode, |
| | | daa001: that.billNo, |
| | | //type: selectType |
| | | }, false) |
| | | .then(function (res) { |
| | | var json = res; |
| | | if (json.status == 0) { |
| | | |
| | | 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.barcode = ""; |
| | | that.num = ""; |
| | | that.splitNum = ""; |
| | | |
| | | |
| | | } else if (json.status == 2) { |
| | | that.$refs.splitNum.focus(); |
| | | that.splitNum = json.data.cfNum; |
| | | that.num = json.data.num; |
| | | } |
| | | else { |
| | | that.$toast.fail(json.message); |
| | | that.$refs.barcode.focus(); |
| | | that.barcode = ""; |
| | | that.num = ""; |
| | | that.splitNum = ""; |
| | | } |
| | | that.isLoading = false; |
| | | }) |
| | | .catch(function (error) { |
| | | that.isLoading = false; |
| | | that.$toast.fail("ç½ç»é误ï¼è¯·éè¯ï¼"); |
| | | //console.log(error); |
| | | that.$refs.barcode.focus(); |
| | | that.barcode = ""; |
| | | that.num = ""; |
| | | that.splitNum = ""; |
| | | }); |
| | | }, |
| | | tmcf() { |
| | | //this.show = true; |
| | | |
| | | var that = this; |
| | | that.isLoading = true; |
| | | |
| | | if (!that.userInfo.loginAccount) { |
| | | this.$toast.fail("è¯·éæ°æ£æ¥ç»å½ç¶æ"); |
| | | that.isLoading = false; |
| | | return; |
| | | } |
| | | |
| | | if (!that.barcode) { |
| | | this.$toast.fail("æ¡ç ä¸è½ä¸ºç©º"); |
| | | that.isLoading = false; |
| | | return; |
| | | } |
| | | |
| | | if (!that.billNo) { |
| | | this.$toast.fail("è¡¥æåå·ä¸è½ä¸ºç©º"); |
| | | that.isLoading = false; |
| | | return; |
| | | } |
| | | |
| | | if (!that.daa001) { |
| | | this.$toast.fail("å·¥åå·ä¸è½ä¸ºç©º"); |
| | | that.isLoading = false; |
| | | return; |
| | | } |
| | | |
| | | if (!that.splitNum) { |
| | | this.$toast.fail("åè´§æ°éä¸è½ä¸ºç©º"); |
| | | that.isLoading = false; |
| | | return; |
| | | } |
| | | |
| | | that.AxiosHttp("post", 'MesXsck/SplitBarcode', { |
| | | userName: that.userInfo.loginAccount, |
| | | barcode: that.barcode, |
| | | daa001: that.billNo, |
| | | num: that.splitNum, |
| | | //type: selectType |
| | | }, false) |
| | | .then(function (res) { |
| | | var json = res; |
| | | if (json.status == 0) { |
| | | that.ItemBlDetail = json.data.pendingList; |
| | | that.$notify({ type: 'success', message: 'æ«ææå' }); |
| | | that.$refs.barcode.focus(); |
| | | that.barcode = ""; |
| | | that.num = ""; |
| | | that.splitNum = ""; |
| | | that.GetMesItemDetailByBillNo(); |
| | | } |
| | | else { |
| | | that.$toast.fail(json.message); |
| | | that.$refs.barcode.focus(); |
| | | } |
| | | that.isLoading = false; |
| | | }) |
| | | .catch(function (error) { |
| | | that.isLoading = false; |
| | | that.$toast.fail("ç½ç»é误ï¼è¯·éè¯ï¼"); |
| | | //console.log(error); |
| | | that.$refs.barcode.focus(); |
| | | that.barcode = ""; |
| | | that.num = ""; |
| | | that.splitNum = ""; |
| | | }); |
| | | } |
| | | } |
| | | }) |