| | |
| | | <template> |
| | | <view> |
| | | <!-- <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem"> |
| | | </uni-segmented-control> --> |
| | | <view class="content"> |
| | | <!-- <view v-if="current === 0" class="headerstyle"> --> |
| | | <view class="itemstyle"> |
| | | <u-sticky> |
| | | <view style="background-color: #ffffff;"> |
| | | <uni-search-bar @confirm="search" v-model="searchValue"></uni-search-bar> |
| | | </view> |
| | | </u-sticky> |
| | | <uni-forms label-width="50"> |
| | | <uni-forms-item label="åºåºåºå"><uni-data-select v-model="value" |
| | | :localdata="range"></uni-data-select></uni-forms-item> |
| | | </uni-forms> |
| | | <uni-list :border="true"> |
| | | <uni-list-item direction="column" v-for="(item,index) in orderInfo" :key="item.dtlId"> |
| | | <template v-slot:body> |
| | | <view class="uni-list-box"> |
| | | <button type="primary" style="position: absolute;right: 1%;" size="mini" |
| | | @click="OutBound(item.id)">åºåº</button> |
| | | <view class="uni-content"> |
| | | <view style="font-size: 18px;">åæ®ç¼å·ï¼{{orderNo}}</view> |
| | | <view style="font-size: 18px;">ç©æç¼ç ï¼{{item.materielCode}}</view> |
| | | <view style="font-size: 18px;">ç©æåç§°ï¼{{item.materielName}}</view> |
| | | <view style="font-size: 18px;">åæ®æ°éï¼{{item.orderQuantity}}</view> |
| | | <!-- <view style="font-size: 18px;">å·²åé
æ°éï¼{{item.processQty}}</view> --> |
| | | <view style="font-size: 18px;">åºåºæ°éï¼{{item.overOutQuantity}}</view> |
| | | </view> |
| | | <view class="itemstyle"> |
| | | <u-sticky> |
| | | <view style="background-color: #ffffff;"> |
| | | <uni-search-bar @confirm="search" v-model="searchValue"></uni-search-bar> |
| | | </view> |
| | | </u-sticky> |
| | | <uni-forms label-width="50"> |
| | | <uni-forms-item label="åºåºåºå"><uni-data-select v-model="value" |
| | | :localdata="range"></uni-data-select></uni-forms-item> |
| | | </uni-forms> |
| | | <uni-list :border="true" class="order-list"> |
| | | <uni-list-item v-for="item in orderInfo" :key="item.id" class="list-item"> |
| | | <template v-slot:body> |
| | | <view class="item-content"> |
| | | <view class="info-section"> |
| | | <text class="info-label">åæ®ç¼å·ï¼</text> |
| | | <text class="info-value">{{ orderNo }}</text> |
| | | |
| | | <text class="info-label">ç©æç¼ç ï¼</text> |
| | | <text class="info-value">{{ item.materielCode }}</text> |
| | | |
| | | <text class="info-label">ç©æåç§°ï¼</text> |
| | | <text class="info-value">{{ item.materielName }}</text> |
| | | |
| | | <text class="info-label">åæ®æ°éï¼</text> |
| | | <text class="info-value">{{ item.orderQuantity }}</text> |
| | | |
| | | <text class="info-label">åºåºæ°éï¼</text> |
| | | <text class="info-value">{{ item.overOutQuantity }}</text> |
| | | </view> |
| | | </template> |
| | | </uni-list-item> |
| | | </uni-list> |
| | | </view> |
| | | <u-toast ref="uToast" /> |
| | | <!-- </view> --> |
| | | |
| | | <button class="action-btn" type="primary" size="mini" @click="handleOutbound(item.id)"> |
| | | åºåº |
| | | </button> |
| | | </view> |
| | | </template> |
| | | </uni-list-item> |
| | | </uni-list> |
| | | |
| | | |
| | | </view> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | items: ['ç´æ¥åºåº'], |
| | | current: 0, |
| | | orderNo: "", |
| | | Id: 0, |
| | | AreaId: "", |
| | | orderIds: [], |
| | | orderInfo: [], |
| | | searchValue: "", |
| | | value:"2", |
| | | label: "", |
| | | value: "2", |
| | | range: [], |
| | | orderDetail: {}, |
| | | focus: false, |
| | | key: [], |
| | | materielCode: "", |
| | | } |
| | | }, |
| | | onShow() {}, |
| | | // onShow() {}, |
| | | onLoad(res) { |
| | | this.focus = false; |
| | | this.addressFocus = false; |
| | | this.Id = res.Id; |
| | | this.orderNo = res.orderNo; |
| | | this.range = config.OutArea; |
| | | this.getData(); |
| | | }, |
| | | methods: { |
| | | groupClick(materielCode, id) { |
| | | // window.location="/pages/materielGroup/OutOrderDetail?materielCode="+materielCode+"&id="+id; |
| | | // console.log(materielCode,id) |
| | | }, |
| | | search() { |
| | | this.getData(); |
| | | }, |
| | | getData() { |
| | | var id = this.Id |
| | | this.orderInfo = []; |
| | | var postData = { |
| | | id: id, |
| | | id: this.Id, |
| | | searchValue: this.searchValue, |
| | | }; |
| | | this.$u.post('/api/ProductionOutboundOrder/GettProductOutboundOrderDetail', postData).then((res) => { |
| | | if (res.status) { |
| | | this.orderInfo = res.data; |
| | | // if (this.orderDetail.length > 3) { |
| | | // this.loadVisible = true; |
| | | // } |
| | | } |
| | | }) |
| | | }, |
| | | onClickItem(e) { |
| | | this.focus = false; |
| | | this.addressFocus = false; |
| | | if (this.current !== e.currentIndex) { |
| | | this.current = e.currentIndex; |
| | | if (this.current == 2) { |
| | | this.getData(); |
| | | } |
| | | } |
| | | }, |
| | | OutBound(id) { |
| | | this.orderIds=[]; |
| | | this.orderIds = []; |
| | | this.orderIds.push(id); |
| | | var postData = { |
| | | AreaId: this.value, |
| | |
| | | if (res.status) { |
| | | this.items = []; |
| | | uni.$showMsg(res.message); |
| | | setTimeout(() => { |
| | | this.addressFocus = false; |
| | | }, 200); |
| | | setTimeout(() => {}, 200); |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | |
| | | }) |
| | | }) |
| | | }, |
| | | click(e) { |
| | | if (this.key.find(x => x.id == e.id)) { |
| | | this.key.map((item, index) => { |
| | | if (item.id == e.id) { |
| | | this.key.splice(index, 1); |
| | | } |
| | | }) |
| | | } else { |
| | | this.key.push(e.id); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | color: #333; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .container { |
| | | padding: 20rpx; |
| | | } |
| | | |
| | | .search-bar { |
| | | background: #fff; |
| | | padding: 15rpx 0; |
| | | box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.1); |
| | | z-index: 10; |
| | | } |
| | | |
| | | .filter-section { |
| | | margin: 20rpx 0; |
| | | } |
| | | |
| | | .order-list { |
| | | .list-item { |
| | | margin-bottom: 15rpx; |
| | | border-radius: 10rpx; |
| | | overflow: hidden; |
| | | box-shadow: 0 1rpx 3rpx rgba(0, 0, 0, 0.05); |
| | | |
| | | .item-content { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: flex-start; |
| | | padding: 20rpx; |
| | | |
| | | .info-section { |
| | | flex: 1; |
| | | display: grid; |
| | | grid-template-columns: auto 1fr; |
| | | gap: 10rpx 15rpx; |
| | | |
| | | .info-label { |
| | | color: #666; |
| | | font-size: 28rpx; |
| | | grid-column: 1; |
| | | } |
| | | |
| | | .info-value { |
| | | color: #333; |
| | | font-size: 28rpx; |
| | | font-weight: 500; |
| | | grid-column: 2; |
| | | } |
| | | } |
| | | |
| | | .action-btn { |
| | | margin-left: 150rpx; |
| | | align-self: center; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |