| | |
| | | <template> |
| | | <view> |
| | | <view class="list list-font-color shop-car" :class="orderDetl.color" v-for="orderDetl in orderCarList" > |
| | | <view class="list list-font-color shop-car" :class="orderDetl.color" v-for="(orderDetl,index) in orderCarList" :key="index"> |
| | | <view class="list-left"> |
| | | <view class="detl-threeCode">{{orderDetl.threeCode}}</view> |
| | | <view>主单号:{{orderDetl.orderNo}}</view> |
| | |
| | | <view>总数量:{{orderDetl.anfme}}</view> |
| | | <view>入库数量:{{orderDetl.pakinQty}}</view> |
| | | </view> |
| | | <view class="list-right" @click="chageDetl(orderDetl)"> |
| | | <view class="list-right" @click="chageDetl(index)"> |
| | | <uni-icons type="settings" size="25" color="#fff"></uni-icons> |
| | | </view> |
| | | </view> |
| | |
| | | <uni-number-box :value="count" :step='1' :max="9999999" color="#747474" @change="changeValue" /> |
| | | </view> |
| | | <view class="btn"> |
| | | <view class="btn-left" @click="addClose">取消</view> |
| | | <view class="btn-right" @click="addConfirm()">添加</view> |
| | | <view class="btn-left" @click="remove()">移除物料</view> |
| | | <view class="btn-right" @click="changeCount()">修改数量</view> |
| | | </view> |
| | | </view> |
| | | </uni-popup> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | orderCarList: [] |
| | | orderCarList: [], |
| | | count: 0, |
| | | index: 0 |
| | | } |
| | | }, |
| | | onShow() { |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | chageDetl() { |
| | | |
| | | } |
| | | chageDetl(index) { |
| | | this.index = index |
| | | this.$refs.chageDetl.open() |
| | | }, |
| | | // 修改数量 |
| | | changeCount() { |
| | | if (this.count > this.orderCarList[this.index].anfme) { |
| | | uni.showToast({ title: '数量不合法!', icon: "none", position: 'top' }) |
| | | return |
| | | } |
| | | this.orderCarList[this.index].pakinQty = this.count |
| | | this.$forceUpdate() // 强制刷新 |
| | | this.$refs.chageDetl.close() |
| | | }, |
| | | // 移除物料 |
| | | remove() { |
| | | this.orderCarList.splice(this.index, 1) |
| | | this.$refs.chageDetl.close() |
| | | }, |
| | | changeValue(value) { |
| | | this.count = value |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | height: 100%; |
| | | justify-content: center; |
| | | align-items: center; |
| | | color: #606266; |
| | | color: #e2231a; |
| | | border-right: 1px solid #DCDFE6; |
| | | } |
| | | .btn-right { |