|
@ -67,6 +67,21 @@ |
|
|
申请数量:{{item.applyQty}} |
|
|
申请数量:{{item.applyQty}} |
|
|
</view> |
|
|
</view> |
|
|
</u-col> |
|
|
</u-col> |
|
|
|
|
|
<u-col :span="24"> |
|
|
|
|
|
<view class="dec"> |
|
|
|
|
|
库位编码:{{item.locationNumber}} |
|
|
|
|
|
</view> |
|
|
|
|
|
</u-col> |
|
|
|
|
|
<!-- <u-col :span="24"> |
|
|
|
|
|
<view class="dec"> |
|
|
|
|
|
库位名称:{{item.locationName}} |
|
|
|
|
|
</view> |
|
|
|
|
|
</u-col> --> |
|
|
|
|
|
<u-col :span="24"> |
|
|
|
|
|
<view class="dec"> |
|
|
|
|
|
库位类型:{{item.isInAccount == 'FALSE'?'帐外库' :'帐内库'}} |
|
|
|
|
|
</view> |
|
|
|
|
|
</u-col> |
|
|
</u-row> |
|
|
</u-row> |
|
|
</view> |
|
|
</view> |
|
|
<u-icon name="minus-circle" color="#aaaaaa" size="60" @click="delSpareParts(index)"></u-icon> |
|
|
<u-icon name="minus-circle" color="#aaaaaa" size="60" @click="delSpareParts(index)"></u-icon> |
|
@ -86,35 +101,40 @@ |
|
|
<!-- 添加备件 --> |
|
|
<!-- 添加备件 --> |
|
|
<u-popup v-model="isPopupShow" mode="center" border-radius="14"> |
|
|
<u-popup v-model="isPopupShow" mode="center" border-radius="14"> |
|
|
<view class="popup-title">添加备件</view> |
|
|
<view class="popup-title">添加备件</view> |
|
|
<view class="popup"> |
|
|
<scroll-view scroll-y="true" style="max-height:60vh;"> |
|
|
<u-form :model="form1" ref="form1Ref" label-width="160rpx"> |
|
|
<view class="popup"> |
|
|
<u-form-item label="库位" prop="locationNumber" required> |
|
|
<u-form :model="form1" ref="form1Ref" label-width="180rpx"> |
|
|
<u-input v-model="form1.locationNumber" placeholder="请输入库位" @blur="blur()" |
|
|
<u-form-item label="库位" prop="locationNumber" required> |
|
|
@confirm="handelScanMsg" :focus='isFocus' /> |
|
|
<u-input v-model="form1.locationNumber" placeholder="请输入库位" @blur="blur()" |
|
|
|
|
|
@confirm="handelScanMsg" :focus='isFocus' /> |
|
|
</u-form-item> |
|
|
|
|
|
<u-form-item :label="`备件名称`" prop="itemNumber" required class="disabled"> |
|
|
</u-form-item> |
|
|
<view class="select"> |
|
|
<u-form-item :label="`备件名称`" prop="itemNumber" required class="disabled"> |
|
|
<u-input v-model="form1.itemName" placeholder="请选择备件" disabled /> |
|
|
<view class="select"> |
|
|
</view> |
|
|
<u-input v-model="form1.itemName" placeholder="请选择备件" disabled /> |
|
|
</u-form-item> |
|
|
</view> |
|
|
<u-form-item label="申请数量" prop="applyQty" required class="disabled"> |
|
|
</u-form-item> |
|
|
<u-input v-model="form1.applyQty" type="number" disabled placeholder="请输入申请数量" /> |
|
|
<u-form-item label="申请数量" prop="applyQty" required class="disabled"> |
|
|
</u-form-item> |
|
|
<u-input v-model="form1.applyQty" type="number" disabled placeholder="请输入申请数量" /> |
|
|
<u-form-item label="已出库数量" prop="receiveQty" required class="disabled"> |
|
|
</u-form-item> |
|
|
<u-input v-model="form1.receiveQty" type="number" disabled placeholder="请输入已出库数量" /> |
|
|
<u-form-item label="已出库数量" prop="receiveQty" required class="disabled"> |
|
|
</u-form-item> |
|
|
<u-input v-model="form1.receiveQty" type="number" disabled placeholder="请输入已出库数量" /> |
|
|
<u-form-item label="库存数量" prop="stockQty" required class="disabled"> |
|
|
</u-form-item> |
|
|
<u-input v-model="form1.stockQty" type="number" disabled placeholder="请输入库存数量" /> |
|
|
<u-form-item label="库存数量" prop="stockQty" required class="disabled"> |
|
|
</u-form-item> |
|
|
<u-input v-model="form1.stockQty" type="number" disabled placeholder="请输入库存数量" /> |
|
|
<u-form-item label="出库数量" prop="qty" required> |
|
|
</u-form-item> |
|
|
<u-input v-model="form1.qty" type="number" placeholder="请输入出库数量" /> |
|
|
<u-form-item label="剩余出库数量" prop="totalReception" required class="disabled"> |
|
|
</u-form-item> |
|
|
<u-input v-model="form1.totalReception" type="number" disabled placeholder="请输入出库数量" /> |
|
|
<u-form-item label="描述" prop="qty"> |
|
|
</u-form-item> |
|
|
<u-input v-model="form1.describes" placeholder="请输入描述" /> |
|
|
<u-form-item label="出库数量" prop="qty" required> |
|
|
</u-form-item> |
|
|
<u-input v-model="form1.qty" type="number" placeholder="请输入出库数量" /> |
|
|
</u-form> |
|
|
</u-form-item> |
|
|
</view> |
|
|
<u-form-item label="描述" prop="describes"> |
|
|
|
|
|
<u-input v-model="form1.describes" placeholder="请输入描述" /> |
|
|
|
|
|
</u-form-item> |
|
|
|
|
|
</u-form> |
|
|
|
|
|
</view> |
|
|
|
|
|
</scroll-view> |
|
|
<view class="popup-footer"> |
|
|
<view class="popup-footer"> |
|
|
<view @click="isPopupShow = false">取消</view> |
|
|
<view @click="isPopupShow = false">取消</view> |
|
|
<view class="sure" @click="addSpare">确认</view> |
|
|
<view class="sure" @click="addSpare">确认</view> |
|
@ -153,6 +173,7 @@ |
|
|
applyQty: '', |
|
|
applyQty: '', |
|
|
receiveQty: '', |
|
|
receiveQty: '', |
|
|
stockQty: '', |
|
|
stockQty: '', |
|
|
|
|
|
totalReception:'', |
|
|
qty: '' |
|
|
qty: '' |
|
|
}) |
|
|
}) |
|
|
const isShow = ref(false) |
|
|
const isShow = ref(false) |
|
@ -194,9 +215,17 @@ |
|
|
} |
|
|
} |
|
|
// 获取订单信息详情 |
|
|
// 获取订单信息详情 |
|
|
async function getInLocationDetail() { |
|
|
async function getInLocationDetail() { |
|
|
|
|
|
// let itemNumbers = form.value.itemNumbers.map(item=>{ |
|
|
|
|
|
// return { |
|
|
|
|
|
// itemNumber:item.itemNumber, |
|
|
|
|
|
// qty:item.qty, |
|
|
|
|
|
// locationNumber:item.locationNumber, |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
await outLocationApi.getOutLocationDetail({ |
|
|
await outLocationApi.getOutLocationDetail({ |
|
|
id: form.value.id, |
|
|
id: form.value.id, |
|
|
number: form.value.number |
|
|
number: form.value.number, |
|
|
|
|
|
// itemNumbers:itemNumbers || [] |
|
|
}).then(res => { |
|
|
}).then(res => { |
|
|
form.value.applyName = res.data.applyName |
|
|
form.value.applyName = res.data.applyName |
|
|
form.value.approveName = res.data.approveName |
|
|
form.value.approveName = res.data.approveName |
|
@ -239,14 +268,14 @@ |
|
|
proxy.$modal.showToast('已出库数量和出库数量不可大于申请数量') |
|
|
proxy.$modal.showToast('已出库数量和出库数量不可大于申请数量') |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if (Number(form1.value.qty) > Number(form1.value.stockQty)) { |
|
|
if (Number(form1.value.qty) > Number(form1.value.totalReception)) { |
|
|
proxy.$modal.showToast('出库数量不可大于库存数量') |
|
|
proxy.$modal.showToast('出库数量不可大于剩余出库数量') |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if (form.value.itemNumbers && form.value.itemNumbers.length > 0) { |
|
|
if (form.value.itemNumbers && form.value.itemNumbers.length > 0) { |
|
|
let arr = form.value.itemNumbers.filter(item => item.itemNumber == form1.value.itemNumber) |
|
|
let arr = form.value.itemNumbers.filter(item => item.locationNumber == form1.value.locationNumber) |
|
|
if (arr && arr.length > 0) { |
|
|
if (arr && arr.length > 0) { |
|
|
proxy.$modal.showToast('该备件已添加') |
|
|
proxy.$modal.showToast('该库位已添加') |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
let arr1 = form.value.subList.filter(item => item.itemNumber == form1.value.itemNumber) |
|
|
let arr1 = form.value.subList.filter(item => item.itemNumber == form1.value.itemNumber) |
|
@ -263,12 +292,29 @@ |
|
|
form.value.itemNumbers.splice(index, 1) |
|
|
form.value.itemNumbers.splice(index, 1) |
|
|
} |
|
|
} |
|
|
function getLocation() { |
|
|
function getLocation() { |
|
|
|
|
|
let itemNumbers = form.value.itemNumbers.map(item=>{ |
|
|
|
|
|
return { |
|
|
|
|
|
itemNumber:item.itemNumber, |
|
|
|
|
|
qty:item.qty, |
|
|
|
|
|
locationNumber:item.locationNumber, |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
locationApi.getOutLocation({ |
|
|
locationApi.getOutLocation({ |
|
|
number: form1.value.locationNumber, |
|
|
number: form1.value.locationNumber, |
|
|
id: form.value.id, |
|
|
id: form.value.id, |
|
|
|
|
|
itemNumbers:itemNumbers |
|
|
}).then(res => { |
|
|
}).then(res => { |
|
|
if (!res.data) { |
|
|
if (!res.data) { |
|
|
msg.value = res.msg |
|
|
msg.value = res.msg |
|
|
|
|
|
form1.value.areaNumber = ''; |
|
|
|
|
|
form1.value.itemName = ''; |
|
|
|
|
|
form1.value.itemNumber = ''; |
|
|
|
|
|
form1.value.receiveQty =''; |
|
|
|
|
|
form1.value.applyQty =''; |
|
|
|
|
|
form1.value.stockQty = ''; |
|
|
|
|
|
form1.value.totalReception =''; |
|
|
|
|
|
form1.value.isInAccount =''; |
|
|
|
|
|
isInAccount.value =''; |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
form1.value.areaNumber = res.data.areaNumber; |
|
|
form1.value.areaNumber = res.data.areaNumber; |
|
@ -277,7 +323,10 @@ |
|
|
form1.value.receiveQty = res.data.receiveQty || 0; |
|
|
form1.value.receiveQty = res.data.receiveQty || 0; |
|
|
form1.value.applyQty = res.data.applyQty || 0; |
|
|
form1.value.applyQty = res.data.applyQty || 0; |
|
|
form1.value.stockQty = res.data.qty || 0; |
|
|
form1.value.stockQty = res.data.qty || 0; |
|
|
|
|
|
form1.value.totalReception = res.data.totalReception || 0; |
|
|
|
|
|
form1.value.isInAccount = res.data.isInAccount; |
|
|
isInAccount.value = res.data.isInAccount || '' |
|
|
isInAccount.value = res.data.isInAccount || '' |
|
|
|
|
|
|
|
|
// this.itemNumber = res.data.itemNumber || '' |
|
|
// this.itemNumber = res.data.itemNumber || '' |
|
|
}).catch((error) => { |
|
|
}).catch((error) => { |
|
|
msg.value = error.msg |
|
|
msg.value = error.msg |
|
|