| | |
| | | <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() { |
| | |
| | | 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 formDataParam = { |
| | | dTaskId: this.generateUUID(), |
| | | productCode: productCode, |
| | | orderNo: orderNo, |
| | | taskNo:2, |
| | | number: availableQuantity > 4 ? 4 : availableQuantity, |
| | | number: numberValue, |
| | | inputValue: inputValue, |
| | | DTaskId: this.generateUUID(), |
| | | ProductCode: productCode, |
| | | OrderNo: orderNo, |
| | | Number: availableQuantity > 4 ? 4 : availableQuantity, |
| | | Number: numberValue, |
| | | InputValue: inputValue, |
| | | TaskType: "è´æ" |
| | | // ...å
¶ä»éè¦ä¼ éçåæ° |
| | |
| | | |
| | | .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 |