Commit 4127361d by wusiyi

feat: 工厂订单new添加配货分拣功能 #1005762

parent 49475b2e
......@@ -713,7 +713,7 @@ export function updateConfighApi(data: { id: number; enable: boolean }) {
}
// 配货分拣 列表
export function getSortingRuleListApi(data: { warehouseId: number }) {
export function getSortingRuleListApi(data?: { warehouseId?: number }) {
return axios.post<never, BasePaginationData<SortingList>>(
'allocation-sorting-rule/list_page',
data,
......
......@@ -263,9 +263,10 @@ export function getPodBoxListApi(
url: string,
factoryNo: number | string | undefined,
warehouseId: number | string,
sortingAreaId?: number | string,
) {
return axios.get<never, BaseRespData<PodMakeOrderData[]>>(url, {
params: { factoryNo, warehouseId },
params: { factoryNo, warehouseId, packingId: sortingAreaId },
})
}
......@@ -276,9 +277,10 @@ export function submitInspectionApi(
},
boxIndex: number | null,
warehouseId: number | string,
sortingAreaId?: number | string,
) {
return axios.post<never, BaseRespData<never>>(
`${url}?box=${boxIndex}&warehouseId=${warehouseId}`,
`${url}?box=${boxIndex}&warehouseId=${warehouseId}&packingId=${sortingAreaId}`,
params,
)
}
......@@ -287,18 +289,20 @@ export function clearBoxApi(
factoryNo: number,
box: number | null,
warehouseId: number | string,
sortingAreaId?: number | string,
) {
return axios.get<never, BaseRespData<never>>(url, {
params: { factoryNo, box, warehouseId },
params: { factoryNo, box, warehouseId, packingId: sortingAreaId },
})
}
export function clearAllBoxApi(
url: string,
warehouseId: string | number,
factoryNo: string | number | undefined,
sortingAreaId?: number | string,
) {
return axios.get<never, BaseRespData<never>>(url, {
params: { warehouseId, factoryNo },
params: { warehouseId, factoryNo, packingId: sortingAreaId },
})
}
export function updateRemarkApi(id: number, content: string) {
......
......@@ -302,7 +302,7 @@ export interface SortingList {
areaCode: string
warehouseId: number
warehouseName: string
autoPrint: 0 | 1
autoPrint: boolean
}
// 配货分拣 详情
......
......@@ -4,6 +4,9 @@ export interface PodMakeOrderData {
fromUser?: number | string
box?: number
addDate?: string
packingId?: number | string
factoryNo?: number | string
autoPrint?: boolean
}
export interface OrderData {
......
......@@ -31,8 +31,11 @@
/>
<div class="text-xs">配货分拣</div>
<el-divider direction="vertical" />
<div v-if="!isEnableSorting">关闭时,直接使用配货打单功能配货</div>
<div v-else>
<div v-if="!isEnableSorting" class="info">
关闭时,直接使用配货打单功能配货
</div>
<div v-else class="info">
开启时,支持设置分拣规则,根据分拣规则分配配货区,使用配货分拣功能配货。
</div>
</div>
......@@ -296,6 +299,10 @@ onMounted(async () => {
font-size: 14px;
color: #555;
font-weight: 500;
.info {
font-size: 12px;
color: #999;
}
}
.sorting-content {
......
......@@ -581,7 +581,7 @@
>
</span>
<span v-if="status === 'IN_PRODUCTION' && isEnableSorting" class="item">
<ElButton type="primary" @click="handleSeedingWall"
<ElButton type="primary" @click="handleSeedingWall('sort')"
>配货分拣</ElButton
>
</span>
......@@ -592,7 +592,7 @@
"
class="item"
>
<ElButton type="success" @click="handleSeedingWall"
<ElButton type="success" @click="handleSeedingWall('print')"
>配货打单</ElButton
>
</span>
......@@ -1050,9 +1050,15 @@
v-model="podOrderVisible"
:print-order="printOrder"
:warehouse-list="warehouseList"
:title="wallType === 'print' ? '配货打单' : '配货分拣'"
:is-new-order="true"
ws-open-code="STARTORDERNEWPOD"
ws-close-code="ENDORDERNEWPOD"
:wall-type="wallType"
:ws-open-code="
wallType === 'print' ? 'STARTORDERNEWPOD' : 'STARTORDERNEWPODTOP'
"
:ws-close-code="
wallType === 'print' ? 'ENDORDERNEWPOD' : 'ENDORDERNEWPODTOP'
"
init-url="factory/podOrderPacking/local/getPodBoxOrderDetails"
@set-printer="handlePrinterChange"
@set-warehouse-id="handleWarehouseIdChange"
......@@ -2533,8 +2539,16 @@ const handlePrinterChange = (value: string) => {
sheetPrinter.value = value
localStorage.setItem('sheetPrinter', JSON.stringify(value))
}
const handleWarehouseIdChange = (value: string) => {
localStorage.setItem('localNewWarehouseId', JSON.stringify(value))
const handleWarehouseIdChange = (
value:
| string
| { warehouseId: string | number; sortingAreaId: string | number },
) => {
if (wallType.value === 'print') {
localStorage.setItem('localNewWarehouseId', JSON.stringify(value))
} else if (wallType.value === 'sort') {
localStorage.setItem('localSortingAreaId', JSON.stringify(value))
}
}
const mapOrderParamListToSubmitItems = (
orderParamList: { id: number; dataVersion?: number }[],
......@@ -2555,7 +2569,9 @@ const getPrintLogisticLabelFactory = (id?: number) =>
getfaceSimplexFileApi([id ?? 0])
const { getCLodop } = useLodop()
const handleSeedingWall = () => {
const wallType = ref<'print' | 'sort'>('print')
const handleSeedingWall = (type: 'print' | 'sort') => {
wallType.value = type
const lodop = getCLodop(null, null)
if (!lodop) return
sheetPrinter.value = lodop.GET_PRINTER_NAME(0)
......
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