| | |
| | | <uni-easyinput type="text" :placeholder="Testplaceholder" ref='midInput' |
| | | v-model="Initiallife" /> |
| | | </uni-forms-item> |
| | | <!-- <uni-forms-item> |
| | | <checkbox checked="check">æ¯å¦æ»¡ç</checkbox> |
| | | </uni-forms-item> --> |
| | | <uni-forms-item> |
| | | <button @click="submit" type="primary" size="default" style="margin-top: 2%;">ç»ç</button> |
| | | <!-- ç»çæé®æ·»å ç¦ç¨ç¶æ --> |
| | | <button |
| | | @click="submit" |
| | | type="primary" |
| | | size="default" |
| | | style="margin-top: 2%;" |
| | | :disabled="isSubmitting" |
| | | > |
| | | {{ isSubmitting ? 'ç»çä¸...' : 'ç»ç' }} |
| | | </button> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | <uni-list> |
| | | <!-- <uni-list-item direction="column" v-for="item in matTotal" :key="item.matCode"> |
| | | <template v-slot:body> |
| | | <view class="uni-list-box"> |
| | | <view class="uni-content"> |
| | | <view class="uni-title-sub uni-ellipsis-2">ç©æç¼ç ï¼{{item.matCode}}</view> |
| | | <view class="uni-title-sub uni-ellipsis-2">æ°éï¼{{item.matQuantity}}</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | </uni-list-item> --> |
| | | <uni-list-item direction="column" v-for="(item,index) in matInfos" :key="index"> |
| | | <template v-slot:body> |
| | | <view class="uni-list-box"> |
| | |
| | | placeholder="è¯·æ«æå°åæ¡ç " ref='midInput' :focus="addressFocus" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item> |
| | | <button @click="inbound" type="primary" size="default" style="margin-top: 2%;">å
¥åºç¡®è®¤</button> |
| | | <!-- å
¥åºæé®æ·»å ç¦ç¨ç¶æ --> |
| | | <button |
| | | @click="inbound" |
| | | type="primary" |
| | | size="default" |
| | | style="margin-top: 2%;" |
| | | :disabled="isInbounding" |
| | | > |
| | | {{ isInbounding ? 'å
¥åºä¸...' : 'å
¥åºç¡®è®¤' }} |
| | | </button> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | </view> |
| | |
| | | addressdisabled: false, |
| | | pksns: [], |
| | | pkmaterSn: "", |
| | | pkmatInfos: [] |
| | | pkmatInfos: [], |
| | | // æ°å¢ï¼ç»ç请æ±ç¶æï¼é²æ¢éå¤ç¹å»ï¼ |
| | | isSubmitting: false, |
| | | // æ°å¢ï¼å
¥åºè¯·æ±ç¶æï¼é²æ¢éå¤ç¹å»ï¼ |
| | | isInbounding: false |
| | | } |
| | | }, |
| | | onShow() {}, |
| | |
| | | }) |
| | | }, |
| | | inbound() { |
| | | // 1. åç½®æ ¡éª |
| | | if (this.inboundBarcode == "") { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«ææçæ¡ç ", |
| | |
| | | }) |
| | | return; |
| | | } |
| | | |
| | | // 2. 鲿¢éå¤ç¹å»ï¼å¦ææ£å¨è¯·æ±ï¼ç´æ¥è¿å |
| | | if (this.isInbounding) return; |
| | | |
| | | // 3. æ 记为请æ±ä¸ï¼ç¦ç¨æé® |
| | | this.isInbounding = true; |
| | | |
| | | var postData = { |
| | | MainData: { |
| | | "barcode": this.inboundBarcode, |
| | |
| | | title: err.message, |
| | | type: "error" |
| | | }) |
| | | }).finally(() => { |
| | | // 4. 请æ±å®æï¼æå/失败ï¼åï¼æ¢å¤æé®ç¶æ |
| | | this.isInbounding = false; |
| | | }) |
| | | }, |
| | | inputChangebarcode() { |
| | |
| | | this.sns.splice(res, 1); |
| | | }, |
| | | submit() { |
| | | // 1. åç½®æ ¡éª |
| | | if (this.barcode == "") { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«ææçæ¡ç ", |
| | |
| | | return; |
| | | } |
| | | } |
| | | |
| | | // 2. 鲿¢éå¤ç¹å»ï¼å¦ææ£å¨è¯·æ±ï¼ç´æ¥è¿å |
| | | if (this.isSubmitting) return; |
| | | |
| | | // 3. æ 记为请æ±ä¸ï¼ç¦ç¨æé® |
| | | this.isSubmitting = true; |
| | | |
| | | if (this.warehouseId == 2) { //油墨ä»åºåºID |
| | | this.sn = this.sns[0]; |
| | | for (var i = 0; i < this.Initiallife - 1; i++) { |
| | |
| | | type: "error" |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | // 4. 请æ±å®æï¼æå/失败ï¼åï¼æ¢å¤æé®ç¶æ |
| | | this.isSubmitting = false; |
| | | }) |
| | | } |
| | | } |