Commit 4127361d by wusiyi

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

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