| | |
| | | </uni-forms> |
| | | </view> |
| | | </view> |
| | | <view v-if="current === 2" class="headerstyle" > |
| | | <view class="itemstyle"> |
| | | <uni-forms label-width="120"> |
| | | <uni-forms-item label="æçæ¡ç "> |
| | | <uni-easyinput type="text" :focus="!addressEmptyFocus" v-model="emptyCode" |
| | | placeholder="è¯·æ«ææçæ¡ç " ref='midInput' @confirm="inputChangeemptyCode" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="å°åæ¡ç "> |
| | | <uni-easyinput type="text" v-model="addressEmpty" |
| | | placeholder="è¯·æ«æå°åæ¡ç " ref='midInput' :focus="addressEmptyFocus" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item> |
| | | <button @click="inEmpty" type="primary" size="default" style="margin-top: 2%;">å
¥åºç¡®è®¤</button> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | |
| | | orderNo: "", |
| | | warehouseId: "", |
| | | Test: false, |
| | | emptyCode: "", |
| | | addressEmpty: "", |
| | | addressEmptyFocus: false, |
| | | } |
| | | }, |
| | | onShow() {}, |
| | |
| | | if (this.warehouseId == 1) { |
| | | this.items=['ç»ç']; |
| | | } |
| | | if (this.warehouseId == 2) { |
| | | this.items=['空çå
¥åº']; |
| | | this.current=2; |
| | | } |
| | | }, |
| | | methods: { |
| | | barcodeInput() { |
| | |
| | | if (this.barcode.length > 0) { |
| | | this.focus = true; |
| | | } |
| | | }) |
| | | }, |
| | | inputChangeemptyCode() { |
| | | if (this.emptyCode.length > 0) { |
| | | this.addressEmptyFocus = true; |
| | | } else { |
| | | this.addressEmptyFocus = false; |
| | | } |
| | | }, |
| | | inEmpty(){ |
| | | if (this.emptyCode == "") { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«ææçæ¡ç ", |
| | | type: "error" |
| | | }) |
| | | return; |
| | | } |
| | | if (this.addressEmpty == "") { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«æå°åæ¡ç ", |
| | | type: "error" |
| | | }) |
| | | return; |
| | | } |
| | | var url="?barCode="+this.emptyCode+"&startPoint="+this.addressEmpty; |
| | | this.$u.post('/api/Task/EmptyBackTask'+url, {}).then(res => { |
| | | if (res.status) { |
| | | this.emptyCode = ""; |
| | | this.addressEmpty=""; |
| | | //è·åæ»æ°é |
| | | setTimeout(() => { |
| | | this.addressEmptyFocus = false; |
| | | this.$refs.uToast.show({ |
| | | title: "æå", |
| | | type: "success" |
| | | }) |
| | | }, 200); |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | } |
| | | }).catch(err => { |
| | | this.$refs.uToast.show({ |
| | | title: err.message, |
| | | type: "error" |
| | | }) |
| | | }) |
| | | }, |
| | | inbound() { |
| | |
| | | }) |
| | | this.focus = false; |
| | | this.barcode = ""; |
| | | this.matInfos = []; |
| | | this.sns = []; |
| | | this.matTotal = []; |
| | | this.materSn = ""; |
| | | this.wide = ""; |
| | | this.weight = ""; |
| | | this.thickness = ""; |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |