|
@@ -27,11 +27,11 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-button type="primary" size="large" @click="scanCode">扫码出库</el-button>
|
|
<el-button type="primary" size="large" @click="scanCode">扫码出库</el-button>
|
|
|
<el-table :data="goodsExchangeAddForm.product_list" style="width: 100%;font-size: 12px;">
|
|
<el-table :data="goodsExchangeAddForm.product_list" style="width: 100%;font-size: 12px;">
|
|
|
- <el-table-column prop="goods_vo.name" label="商品名称" />
|
|
|
|
|
|
|
+ <el-table-column prop="goods_vo.name" label="商品名称" />
|
|
|
<el-table-column prop="product_vo.sku" label="SKU" />
|
|
<el-table-column prop="product_vo.sku" label="SKU" />
|
|
|
<el-table-column prop="out_num" label="出库数量" />
|
|
<el-table-column prop="out_num" label="出库数量" />
|
|
|
<el-table-column prop="orderNum" :style="{ color: 'red' }" label="待出库数量" />
|
|
<el-table-column prop="orderNum" :style="{ color: 'red' }" label="待出库数量" />
|
|
|
- <el-table-column label="操作">
|
|
|
|
|
|
|
+ <el-table-column label="操作">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<el-button size="mini" type="danger" @click="
|
|
<el-button size="mini" type="danger" @click="
|
|
|
goodsExchangeAddForm.product_list.splice(scope.$index, 1)
|
|
goodsExchangeAddForm.product_list.splice(scope.$index, 1)
|
|
@@ -40,14 +40,15 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
- <el-dialog v-model="dialogVisible" :modal=false title="扫码出库" :close-on-click-modal="false" top="80px" width="90%" style="height: 200px"
|
|
|
|
|
- :before-close="handleClose">
|
|
|
|
|
|
|
+ <el-dialog v-model="dialogVisible" :modal=false title="扫码出库" :close-on-click-modal="false" top="80px"
|
|
|
|
|
+ width="90%" style="height: 200px" :before-close="handleClose">
|
|
|
<el-form :model="snCodeForm" label-width="auto" style="max-width: 600px">
|
|
<el-form :model="snCodeForm" label-width="auto" style="max-width: 600px">
|
|
|
<el-form-item label="SKU">
|
|
<el-form-item label="SKU">
|
|
|
<el-input v-model="snCodeForm.bar_code" ref="inputRef" inputmode="none" @keyup.enter="toSearch()" />
|
|
<el-input v-model="snCodeForm.bar_code" ref="inputRef" inputmode="none" @keyup.enter="toSearch()" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="序列号">
|
|
<el-form-item label="序列号">
|
|
|
- <el-input v-model="snCodeForm.sn_code" ref="snInputRef" inputmode="none" @keyup.enter="toSnCode()" />
|
|
|
|
|
|
|
+ <el-input v-model="snCodeForm.sn_code" ref="snInputRef" inputmode="none"
|
|
|
|
|
+ @keyup.enter="toSnCode()" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<!-- <template #footer>
|
|
<!-- <template #footer>
|
|
@@ -187,7 +188,9 @@ const toSnCode = async () => {
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
if (!exists) {
|
|
if (!exists) {
|
|
|
- goodsExchangeAddForm.product_list[index.value].sn_code_list.push(res.data);
|
|
|
|
|
|
|
+ await infoApi.skuRedis({ send_order_id: id.value, item_id: goodsExchangeAddForm.product_list[index.value].id, sku: res.data }).then((respons: any) => {
|
|
|
|
|
+ goodsExchangeAddForm.product_list[index.value].sn_code_list.push(res.data);
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
goodsExchangeAddForm.product_list[index.value].out_num = goodsExchangeAddForm.product_list[index.value].sn_code_list.length;
|
|
goodsExchangeAddForm.product_list[index.value].out_num = goodsExchangeAddForm.product_list[index.value].sn_code_list.length;
|
|
|
snCodeForm.bar_code = "";
|
|
snCodeForm.bar_code = "";
|
|
@@ -286,10 +289,20 @@ const ship = () => {
|
|
|
const init = async () => {
|
|
const init = async () => {
|
|
|
try {
|
|
try {
|
|
|
const res: any = await entryOutAPI.warehouseOut(id.value);
|
|
const res: any = await entryOutAPI.warehouseOut(id.value);
|
|
|
- res.data.product_list.map(el => {
|
|
|
|
|
- el.orderNum = el.out_num
|
|
|
|
|
- el.out_num = 0
|
|
|
|
|
- el.sn_code_list = []
|
|
|
|
|
|
|
+ await infoApi.skuRedis({ send_order_id: id.value, type: 'enter' }).then((response: any) => {
|
|
|
|
|
+ res.data.product_list.map(el => {
|
|
|
|
|
+ el.orderNum = el.out_num
|
|
|
|
|
+ el.out_num = 0
|
|
|
|
|
+ Object.keys(response.data).map(item => {
|
|
|
|
|
+ if (el.id == item) {
|
|
|
|
|
+ el.sn_code_list = response.data[item]
|
|
|
|
|
+ el.out_num = el.sn_code_list.length
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ if (!el.sn_code_list) {
|
|
|
|
|
+ el.sn_code_list = []
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
goodsExchangeAddForm.warehouse_id = res.data.warehouse_id;
|
|
goodsExchangeAddForm.warehouse_id = res.data.warehouse_id;
|
|
|
goodsExchangeAddForm.type = res.data.type;
|
|
goodsExchangeAddForm.type = res.data.type;
|