Commit 657f9775 by qinjianhui

fix: 入库数量修改

parent 02841a8e
...@@ -277,7 +277,6 @@ import { ...@@ -277,7 +277,6 @@ import {
getStockingOrderDetailByIdApi, getStockingOrderDetailByIdApi,
rejectedStockingOrderApi, rejectedStockingOrderApi,
} from '@/api/supplier/stockingOrder' } from '@/api/supplier/stockingOrder'
import ImageView from '@/components/ImageView.vue'
import { BigNumber } from 'bignumber.js' import { BigNumber } from 'bignumber.js'
const calcRowTotalPrice = (row: StockingOrderProduct): string => { const calcRowTotalPrice = (row: StockingOrderProduct): string => {
...@@ -375,8 +374,15 @@ const tableColumns = [ ...@@ -375,8 +374,15 @@ const tableColumns = [
label: 'SKU图片', label: 'SKU图片',
prop: 'skuImage', prop: 'skuImage',
width: 180, width: 180,
align: 'center',
render: (item: StockingOrderProduct) => ( render: (item: StockingOrderProduct) => (
<ImageView src={item.warehouseSkuImage} width="50px" height="50px" /> <el-image
preview-teleported
src={item.warehouseSkuImage}
preview-src-list={[item.warehouseSkuImage]}
z-index={9999}
style="width: 60px;height: 60px;text-align: center;"
/>
), ),
}, },
{ label: '商品名称', prop: 'warehouseSkuName', minWidth: 150 }, { label: '商品名称', prop: 'warehouseSkuName', minWidth: 150 },
...@@ -414,7 +420,13 @@ const searchTableColumns = computed(() => { ...@@ -414,7 +420,13 @@ const searchTableColumns = computed(() => {
width: 120, width: 120,
align: 'center', align: 'center',
render: (item: StockingOrderProduct) => ( render: (item: StockingOrderProduct) => (
<ImageView src={item.warehouseSkuImage} width="50px" height="50px" /> <el-image
preview-teleported
src={item.warehouseSkuImage}
preview-src-list={[item.warehouseSkuImage]}
z-index={9999}
style="width: 60px;height: 60px;text-align: center;"
/>
), ),
}, },
{ label: '商品名称', prop: 'warehouseSkuName', minWidth: 150 }, { label: '商品名称', prop: 'warehouseSkuName', minWidth: 150 },
......
...@@ -125,7 +125,6 @@ import { ...@@ -125,7 +125,6 @@ import {
getStockingOrderDetailByIdApi, getStockingOrderDetailByIdApi,
supplierDispatchApi, supplierDispatchApi,
} from '@/api/supplier/stockingOrder' } from '@/api/supplier/stockingOrder'
import ImageView from '@/components/ImageView.vue'
import TableView from '@/components/TableView.vue' import TableView from '@/components/TableView.vue'
import { BigNumber } from 'bignumber.js' import { BigNumber } from 'bignumber.js'
...@@ -156,7 +155,13 @@ const tableColumns = computed(() => [ ...@@ -156,7 +155,13 @@ const tableColumns = computed(() => [
width: 100, width: 100,
align: 'center', align: 'center',
render: (item: StockingOrderProduct) => ( render: (item: StockingOrderProduct) => (
<ImageView src={item.warehouseSkuImage} width="50px" height="50px" /> <el-image
preview-teleported
src={item.warehouseSkuImage}
preview-src-list={[item.warehouseSkuImage]}
z-index={9999}
style="width: 60px;height: 60px;text-align: center;"
/>
), ),
}, },
{ {
......
...@@ -110,7 +110,6 @@ ...@@ -110,7 +110,6 @@
import { ref } from 'vue' import { ref } from 'vue'
import type { FormInstance, FormRules } from 'element-plus' import type { FormInstance, FormRules } from 'element-plus'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import ImageView from '@/components/ImageView.vue'
import { getUserListApi, LocationInfoGetAll } from '@/api/common' import { getUserListApi, LocationInfoGetAll } from '@/api/common'
import { loactionData } from '@/api/warehouse' import { loactionData } from '@/api/warehouse'
import { import {
...@@ -152,7 +151,13 @@ const tableColumns = ref([ ...@@ -152,7 +151,13 @@ const tableColumns = ref([
width: 90, width: 90,
align: 'center', align: 'center',
render: (row: StockingApplyOrderDetailList) => ( render: (row: StockingApplyOrderDetailList) => (
<ImageView src={row.warehouseSkuImage} width="50px" height="50px" /> <el-image
preview-teleported
src={row.warehouseSkuImage}
preview-src-list={[row.warehouseSkuImage]}
z-index={9999}
style="width: 60px;height: 60px;text-align: center;"
/>
), ),
}, },
{ {
...@@ -270,16 +275,20 @@ const loadDetailList = async (id: number) => { ...@@ -270,16 +275,20 @@ const loadDetailList = async (id: number) => {
} }
} }
locationList.value = locationRes.data || [] locationList.value = locationRes.data || []
if (locationList.value.length > 0) {
res.data.detailsList.forEach((item) => { res.data.detailsList.forEach((item) => {
if (!item.buyStored) {
item.buyStored = item.shipmentQuantity
}
if (locationList.value.length > 0) {
const location = locationList.value.find( const location = locationList.value.find(
(location) => location.warehouseSku === item.warehouseSku, (location) => location.warehouseSku === item.warehouseSku,
) )
if (location) { if (location) {
item.locationId = location.locationId item.locationId = location.locationId
} }
}) }
} })
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment