| | |
| | | <template> |
| | | <view> |
| | | <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem"> |
| | | </uni-segmented-control> |
| | | <view v-show="current === 0"> |
| | | <view style="padding: 5%;"> |
| | | <uni-forms label-width="120"> |
| | | <uni-forms-item label="æçç¼ç "> |
| | | <uni-easyinput type="text" :focus="!istrue" @input="carNoInputChange" v-model="PalletCode" |
| | | placeholder="请è¾å
¥æçç¼ç " ref='midInput' /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="æ¬è¿èµ·ç¹"> |
| | | <uni-easyinput type="text" :focus="istrue" v-model="SourceAddress" |
| | | placeholder="请è¾å
¥AGVæ¬è¿èµ·ç¹" ref='midInput' /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="æ¬è¿ç»ç¹"> |
| | | <uni-easyinput type="text" :focus="!istrue" @input="carNoInputChange" v-model="TargetAddress" |
| | | placeholder="请è¾å
¥AGVæ¬è¿ç»ç¹" ref='midInput' /> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | <button @click="InboundTask" type="primary" size="default" style="margin-top: 2%;">æ¬è¿</button> |
| | | <u-toast ref="InboundTaskluToast" /> |
| | | <u-sticky> |
| | | <view style="background-color: #ffffff;"> |
| | | <uni-search-bar @confirm="search" v-model="searchValue"></uni-search-bar> |
| | | </view> |
| | | </view> |
| | | <view v-show="current === 1"> |
| | | <view style="padding: 5%;"> |
| | | <uni-forms label-width="120"> |
| | | <uni-forms-item label="æ ç ç¼ ç "> |
| | | <uni-easyinput type="text" :focus="barcodefocus" @input="inputChangebarcode" v-model="Barcode" |
| | | placeholder="请è¾å
¥æçç¼ç " ref='midInput' /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="跨楼å±èµ·ç¹"> |
| | | <uni-easyinput type="text" :focus="barcodefocus" v-model="StartAddress" |
| | | placeholder="请è¾å
¥è·¨æ¥¼å±èµ·ç¹" ref='midInput' /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="跨楼å±ç»ç¹"> |
| | | <uni-easyinput type="text" :focus="barcodefocus" v-model="EndAddress" |
| | | placeholder="请è¾å
¥è·¨æ¥¼å±ç»ç¹" ref='midInput' /> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | <button @click="OutboundTask" type="primary" size="default" style="margin-top: 2%;">ä¸åä»»å¡</button> |
| | | <u-toast ref="OutboundTaskluToast" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-sticky> |
| | | <uni-list :border="true"> |
| | | <uni-list-item direction="column" clickable |
| | | v-for="item in allReceivingOrders" :key="item.id"> |
| | | <template v-slot:body> |
| | | <uni-group margin-top="20"> |
| | | <view class="flex-row"> |
| | | <view class="label">æçæ¡ç :</view> |
| | | <view class="value">{{item.palletCode}}</view> |
| | | </view> |
| | | <view class="flex-row"> |
| | | <view class="label">è´§ä½ç¼ç :</view> |
| | | <view class="value">{{item.locationCode}}</view> |
| | | </view> |
| | | <view class="flex-row"> |
| | | <view class="label">ç©æç¼ç :</view> |
| | | <view class="value">{{item.materielCode}}</view> |
| | | </view> |
| | | <view class="flex-row"> |
| | | <view class="label">ç©æåç§°:</view> |
| | | <view class="value">{{item.materielName}}</view> |
| | | </view> |
| | | <view class="flex-row"> |
| | | <view class="label">åºåæ°é:</view> |
| | | <view class="value">{{item.quantity}}</view> |
| | | </view> |
| | | <view> |
| | | <button @click="Outbound(item.palletCode)" type="primary" size="default" style="margin-top: 2%;">åºåº</button> |
| | | </view> |
| | | </uni-group> |
| | | </template> |
| | | </uni-list-item> |
| | | |
| | | </uni-list> |
| | | <!-- <uni-load-more :status="status" v-if="loadVisible"></uni-load-more> |
| | | |
| | | <u-back-top :scroll-top="scrollTop" top="400"></u-back-top> --> |
| | | <u-toast ref="luToast" /> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | page: "/pages/Production/ProductionOutorderboxing?orderNo=", |
| | | loadVisible: false, |
| | | istrue: false, |
| | | barcodefocus: false, |
| | | range: [], |
| | | EndAddress: "", |
| | | StartAddress: "", |
| | | Barcode: "", |
| | | TargetAddress:"", |
| | | PalletCode: "", |
| | | SourceAddress: "", |
| | | items: ['æ¬è¿', '跨楼å±'], |
| | | current: 0 |
| | | searchValue: "", |
| | | status: "more", |
| | | allReceivingOrders: [], |
| | | pageNo: 1, |
| | | scrollTop: 0 |
| | | } |
| | | }, |
| | | onLoad(res) { |
| | | this.getData(); |
| | | }, |
| | | onReachBottom() { |
| | | this.pageNo += 1; |
| | | this.getData(); |
| | | }, |
| | | onPageScroll(e) { |
| | | this.scrollTop = e.scrollTop; |
| | | }, |
| | | methods: { |
| | | onClickItem(e) { |
| | | if (this.current != e.currentIndex) { |
| | | this.current = e.currentIndex; |
| | | } |
| | | search(res) { |
| | | this.getData(); |
| | | }, |
| | | InboundTask() { |
| | | if (this.PalletCode.length <= 0 && this.Point.length) { |
| | | this.$refs.InboundTaskluToast.show({ |
| | | title: "æçç¼ç è·ç»å®è´§ä½ä¸è½ä¸ºç©º", |
| | | type: "error" |
| | | }) |
| | | return; |
| | | getData() { |
| | | var postData = { |
| | | materielCode: this.searchValue, |
| | | pageNo: this.pageNo |
| | | } |
| | | var param = { |
| | | "PalletCode": this.PalletCode, |
| | | "Position": this.SourceAddress, |
| | | "TargetAddress":this.TargetAddress |
| | | } |
| | | console.log(param); |
| | | this.$u.post('/api/Task/RequestAGVCarryTaskAsync', param).then(res => { |
| | | this.allReceivingOrders=[]; |
| | | this.$u.post('/api/StockInfo/GetStockView', postData).then((res) => { |
| | | if (res.status) { |
| | | this.$refs.InboundTaskluToast.show({ |
| | | if (this.searchValue == '') { |
| | | this.allReceivingOrders = res.data; |
| | | if (this.allReceivingOrders.length > 3) { |
| | | this.loadVisible = true; |
| | | } else { |
| | | this.loadVisible = false; |
| | | } |
| | | } else { |
| | | this.allReceivingOrders = res.data; |
| | | if (this.allReceivingOrders.length > 3) { |
| | | this.loadVisible = true; |
| | | } else { |
| | | this.loadVisible = false; |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | Outbound(palletCode) { |
| | | this.$u.post('/api/Task/OutBoundTaskAsync?palletCode='+palletCode, "").then((res) => { |
| | | if (res.status) { |
| | | this.$refs.luToast.show({ |
| | | title: res.message, |
| | | type: "success" |
| | | }) |
| | | this.PalletCode = ""; |
| | | this.SourceAddress = ""; |
| | | this.TargetAddress=""; |
| | | this.istrue = false; |
| | | this.getData(); |
| | | } else { |
| | | this.$refs.InboundTaskluToast.show({ |
| | | this.$refs.luToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | OutboundTask() { |
| | | if (this.EndAddress.length <= 0 && this.Barcode.length) { |
| | | this.$refs.OutboundTaskluToast.show({ |
| | | title: "请è¾å
¥èµ·ç¹ç«å°", |
| | | type: "error" |
| | | }) |
| | | return; |
| | | } |
| | | var param = { |
| | | "PalletCode": this.Barcode, |
| | | "Position": this.StartAddress, |
| | | "TargetAddress":this.EndAddress |
| | | } |
| | | this.$u.post('/api/Task/RequestAcrossFloorTaskAsync', param).then(res => { |
| | | if (res.status) { |
| | | this.$refs.OutboundTaskluToast.show({ |
| | | title: res.message, |
| | | type: "success" |
| | | }) |
| | | this.Barcode = ""; |
| | | this.EndAddress = ""; |
| | | this.StartAddress=""; |
| | | this.barcodefocus = false; |
| | | } else { |
| | | this.$refs.OutboundTaskluToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | -webkit-line-clamp: 2; |
| | | -webkit-box-orient: vertical; |
| | | } |
| | | |
| | | .customcss { |
| | | display: flex; |
| | | position: fixed; |
| | | width: 100%; |
| | | top: 10px; |
| | | text-align: center; |
| | | z-index: 999; |
| | | left: 30px; |
| | | height: 20%; |
| | | } |
| | | |
| | | .footer { |
| | | padding-top: 50%; |
| | | } |
| | | |
| | | .flex-row { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | /* å·¦å³å¯¹é½ */ |
| | | align-items: center; |
| | | /* åç´å±
ä¸ */ |
| | | padding: 10rpx 0; |
| | | } |
| | | |
| | | .label { |
| | | color: #666; |
| | | width: 200rpx; |
| | | /* åºå®æ ç¾å®½åº¦ */ |
| | | text-align: left; |
| | | } |
| | | |
| | | .value { |
| | | flex: 1; |
| | | text-align: right; |
| | | color: #333; |
| | | font-weight: bold; |
| | | } |
| | | </style> |