Commit 3269bc05 by qinjianhui

Merge branch 'dev' into 'master'

Dev

See merge request !238
parents 2575a787 fee6d6cc
......@@ -537,10 +537,14 @@ export function completeDeliveryApi(ids: (number | string)[]) {
}
// 生产扫码
export function productionScanApi(id: number | string, status: string) {
export function productionScanApi(
id: number | string,
status: string,
type: string,
) {
return axios.get<never, BaseRespData<never>>(
'factory/podOrderOperation/scan-produce',
{ params: { id, status } },
{ params: { id, status, type } },
)
}
......@@ -655,7 +659,7 @@ export function interceptUpdateApi(ids: (string | number)[]) {
}
export function interceptSuccessApi(
data: { factoryOrderNumber: string; suspendSussessType: number }[],
data: { factoryOrderNumber: string; blockSuccessType: number }[],
) {
return axios.post<never, BaseRespData<ResultInfoDataItem[]>>(
'factory/podOrder/factoryOrderBlockSuccess',
......@@ -680,3 +684,11 @@ export function exportOrderInventoryApi(data: Record<string, unknown>) {
data,
)
}
// 配货完成 按钮
export function deliveryCompleteApi(data: { id: number; version?: number }[]) {
return axios.post<never, BaseRespData<ResultInfoDataItem[]>>(
'factory/podOrder/podPrintOrderShipmentComplete',
{ orderParamList: data },
)
}
......@@ -4,8 +4,8 @@
class="right-click-menu"
:style="{ left: position.x + 'px', top: position.y + 'px' }"
>
<div class="menu-item" @click="onChangeCopy('select-all')">全部选择</div>
<div class="menu-item" @click="onChangeCopy('cancel-select')">取消选择</div>
<div v-if="showSelectionMenu" class="menu-item" @click="onChangeCopy('select-all')">全部选择</div>
<div v-if="showSelectionMenu" class="menu-item" @click="onChangeCopy('cancel-select')">取消选择</div>
<div
v-if="showCopySubShopNumber"
class="menu-item"
......@@ -48,6 +48,10 @@ defineProps({
type: Boolean,
default: true,
},
showSelectionMenu: {
type: Boolean,
default: true,
},
})
const setPosition = ({ x, y }: { x: number; y: number }) => {
......
......@@ -46,6 +46,7 @@ export interface SearchForm {
prop?: string
/** list_page 排序方向:asc 正序,desc 倒序 */
order?: 'asc' | 'desc'
customerNo?: string // 客户交运单号
}
export interface FactoryOrderNewListData {
......
......@@ -49,6 +49,7 @@ export interface SearchForm {
prop?: string
/** list_page 排序方向:asc 正序,desc 倒序 */
order?: 'asc' | 'desc'
customerNo?: string // 客户交运单号
}
export interface FactoryOrderNewListData {
......
......@@ -63,7 +63,8 @@ export interface InterWarehousePage extends InterWarehouseBase { }
export interface InterWarehouseDetail extends InterWarehouseBase {
currencyName?:string
currencyCode?:string
productList: InterProductList[]
productList: InterProductList[],
outRecordType?: string
}
export interface ExportInWarehouseInfo extends warehouseSearchForm {
total?: number
......@@ -125,6 +126,7 @@ export interface InterskuList {
currencyCode?: string | null
buyStored?: number | null
totalPrice?: number | null
inventory?: number | null
}
export interface ILocation {
id?: number
......
......@@ -22,6 +22,9 @@
/>
</ElSelect>
</ElFormItem>
<div style="color: #f56c6c; margin-left: 100px; margin-top: -10px">
注意: 取消订单后金额将原路返回
</div>
</ElForm>
<template #footer>
<div class="dialog-footer" style="text-align: center">
......
......@@ -52,13 +52,13 @@
>
<ElTableColumn
type="selection"
width="70"
width="50"
header-align="center"
align="center"
></ElTableColumn>
<ElTableColumn
show-overflow-tooltip
width="60"
width="50"
align="center"
label="序号"
type="index"
......@@ -78,11 +78,13 @@
show-overflow-tooltip
align="center"
label="库存SKU"
width="160"
prop="warehouseSku"
/>
<ElTableColumn
show-overflow-tooltip
align="center"
align="left"
header-align="center"
label="商品名称"
prop="skuName"
/>
......@@ -90,20 +92,35 @@
show-overflow-tooltip
align="center"
label="款号"
width="90"
prop="productNo"
/>
<ElTableColumn
show-overflow-tooltip
align="center"
align="right"
width="110"
header-align="center"
label="可用库存数量"
prop="usableInventory"
/>
<ElTableColumn align="center" label="出库数量" prop="outCount">
<ElTableColumn
show-overflow-tooltip
align="right"
header-align="center"
label="库存数量"
prop="inventory"
/>
<ElTableColumn
header-align="center"
align="right"
label="出库数量"
prop="outCount"
width="100"
>
<template #default="{ row }">
<el-input
v-model.number="row.outCount"
placeholder="出库数量"
style="width: 120px"
clearable
size="small"
@input="setCostPrice(row)"
......@@ -117,14 +134,16 @@
prop="currencyName"
/>
<ElTableColumn
width="100"
align="center"
width="80"
align="right"
label="成本价"
header-align="center"
prop="costPrice"
/>
<ElTableColumn
align="center"
width="100"
align="right"
width="80"
header-align="center"
label="总成本"
prop="totalPrice"
/>
......@@ -153,12 +172,13 @@
show-overflow-tooltip
align="center"
label="所属客户"
width="100"
prop="userMark"
/>
<ElTableColumn
show-overflow-tooltip
align="center"
width="240"
width="120"
label="备注"
prop="remark"
>
......@@ -338,6 +358,7 @@ const addOtherCurrency = async () => {
const params: InterWarehouseDetail = {
...editForm.value,
productList: otherPurchaseData.value,
outRecordType: 'picking_replenish',
}
try {
await addOutRecordApi(params)
......@@ -425,6 +446,7 @@ const open = async (params: OpenParams) => {
usableInventory: skuItem.usableInventory,
inventoryId: skuItem.id,
remark: skuItem.remark ?? null,
inventory: skuItem.inventory,
} as InterProductList
})
......
......@@ -192,7 +192,7 @@ const handleRestockCheck = async (row: RestockData) => {
}
try {
const res = await restockCheckApi(
row.id,
row.factoryId,
row.warehouseSku ?? '',
row.warehouseId,
)
......
......@@ -8,6 +8,7 @@ export const FACTORY_ORDER_LIST_SEARCH_FIELD_RULES: Record<
operationNo: (c) => c.isCardLayout,
receiverCountry: (c) => !c.isCardLayout,
logisticsWayId: (c) => c.status === 'ALL',
customerNo: (c) => c.status === 'ALL',
}
export function filterFactoryOrderListSearchPayload(
......
......@@ -1540,10 +1540,6 @@ const getSortingAreaList = async () => {
sortingAreaId.value = defaultArea.id
warehouseId.value = defaultArea.warehouseId
isAutoPrint.value = defaultArea.autoPrint || false
emit('set-warehouseId', {
warehouseId: warehouseId.value,
sortingAreaId: sortingAreaId.value,
})
}
</script>
......
......@@ -30,7 +30,7 @@
<splitDiv size="50">
<template #top>
<div class="header-filter-form">
<ElForm :model="searchForm" inline ref="searchFormRef">
<ElForm ref="searchFormRef" :model="searchForm" inline>
<ElFormItem label="仓库">
<ElSelect
v-model="searchForm.warehouseId"
......@@ -96,7 +96,7 @@
/>
</ElFormItem>
<ElFormItem>
<ElButton type="primary" @click="search" ref="searchBtnRef"
<ElButton ref="searchBtnRef" type="primary" @click="search"
>查询</ElButton
>
</ElFormItem>
......@@ -511,13 +511,13 @@
>
<ElTableColumn
type="selection"
width="70"
width="50"
header-align="center"
align="center"
></ElTableColumn>
<ElTableColumn
show-overflow-tooltip
width="60"
width="50"
align="center"
label="序号"
type="index"
......@@ -537,12 +537,14 @@
show-overflow-tooltip
align="center"
label="库存SKU"
width="160"
prop="warehouseSku"
/>
<ElTableColumn
show-overflow-tooltip
align="center"
align="left"
header-align="center"
label="商品名称"
prop="skuName"
/>
......@@ -550,20 +552,36 @@
show-overflow-tooltip
align="center"
label="款号"
width="90"
prop="productNo"
/>
<ElTableColumn
show-overflow-tooltip
align="center"
align="right"
header-align="center"
label="库存数量"
width="90"
prop="inventory"
/>
<ElTableColumn
show-overflow-tooltip
align="right"
header-align="center"
label="可用库存数量"
prop="usableInventory"
width="110"
/>
<ElTableColumn align="center" label="出库数量" prop="outCount">
<ElTableColumn
align="right"
header-align="center"
label="出库数量"
width="90"
prop="outCount"
>
<template #default="{ row }">
<el-input
v-model.number="row.outCount"
placeholder="出库数量"
style="width: 120px"
clearable
size="small"
@input="setCostPrice(row)"
......@@ -577,18 +595,25 @@
prop="currencyName"
/>
<ElTableColumn
width="100"
align="center"
width="80"
align="right"
header-align="center"
label="成本价"
prop="costPrice"
/>
<ElTableColumn
align="center"
width="100"
align="right"
header-align="center"
width="80"
label="总成本"
prop="totalPrice"
/>
<ElTableColumn align="center" label="库位" prop="locationCode">
<ElTableColumn
width="90"
align="center"
label="库位"
prop="locationCode"
>
<template #default="{ row }">
<span v-if="row.locationCode">{{ row.locationCode }}</span>
<ElSelect
......@@ -596,7 +621,6 @@
v-model="row.locationId"
clearable
placeholder="请输入库位"
style="width: 120px"
filterable
@change="handleLocationChange(row.locationId, row)"
>
......@@ -611,14 +635,16 @@
</ElTableColumn>
<ElTableColumn
show-overflow-tooltip
header-align="center"
align="center"
width="100"
label="所属客户"
prop="userMark"
/>
<ElTableColumn
show-overflow-tooltip
align="center"
width="240"
width="120"
label="备注"
prop="remark"
>
......@@ -1304,6 +1330,7 @@ const handleLocalImport = async ({
usableInventory: skuItem.usableInventory,
inventoryId: skuItem.id,
remark: importedItem?.remark ?? skuItem.remark ?? null,
inventory: skuItem.inventory,
} as InterProductList
})
......@@ -1421,6 +1448,7 @@ const skudblclick = (val: InterskuList) => {
image = '',
locationId = null,
usableInventory = null,
inventory = null,
id = null,
currencyName = '',
currencyCode = '',
......@@ -1453,9 +1481,10 @@ const skudblclick = (val: InterskuList) => {
totalPrice: null,
usableInventory, //可用库存数量
inventoryId: id,
inventory: inventory,
currencyName,
currencyCode,
},
} as InterProductList,
]
// 使用filter代替forEach+splice,时间复杂度从O(n^2)降到O(n)
const skuSet = new Set(
......@@ -1532,11 +1561,25 @@ const getProduct = async (id: number | undefined) => {
const productList = res.data?.productList
const newProductList = (Array.isArray(productList) ? productList : []).map(
(item: InterProductList) => {
const { inventory, ...rest } = item
return {
...rest,
usableInventory: inventory?.usableInventory ?? null,
const inventoryData = item.inventory as
| { inventory?: number; usableInventory?: number }
| number
| null
| undefined
if (
inventoryData !== null &&
inventoryData !== undefined &&
typeof inventoryData === 'object'
) {
const { ...rest } = item
return {
...rest,
inventory: inventoryData.inventory ?? null,
usableInventory:
inventoryData.usableInventory ?? rest.usableInventory ?? null,
} as InterProductList
}
return item
},
)
if (res.data) {
......@@ -1795,6 +1838,7 @@ const submitPurchase = async () => {
outCount: null,
totalPrice: null,
usableInventory: skuItem.usableInventory,
inventory: skuItem.inventory,
inventoryId: skuItem.id,
remark: null,
} as InterProductList
......
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