| | |
| | | <u-gap height="10"></u-gap> |
| | | <!-- è¾å
¥æ¡ï¼ä½¿ç¨ v-model ç»å®è¾å
¥å¼ --> |
| | | <uni-easyinput v-model="inputValue" placeholder="请è¾å
¥å«æççç¤è®¾å¤" /> |
| | | <u-gap height="10"></u-gap> |
| | | <uni-easyinput type="number" v-model="numberValue" placeholder="请è¾å
¥å«ææ°é" /> |
| | | </view> |
| | | </u-modal> |
| | | <!-- ä½¿ç¨ uni-popup ç»ä»¶ï¼è®¾ç½®ä¸ºå¯¹è¯æ¡ç±»å --> |
| | |
| | | <view class="popup-content">{{ content }}</view> |
| | | <!-- è¾å
¥æ¡ï¼ä½¿ç¨ v-model ç»å®è¾å
¥å¼ --> |
| | | <uni-easyinput v-model="inputValue" placeholder="请è¾å
¥å
容" /> |
| | | <u-gap height="10"></u-gap> |
| | | <uni-easyinput type="number" v-model="numberValue" placeholder="请è¾å
¥å«ææ°é" /> |
| | | <!-- æé®ç» --> |
| | | <view class="button-group"> |
| | | <!-- å
³éæé® --> |
| | |
| | | content: '欢è¿ä½¿ç¨ uni-popup!', |
| | | msgType: 'success', |
| | | value: '', |
| | | inputValue: '' |
| | | inputValue: '', |
| | | numberValue: '', |
| | | currentAvailableQuantity: 0 |
| | | }; |
| | | }, |
| | | onLoad() { |
| | |
| | | current: this.current, |
| | | size: this.size |
| | | }; |
| | | // 使ç¨åæºå®æ´æ¥å£ |
| | | this.$u.post(' http://192.168.30.240:9090/makerwit/selectKHWareType', null).then(res => { |
| | | console.log(res); |
| | | this.$t.message.closeLoading(); |
| | | cb && cb(); |
| | | if (cb != null) this.listData = []; |
| | | this.listData = [...this.listData, ...res.data]; |
| | | console.log(this.listData); |
| | | }).catch((err) => { |
| | | this.$t.message.toast(err.message); |
| | | uni.getStorage({ |
| | | key: 'storage_key_ipAddress', |
| | | success: (res) => { |
| | | this.$t.message.loading(); |
| | | let formDataParam = { |
| | | current: this.current, |
| | | size: this.size |
| | | }; |
| | | // 使ç¨åæºå®æ´æ¥å£ |
| | | this.$u.post('/api/PDA/AGVPage', null).then(res => { |
| | | // this.$u.post(res.data.CZZJip + '/makerwit/selectKHWareType', null).then(res => { |
| | | console.log(res); |
| | | this.$t.message.closeLoading(); |
| | | cb && cb(); |
| | | if (cb != null) this.listData = []; |
| | | this.listData = [...this.listData, ...res.data]; |
| | | console.log(this.listData); |
| | | }).catch((err) => { |
| | | this.$t.message.toast(err.message); |
| | | }); |
| | | }, |
| | | fail: (err) => { |
| | | this.$t.message.toast('请å
设置IPå°å'); |
| | | uni.navigateTo({ |
| | | url: '/pages/SetAddress/SetAddress', |
| | | }); |
| | | }, |
| | | }); |
| | | |
| | | }, |
| | | clickLoadMore(e) { |
| | | this.status = 'loading'; |
| | |
| | | console.log(this.$refs); |
| | | // this.$refs.popup.open(); |
| | | this.Modalshow = true; |
| | | this.content = `å·¥åï¼${orderNo}\nåå·ï¼${productCode}\nå¯å«æ°éï¼${number}\n请确认æ¯å¦å«ä»»å¡(é»è®¤4个)`; |
| | | this.content = `å·¥åï¼${orderNo}\nåå·ï¼${productCode}\nå¯å«æ°éï¼${number}\n请确认æ¯å¦å«ä»»å¡`; |
| | | this.currentAvailableQuantity = number; |
| | | // this.numberValue = number > 4 ? 4 : number; // 设置é»è®¤å¼ä¸º4æå¯ç¨æ°é |
| | | }, |
| | | confirmInput() { |
| | | this.$t.message.loading(); |
| | | |
| | | // æåè¾å
¥æ¡çå¼ |
| | | const inputValue = this.inputValue; |
| | | const numberValue = parseInt(this.numberValue); |
| | | // æåå·¥åç¼å· |
| | | const orderNo = this.content.match(/å·¥åï¼(.*)\n/)[1]; |
| | | // æååå· |
| | | const productCode = this.content.match(/åå·ï¼(.*)\n/)[1]; |
| | | // æåå¯å«æ°é |
| | | const availableQuantity = this.content.match(/å¯å«æ°éï¼(.*)\n/)[1]; |
| | | |
| | | if (inputValue == "") { |
| | | this.$t.message.toast('请è¾å
¥çç¤è®¾å¤'); |
| | | return; |
| | | } |
| | | if (availableQuantity <= 0) { |
| | | this.$t.message.toast('å¯å«æ°é为0ï¼æ æ³å«ä»»å¡'); |
| | | if (numberValue <= 0) { |
| | | this.$t.message.toast('嫿æ°éå¿
须大äº0'); |
| | | return; |
| | | } |
| | | if (numberValue > this.currentAvailableQuantity) { |
| | | this.$t.message.toast('嫿æ°éä¸è½è¶
è¿å¯å«æ°é'); |
| | | return; |
| | | } |
| | | let guid =this.generateUUID() |
| | | let formDataParam = { |
| | | dTaskId: this.generateUUID(), |
| | | dTaskId: guid, |
| | | productCode: productCode, |
| | | orderNo: orderNo, |
| | | number: availableQuantity > 4 ? 4 : availableQuantity, |
| | | taskNo:2, |
| | | number: numberValue, |
| | | inputValue: inputValue, |
| | | DTaskId: guid, |
| | | ProductCode: productCode, |
| | | OrderNo: orderNo, |
| | | Number: numberValue, |
| | | InputValue: inputValue, |
| | | TaskType: "æ£æ" |
| | | // ...å
¶ä»éè¦ä¼ éçåæ° |
| | | }; |
| | | this.$u.post('/api/PDA/AddCZTask', formDataParam).then(res => { |
| | | if (res.status) { |
| | | const value = uni.getStorageSync('storage_key_ipAddress'); |
| | | // 使ç¨åæºå®æ´æ¥å£ |
| | | this.$u.post('http://192.168.30.240:9090/makerwit/insertTask', formDataParam).then(res => { |
| | | this.$u.post(value.CZZJip + '/makerwit/insertTask', formDataParam).then(res => { |
| | | this.$t.message.closeLoading(); |
| | | if (res.code == 200) { |
| | | console.log(formDataParam); |
| | | if (res.code == 200) { |
| | | this.$t.message.toast('å¼å«æå'); |
| | | this.inputValue="", |
| | | this.numberValue="", |
| | | this.$refs.popup.close(); |
| | | // this.submit(); |
| | | } else { |
| | | this.$t.message.toast(res.msg); |
| | | this.$t.message.toast(res.message); |
| | | } |
| | | }); |
| | | // this.submit(); |
| | | } else { |
| | | this.$t.message.toast(res.msg); |
| | | this.$t.message.toast(res.message); |
| | | } |
| | | }).catch((err) => { |
| | | this.$t.message.toast(err.message); |
| | |
| | | |
| | | .uni-ellipsis-1 { |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | } |
| | | |
| | | .uni-ellipsis-2 { |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | display: -webkit-box; |
| | | -webkit-line-clamp: 2; |
| | | -webkit-box-orient: vertical; |
| | | } |
| | | |
| | | .popup-container { |
| | | padding: 20px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .popup-content { |
| | | margin-bottom: 15px; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .custom-button { |
| | | border: none; |
| | | border-radius: 5px; |
| | | font-size: 14px; |
| | | cursor: pointer; |
| | | transition: all 0.3s ease; |
| | | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); |
| | | } |
| | | |
| | | .confirm-button:hover { |
| | | background-color: #0056b3; |
| | | } |
| | | |
| | | .slot-content { |
| | | font-size: 28rpx; |
| | | color: $u-content-color; |
| | | padding-left: 30rpx; |
| | | } |
| | | </style> |
| | | white-space |