Commit 1bdbbed5 by linjinhong
parents b4150a0e 7ea45907
...@@ -54,7 +54,6 @@ declare module 'vue' { ...@@ -54,7 +54,6 @@ declare module 'vue' {
ElTag: typeof import('element-plus/es')['ElTag'] ElTag: typeof import('element-plus/es')['ElTag']
ElTimeline: typeof import('element-plus/es')['ElTimeline'] ElTimeline: typeof import('element-plus/es')['ElTimeline']
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem'] ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
ElTimePicker: typeof import('element-plus/es')['ElTimePicker']
ElTooltip: typeof import('element-plus/es')['ElTooltip'] ElTooltip: typeof import('element-plus/es')['ElTooltip']
ElTree: typeof import('element-plus/es')['ElTree'] ElTree: typeof import('element-plus/es')['ElTree']
ElUpload: typeof import('element-plus/es')['ElUpload'] ElUpload: typeof import('element-plus/es')['ElUpload']
......
...@@ -16,6 +16,7 @@ import { ...@@ -16,6 +16,7 @@ import {
} from '@/types/api/podUsOrder' } from '@/types/api/podUsOrder'
import axios from './axios' import axios from './axios'
import { PodMakeOrderData, OrderData } from '@/types/api/podMakeOrder' import { PodMakeOrderData, OrderData } from '@/types/api/podMakeOrder'
import { PrintData } from '@/types/api/podOrder.ts'
export function exportPodCnInfo(data: ExportParams) { export function exportPodCnInfo(data: ExportParams) {
return axios.post<never, BasePaginationData<never>>( return axios.post<never, BasePaginationData<never>>(
'factory/podJomallOrderCn/exportPodCnOrder', 'factory/podJomallOrderCn/exportPodCnOrder',
...@@ -145,6 +146,25 @@ export function getCardOrderList( ...@@ -145,6 +146,25 @@ export function getCardOrderList(
}, },
) )
} }
export function batchCheckPrintPodCn(
ids:string
) {
return axios.get<never, BaseRespData<PrintData[]>>(
`/factory/podJomallOrderCn/batchCheckPrintPodCn?ids=${ids}`,
)
}
export function batchCheckPrintPodUs(
ids:string
) {
return axios.get<never, BaseRespData<PrintData[]>>(
`/factory/podJomallOrderUs/batchCheckPrintPodUs?ids=${ids}`,
)
}
export function confirmOrderApi( export function confirmOrderApi(
data: number[], data: number[],
productionClient: string, productionClient: string,
......
...@@ -716,4 +716,4 @@ export function printBarcodeApi(data: { id: number, dataVersion: number }[]) { ...@@ -716,4 +716,4 @@ export function printBarcodeApi(data: { id: number, dataVersion: number }[]) {
'factoryStockingPlanRecord/print_barcode', 'factoryStockingPlanRecord/print_barcode',
data, data,
) )
} }
\ No newline at end of file
...@@ -3,7 +3,15 @@ export interface Tab { ...@@ -3,7 +3,15 @@ export interface Tab {
statusName?: string statusName?: string
quantity?: number quantity?: number
} }
export interface PrintData{
locationName: string
pickingLocation?: string
skuName?: string
warehouseSku?: string
supplierItemNo?: string
number?: string
}
export interface SearchForm { export interface SearchForm {
status?: string | null status?: string | null
factorySubOrderNumber?: string factorySubOrderNumber?: string
......
...@@ -48,6 +48,7 @@ export interface SearchForm { ...@@ -48,6 +48,7 @@ export interface SearchForm {
export interface PodUsOrderListData { export interface PodUsOrderListData {
id: number id: number
thirdOrderNumber?: string thirdOrderNumber?: string
batchArrangeNumber?: string
prnUrl?: string prnUrl?: string
factoryOrderNumber?: string factoryOrderNumber?: string
prnDownloadStatus?: boolean prnDownloadStatus?: boolean
......
<script setup lang="ts">
import { batchCheckPrintPodCn, batchCheckPrintPodUs } from '@/api/podCnOrder.ts'
import { InterWarehousePage } from '@/types/api/warehouse.ts'
import { ElMessage } from 'element-plus'
import { factoryWarehouseInventoryPrint } from '@/api/warehouse.ts'
import { filePath } from '@/api/axios.ts'
import { PrintData } from '@/types/api/podOrder.ts'
const showPrintDialog = ref(false)
const printData = ref<PrintData[]>([])
const open = async (type: number,ids:string) => {
let res
printData.value = []
if (type === 1) {
res = await batchCheckPrintPodCn(ids)
}else{
res= await batchCheckPrintPodUs(ids)
}
showPrintDialog.value = true
printData.value = res.data
}
async function handlePrintProductTag() {
const flag = printData.value.every(
(el: InterWarehousePage) => el.number && el.number != '0',
)
if (!flag) {
return ElMessage.warning('打印数量需大于0')
}
const list = printData.value.map(
({
skuName = '',
warehouseSku = '',
supplierItemNo = '',
number = '',
locationName = '',
}) => ({
skuName,
warehouseSku,
supplierItemNo,
number,
locationName,
}),
)
const res = await factoryWarehouseInventoryPrint({
list,
code: 'PT002',
})
showPrintDialog.value = false
window.open(filePath + res.message, '_blank')
}
defineExpose({open})
</script>
<template>
<el-dialog v-model="showPrintDialog" title="打印参数设置">
<el-table height="400px" :data="printData" border>
<el-table-column width="60" align="center" type="index" label="序号" />
<el-table-column align="center" prop="skuName" label="商品名称" />
<el-table-column align="center" prop="warehouseSku" label="库存SKU" />
<el-table-column align="center" prop="locationName" label="库位编码" />
<el-table-column align="center" prop="supplierItemNo" label="款号" />
<el-table-column align="center" prop="number" label="打印数量">
<template #default="{ row }">
<el-input
v-model.number="row.number"
oninput="value=value.replace(/[^\-?\d.]/g,'')"
placeholder="打印数量"
clearable
></el-input>
</template>
</el-table-column>
</el-table>
<template #footer>
<el-button @click="showPrintDialog = false">取消</el-button>
<el-button type="primary" @click="handlePrintProductTag">打印</el-button>
</template>
</el-dialog>
</template>
<style scoped lang="scss">
</style>
...@@ -804,6 +804,11 @@ ...@@ -804,6 +804,11 @@
>批量删除</ElButton >批量删除</ElButton
> >
</span> </span>
<span v-if="status === 'WAIT_SHIPMENT'" class="item">
<ElButton type="warning" @click="showPrintSku"
>打印库存sku标签</ElButton
>
</span>
</ElFormItem> </ElFormItem>
</ElForm> </ElForm>
</div> </div>
...@@ -2542,10 +2547,12 @@ ...@@ -2542,10 +2547,12 @@
} }
" "
></ChangeWayDialog> ></ChangeWayDialog>
<print-warehouse-sku-tag ref="printWarehouseSkuDialogRef" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { getUserMarkList } from '@/api/common' import { getUserMarkList } from '@/api/common'
import LogisticsWaySelect from '../../logistics/components/LogisticsWaySelect.tsx' import LogisticsWaySelect from '../../logistics/components/LogisticsWaySelect.tsx'
import PrintWarehouseSkuTag from '../components/printWarehouseSkuTag.vue'
// import { AnyObject } from '@/types/api/warehouse' // import { AnyObject } from '@/types/api/warehouse'
import { import {
InfoFilled, InfoFilled,
...@@ -2680,6 +2687,7 @@ const isSuperFactory: boolean = userStore.user?.factory.dropShipping || false ...@@ -2680,6 +2687,7 @@ const isSuperFactory: boolean = userStore.user?.factory.dropShipping || false
const tabsNav = ref<Tab[]>() const tabsNav = ref<Tab[]>()
const isAuto = ref(true) const isAuto = ref(true)
const printWarehouseSkuDialogRef = ref()
const calculatedPrice = (item: ProductList) => { const calculatedPrice = (item: ProductList) => {
const templatePrice = new BigNumber(item.templatePrice || 0) const templatePrice = new BigNumber(item.templatePrice || 0)
...@@ -2971,6 +2979,15 @@ const changeExceptionOrder = async () => { ...@@ -2971,6 +2979,15 @@ const changeExceptionOrder = async () => {
currentOrderIds.value = selection.value.map((item) => item.id) currentOrderIds.value = selection.value.map((item) => item.id)
exceptionDialogVisible.value = true exceptionDialogVisible.value = true
} }
const showPrintSku = async () => {
if(!selection.value.length) {
return ElMessage.warning('请选择数据')
}
await printWarehouseSkuDialogRef.value?.open(1,selection.value.map((item) => item.id).join(','))
}
const handleExceptionConfirm = async () => { const handleExceptionConfirm = async () => {
try { try {
await exceptionFormRef.value.validate() await exceptionFormRef.value.validate()
......
...@@ -835,6 +835,15 @@ ...@@ -835,6 +835,15 @@
<ElButton type="success" @click="reissueOrder">补发</ElButton> <ElButton type="success" @click="reissueOrder">补发</ElButton>
</span> </span>
</ElFormItem> </ElFormItem>
<ElFormItem v-if="status === 'WAIT_SHIPMENT'">
<span class="item">
<ElButton type="warning" @click="showPrintSku"
>打印库存sku标签</ElButton
>
</span>
</ElFormItem>
</ElForm> </ElForm>
</div> </div>
<div class="header-filter-tab"> <div class="header-filter-tab">
...@@ -1761,17 +1770,30 @@ ...@@ -1761,17 +1770,30 @@
{{ row.automaticComposing ? '是' : '否' }} {{ row.automaticComposing ? '是' : '否' }}
</div> </div>
</template> </template>
<template #prn="{ row }"> <template #composingParam="{ row }">
<div style="display: flex"> <div style="white-space: pre-line">
<span :title="fileName(row)" class="flex-1">{{ {{ row.composingParam?.split(';').join('\n') }}
fileName(row) </div>
}}</span> </template>
<template #failTime="{ row }">
<div style="white-space: pre-line">
{{ row.failTime?.replace('T', ' ') }}
</div>
</template>
<template #failReason="{ row }">
<span style="white-space: pre-line" v-html="row.failReason"></span>
</template>
<template #operate="{ row }">
<div
v-if="status === 'BATCH_DOWNLOAD'"
class="operate-box-vertical"
>
<el-link <el-link
:disabled="row.isUpload" :disabled="row.isUpload"
underline="never" underline="never"
type="success" type="success"
@click="uploadFile(row)" @click="uploadFile(row)"
>上传</el-link >上传PRN</el-link
> >
<el-icon <el-icon
v-if="row.isUpload" v-if="row.isUpload"
...@@ -1784,50 +1806,19 @@ ...@@ -1784,50 +1806,19 @@
:disabled="!row.prnUrl" :disabled="!row.prnUrl"
style="margin-left: 8px" style="margin-left: 8px"
underline="never" underline="never"
type="primary" :title="fileName(row)"
type="success"
@click="downloadRowProFile(row)" @click="downloadRowProFile(row)"
>下载 >下载PRN
</el-link> </el-link>
<el-icon <el-icon
v-if="row.prnDownloadStatus" v-if="row.prnDownloadStatus"
style="right: -2px" class="download-icon"
class="check-icon" style="position:relative;right: 7px"
> >
<CircleCheckFilled /> <CircleCheckFilled />
</el-icon> </el-icon>
</div>
</template>
<template #composingParam="{ row }">
<div style="white-space: pre-line">
{{ row.composingParam?.split(';').join('\n') }}
</div>
</template>
<template #failTime="{ row }">
<div style="white-space: pre-line">
{{ row.failTime?.replace('T', ' ') }}
</div>
</template>
<template #failReason="{ row }">
<span style="white-space: pre-line" v-html="row.failReason"></span>
</template>
<template #operate="{ row }">
<div
v-if="status === 'BATCH_DOWNLOAD'"
class="operate-box-vertical"
>
<span class="operate-item">
<ElButton
:disabled="!row.url && !row.tiffUrl"
link
type="primary"
@click="handleDownload(row)"
>
下载
</ElButton>
<el-icon v-if="row.downloadStatus" class="check-icon"
><CircleCheckFilled
/></el-icon>
</span>
<!-- <span class="operate-item"> <!-- <span class="operate-item">
<ElButton <ElButton
:disabled="!row.tiffUrl" :disabled="!row.tiffUrl"
...@@ -1865,24 +1856,29 @@ ...@@ -1865,24 +1856,29 @@
/></el-icon> /></el-icon>
</span> </span>
<span class="operate-item"> <span class="operate-item">
<ElButton <ElButton
:disabled="row.productNum > 50" :disabled="!row.url && !row.tiffUrl"
link link
title="重新排版" type="primary"
type="warning" @click="handleDownload(row)"
:loading="reComposingLoadingMap[row.id]"
@click="showArrange(1, row)"
> >
重排 下载素材
</ElButton> </ElButton>
<el-icon v-if="row.downloadStatus" class="download-icon"
><CircleCheckFilled
/></el-icon>
</span> </span>
<span class="operate-item"> <span class="operate-item">
<ElButton <ElButton
:disabled="row.productNum > 50"
link link
type="danger" title="重新排版"
@click="handleBatchDelete('single', row.id)" type="warning"
:loading="reComposingLoadingMap[row.id]"
@click="showArrange(1, row)"
> >
删除 重排
</ElButton> </ElButton>
</span> </span>
</div> </div>
...@@ -2905,6 +2901,7 @@ ...@@ -2905,6 +2901,7 @@
<ElButton type="primary" @click="confirmReplenishment">确定</ElButton> <ElButton type="primary" @click="confirmReplenishment">确定</ElButton>
</template> </template>
</ElDialog> </ElDialog>
<print-warehouse-sku-tag ref="printWarehouseSkuDialogRef" />
<ReissueOrderComponent <ReissueOrderComponent
ref="reissueOrderRef" ref="reissueOrderRef"
:selection="selection" :selection="selection"
...@@ -3031,7 +3028,7 @@ import { ...@@ -3031,7 +3028,7 @@ import {
Loading, Loading,
CircleCheckFilled, CircleCheckFilled,
} from '@element-plus/icons-vue' } from '@element-plus/icons-vue'
import { Column, ElFormItem } from 'element-plus' import { Column, ElFormItem, ElMessage } from 'element-plus'
import { computed, onMounted, ref, nextTick, reactive } from 'vue' import { computed, onMounted, ref, nextTick, reactive } from 'vue'
import FastProduction from './FastProduction.vue' import FastProduction from './FastProduction.vue'
import { filePath } from '@/api/axios' import { filePath } from '@/api/axios'
...@@ -3055,6 +3052,7 @@ import { ...@@ -3055,6 +3052,7 @@ import {
type NavigationGuardNext, type NavigationGuardNext,
type RouteLocationNormalized, type RouteLocationNormalized,
} from 'vue-router' } from 'vue-router'
import PrintWarehouseSkuTag from '@/views/order/components/printWarehouseSkuTag.vue'
declare global { declare global {
interface Window { interface Window {
...@@ -3088,6 +3086,7 @@ const sourceList = [ ...@@ -3088,6 +3086,7 @@ const sourceList = [
const sizes = ['FS', 'XS', 'S', 'M', 'L', 'XL', 'XXL', '3XL', '4XL', '5XL'] const sizes = ['FS', 'XS', 'S', 'M', 'L', 'XL', 'XXL', '3XL', '4XL', '5XL']
const tabsNav = ref<Tab[]>() const tabsNav = ref<Tab[]>()
const reissueOrderRef = ref() const reissueOrderRef = ref()
const printWarehouseSkuDialogRef = ref()
const isAuto = ref(true) const isAuto = ref(true)
const countryList = ref([]) const countryList = ref([])
const logisticsWayList = ref<{ name: string; id: number }[]>([]) const logisticsWayList = ref<{ name: string; id: number }[]>([])
...@@ -3137,6 +3136,14 @@ const updateTrackingNumber = async (row: PodUsOrderListData) => { ...@@ -3137,6 +3136,14 @@ const updateTrackingNumber = async (row: PodUsOrderListData) => {
} }
} }
const showPrintSku = async () => {
if(!selection.value.length) {
return ElMessage.warning('请选择数据')
}
await printWarehouseSkuDialogRef.value?.open(2,selection.value.map((item) => item.id).join(','))
}
const exportData = () => { const exportData = () => {
exportVisible.value = true exportVisible.value = true
} }
...@@ -3564,13 +3571,7 @@ const tableColumns = computed(() => { ...@@ -3564,13 +3571,7 @@ const tableColumns = computed(() => {
prop: 'employeeAccount', prop: 'employeeAccount',
align: 'center', align: 'center',
}, },
{
label: '失败原因',
minWidth: 250,
prop: 'failReason',
slot: 'failReason',
align: 'left',
},
{ {
label: '创建时间', label: '创建时间',
width: 180, width: 180,
...@@ -3593,11 +3594,11 @@ const tableColumns = computed(() => { ...@@ -3593,11 +3594,11 @@ const tableColumns = computed(() => {
align: 'center', align: 'center',
}, },
{ {
label: 'PRN文件', label: '失败原因',
width: 300, minWidth: 250,
prop: 'automaticComposing', prop: 'failReason',
slot: 'prn', slot: 'failReason',
align: 'right', align: 'left',
}, },
{ {
label: '排版参数', label: '排版参数',
...@@ -3609,7 +3610,7 @@ const tableColumns = computed(() => { ...@@ -3609,7 +3610,7 @@ const tableColumns = computed(() => {
{ {
label: '操作', label: '操作',
slot: 'operate', slot: 'operate',
width: 300, width: 400,
align: 'center', align: 'center',
fixed: 'right', fixed: 'right',
prop: 'operate', prop: 'operate',
...@@ -4207,19 +4208,25 @@ const uploadFile = (row: PodUsOrderListData) => { ...@@ -4207,19 +4208,25 @@ const uploadFile = (row: PodUsOrderListData) => {
input.type = 'file' input.type = 'file'
input.multiple = false input.multiple = false
input?.click() input?.click()
row.isUpload = true
input.onchange = async function () { input.onchange = async function () {
try { try {
if (input.files && input.files.length) { if (input.files && input.files.length) {
if(!input.files[0].name.startsWith(row.batchArrangeNumber || '')) {
await ElMessageBox.confirm(`文件名不是以批次号开头是否继续上传?`, '提示', {
confirmButtonText: '确定',
type: 'warning',
})
}
row.isUpload = true
uploadList.value.push(row) uploadList.value.push(row)
const fm = new FormData() const fm = new FormData()
fm.append('file', input.files?.[0]) fm.append('file', (input.files as never)?.[0])
row.fileName = input.files?.[0]?.name row.fileName = input.files?.[0]?.name
// console.log(4219, input.files?.[0]) // console.log(4219, input.files?.[0])
const res = await uploadPRNFile(row.id, fm) const res = await uploadPRNFile(row.id, fm as never)
row.prnUrl = res.message row.prnUrl = res.message
} }
} finally { } finally {
...@@ -6942,7 +6949,9 @@ const printNormal = async () => { ...@@ -6942,7 +6949,9 @@ const printNormal = async () => {
.operate-item { .operate-item {
position: relative; position: relative;
} }
.download-icon{
color: var(--el-color-success);
}
.check-icon { .check-icon {
color: var(--el-color-success); color: var(--el-color-success);
position: absolute; position: absolute;
......
...@@ -236,6 +236,7 @@ const { ...@@ -236,6 +236,7 @@ const {
}) })
const dialogVisible = ref(false) const dialogVisible = ref(false)
const editLoading = ref(false) const editLoading = ref(false)
const goodsTableData = ref([]) const goodsTableData = ref([])
const supplierTableData = ref<IgoodsType[]>([]) const supplierTableData = ref<IgoodsType[]>([])
...@@ -899,11 +900,11 @@ async function addPice(product: IgoodsType) { ...@@ -899,11 +900,11 @@ async function addPice(product: IgoodsType) {
const tempArr = product.supplierPriceItemList || product.customProductItemList const tempArr = product.supplierPriceItemList || product.customProductItemList
pricetableData.value = cloneDeep( pricetableData.value = cloneDeep(
tempArr?.map((el) => { tempArr?.map((el) => {
if (!el.productItemId) el.productItemId = el.id || ''
return { return {
...el, ...el,
productItemImage: el.productItemImage || el.image, productItemImage: el.productItemImage || el.image,
productItemSku: el.productItemSku || el.sku, productItemSku: el.productItemSku || el.sku,
productItemId: el.id || '',
} }
}) || [], }) || [],
) )
......
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