| | |
| | | BearingModels:[], // 对åºè½¦åä¸é¢çææè½´æ¿åå· |
| | | templists:[], // 临æ¶ä¿å è½´æ¿åå· å åå®¶ |
| | | StateArray: [{ |
| | | label: 'RO', |
| | | label: 'R0', |
| | | value: 'æ°é ' |
| | | },{ |
| | | label: 'R1', |
| | |
| | | } |
| | | }, |
| | | initInfo() { |
| | | _this.madeUnit = ''; |
| | | _this.materielId = ''; |
| | | _this.materielType = ''; |
| | | _this.NewOrOld = ''; |
| | | //_this.madeUnit = ''; |
| | | //_this.materielId = ''; |
| | | //_this.materielType = ''; |
| | | //_this.NewOrOld = ''; |
| | | _this.LotNumber = ''; |
| | | _this.ProductDate = ''; |
| | | //_this.ProductDate = ''; |
| | | }, |
| | | SaveInfomation() { |
| | | let data = { |
| | | MainData: { |
| | | rfid: _this.value_rfid, |
| | | qrcode: _this.value_qrcode, |
| | | madeUnit: _this.madeUnit, |
| | | materielId: _this.materielId, |
| | | materielType: _this.materielType, |
| | | NewOrOld: _this.NewOrOld, |
| | | LotNumber: _this.LotNumber, |
| | | ProductDate: _this.ProductDate |
| | | }, |
| | | }; |
| | | console.log("æåæäº¤çç»çä¿¡æ¯",data) |
| | | //_this.LotNumber == '' || |
| | | if (_this.value_rfid.length == 0 || _this.value_qrcode.length == 0 || |
| | | _this.madeUnit == '' || _this.materielId == '' || |
| | | _this.materielType == '' || _this.NewOrOld == '' || |
| | | _this.ProductDate == '') { |
| | | |
| | | |
| | | uni.showToast({ |
| | | title: "ç»çä¿¡æ¯ä¸è½ä¸ºç©º", |
| | | duration: 2000, |
| | |
| | | _this.value_qrcode = ""; |
| | | _this.initInfo(); |
| | | _this.rfidFocus = true; |
| | | |
| | | } else { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | |
| | | } |
| | | }); |
| | | }, |
| | | getCurrentDate() { |
| | | const now = new Date(); |
| | | // è·åå¹´ãæãæ¥ï¼è¡¥0å¤çï¼ç¡®ä¿æä»½/æ¥ææ¯ä¸¤ä½æ°ï¼ |
| | | const year = now.getFullYear(); |
| | | const month = String(now.getMonth() + 1).padStart(2, '0'); // æä»½ä»0å¼å§ï¼é+1 |
| | | const day = String(now.getDate()).padStart(2, '0'); |
| | | // æ¼æ¥æYYYY-MM-DDæ ¼å¼ |
| | | this.currentDate = `${year}-${month}-${day}`; |
| | | // 妿éè¦è¿åå¼ï¼æ¯å¦æ¥å£ä¼ åï¼ï¼å¯ä»¥returnè¿ä¸ªç»æ |
| | | return `${year}-${month}-${day}`; |
| | | }, |
| | | }, |
| | | created: function() { |
| | | // æ¯æ¬¡è¿å
¥ç颿¶ï¼å
æ¸
é¤ä¹åçææå®æ¶å¨ï¼ç¶åå¯å¨æ°ç宿¶å¨ |
| | |
| | | mounted() { |
| | | _this = this; |
| | | _this.rfidFocus = true; |
| | | _this.ProductDate = this.getCurrentDate(); |
| | | this.VehicleType(); |
| | | |
| | | }, |
| | | |
| | | |