| | |
| | | <uni-easyinput v-model="productCategory" placeholder="" disabled /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="出库数量/件" required> |
| | | <uni-number-box v-model="goods.quantity" :min="0"></uni-number-box> |
| | | <uni-number-box v-model="goods.quantity" :min="0" :max="inboundNum0"></uni-number-box> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="出库日期" required> |
| | | <uni-datetime-picker type="date" :clear-icon="false" v-model="goods.time" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="出库人" required> |
| | | <picker :range="userList" @change="swichUser" range-key="nickName"> |
| | | <text>{{ userName||'请选择' }}</text> |
| | | <view style="border: 1px solid #f5f5f5;border-radius: 4rpx;padding: 20rpx;"> |
| | | <text>{{ userName||'请选择' }}</text> |
| | | </view> |
| | | </picker> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | |
| | | const pageTitle = ref('领用产品') |
| | | const userList = ref([]) |
| | | const userName = ref('') |
| | | const inboundNum0 = ref(0) |
| | | const goods = ref({ |
| | | id: 0, |
| | | quantity: 0, |
| | |
| | | uni.navigateBack() |
| | | } |
| | | const submitForm = async () => { |
| | | if(!goods.value.quantity){ |
| | | uni.showToast({ |
| | | title:'请添加出库数量', |
| | | icon: 'none', |
| | | duration: 1500 |
| | | }) |
| | | return |
| | | } |
| | | if(!goods.value.time){ |
| | | uni.showToast({ |
| | | title:'请选择出库日期', |
| | | icon: 'none', |
| | | duration: 1500 |
| | | }) |
| | | return |
| | | } |
| | | if(!goods.value.userId){ |
| | | uni.showToast({ |
| | | title:'请选择出库人', |
| | | icon: 'none', |
| | | duration: 1500 |
| | | }) |
| | | return |
| | | } |
| | | let res = await stockout(goods.value) |
| | | if (res.code !== 200) { |
| | | uni.showToast({ |
| | |
| | | let _goods = JSON.parse(props.goods) |
| | | goods.value.id = _goods.id |
| | | productCategory.value = _goods.productCategory |
| | | inboundNum0.value = _goods.inboundNum0 |
| | | goods.value.type = _goods.purchaseContractNumber?1:3 |
| | | initContacts() |
| | | }) |
| | | </script> |
| | |
| | | box-sizing: border-box; |
| | | margin-bottom: 20rpx; |
| | | padding: 20rpx; |
| | | background-color: #f5f5f5; |
| | | |
| | | border-radius: 20rpx; |
| | | } |
| | | |