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