| | |
| | | <text class="form-label">毛重(吨)</text> |
| | | <up-input |
| | | v-model="form.grossWeight" |
| | | type="number" |
| | | type="digit" |
| | | placeholder="请输入毛重" |
| | | /> |
| | | </view> |
| | |
| | | <text class="form-label">皮重(吨)</text> |
| | | <up-input |
| | | v-model="form.tareWeight" |
| | | type="number" |
| | | type="digit" |
| | | placeholder="请输入皮重" |
| | | /> |
| | | </view> |
| | |
| | | <text class="form-label">净重(吨)</text> |
| | | <up-input |
| | | v-model="form.netWeight" |
| | | type="number" |
| | | type="digit" |
| | | disabled |
| | | placeholder="自动计算" |
| | | /> |
| | |
| | | const showWeighingDatePicker = ref(false) |
| | | const weighingDateValue = ref(Date.now()) |
| | | |
| | | const maxAllowedNetWeight = computed(() => { |
| | | const v = form.unLockedQuantity ?? form.qualitity |
| | | const n = Number(v) |
| | | return !isNaN(n) ? n : 0 |
| | | }) |
| | | |
| | | onLoad((options) => { |
| | | type.value = '0' |
| | | const cached = uni.getStorageSync('stockSubtractRecord') |
| | |
| | | const handleSubmit = () => { |
| | | if (!form.id) { |
| | | uni.showToast({ title: '记录信息缺失,无法出库', icon: 'none' }) |
| | | return |
| | | } |
| | | const net = Number(form.netWeight) |
| | | if (!isNaN(net) && net > 0 && maxAllowedNetWeight.value > 0 && net > maxAllowedNetWeight.value) { |
| | | uni.showToast({ title: `净重不能大于可用库存 ${maxAllowedNetWeight.value}`, icon: 'none' }) |
| | | return |
| | | } |
| | | const payload = { ...form } |