Commit 3172ddf9 by wusiyi
parents 483a8e61 f7da650f
...@@ -148,7 +148,7 @@ export function getUniuniList() { ...@@ -148,7 +148,7 @@ export function getUniuniList() {
} }
// 获取tictok物流承运商 // 获取tictok物流承运商
export function getTiktokCarrier() { export function getTiktokCarrier() {
return axios.get<never, BaseRespData<{ name: string; id: number }[]>>( return axios.get<never, BaseRespData<{ name: string; id: string,typeCode:string,label:string }[]>>(
'logisticsWay/getTiktokShippingProvider', 'logisticsWay/getTiktokShippingProvider',
) )
} }
......
...@@ -586,6 +586,10 @@ export function getAccountCodeByFactoryIdApi(params: { token: string }) { ...@@ -586,6 +586,10 @@ export function getAccountCodeByFactoryIdApi(params: { token: string }) {
params, params,
}) })
} }
export function getLogisticsWayApi() {
return axios.get(`logisticsWay/usableAllList`)
}
// 打印拣货单item // 打印拣货单item
export function printPickPdfByBatchNumberApi(params: { export function printPickPdfByBatchNumberApi(params: {
batchArrangeNumber: string batchArrangeNumber: string
......
...@@ -44,6 +44,7 @@ export interface SearchForm { ...@@ -44,6 +44,7 @@ export interface SearchForm {
interceptStatus?: number | string interceptStatus?: number | string
sizeType?: number | null sizeType?: number | null
tagsId?: string tagsId?: string
source?: string
tagsIdArr?: (number | null)[] tagsIdArr?: (number | null)[]
} }
export interface PodCnOrderListData { export interface PodCnOrderListData {
...@@ -222,9 +223,9 @@ export interface CraftListData { ...@@ -222,9 +223,9 @@ export interface CraftListData {
craftCode: string craftCode: string
} }
export interface PackingData { export interface PackingData {
podProductionNo?: string; // 生产单号(PSCD 开头) podProductionNo?: string // 生产单号(PSCD 开头)
jomallCustomNo?: string; // 一件定制号(16 位数字 或 S- 开头) jomallCustomNo?: string // 一件定制号(16 位数字 或 S- 开头)
jomallPsdCustomNo?: string; // 满印定制号(JMSC/GCSC 开头) jomallPsdCustomNo?: string // 满印定制号(JMSC/GCSC 开头)
podJomallNo?: string; // POD 平台号(JMPSC/GCPS 经过正则提取) podJomallNo?: string // POD 平台号(JMPSC/GCPS 经过正则提取)
sku?: string; // 普通 SKU(兜底) sku?: string // 普通 SKU(兜底)
} }
\ No newline at end of file
...@@ -12,6 +12,8 @@ export interface ExportParams extends SearchForm { ...@@ -12,6 +12,8 @@ export interface ExportParams extends SearchForm {
export interface SearchForm { export interface SearchForm {
timeType?: number | null timeType?: number | null
shopNumber?: string shopNumber?: string
source?: string
logisticsWayId?: number | null
shipmentType?: string | number | null shipmentType?: string | number | null
userMark?: string userMark?: string
processNumber?: string processNumber?: string
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
v-model="editForm" v-model="editForm"
:config="formConfig" :config="formConfig"
form-item-width="100%" form-item-width="100%"
labelWidth="110" label-width="110"
> >
</CustomizeForm> </CustomizeForm>
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
defineOptions({ defineOptions({
name: 'LogisticsMethod', name: 'LogisticsMethod',
}) })
import LogisticsWaySelect from './components/LogisticsWaySelect.tsx'
import { import {
getLogisticsWayList, getLogisticsWayList,
addLogisticsWay, addLogisticsWay,
...@@ -83,7 +84,7 @@ import { ...@@ -83,7 +84,7 @@ import {
getUniuniList, getUniuniList,
getTiktokCarrier, getTiktokCarrier,
} from '@/api/logistics' } from '@/api/logistics'
import type { FormItemRule } from 'element-plus'
import { WarehouseListData } from '@/types/api/podUsOrder' import { WarehouseListData } from '@/types/api/podUsOrder'
import { ISeachFormConfig } from '@/types/searchType' import { ISeachFormConfig } from '@/types/searchType'
import { TableColumn } from '@/components/VxeTable' import { TableColumn } from '@/components/VxeTable'
...@@ -103,6 +104,7 @@ import { showConfirm } from '@/utils/ui' ...@@ -103,6 +104,7 @@ import { showConfirm } from '@/utils/ui'
import { Edit, Delete, List, WarningFilled } from '@element-plus/icons-vue' import { Edit, Delete, List, WarningFilled } from '@element-plus/icons-vue'
import { debounce } from 'lodash-es' import { debounce } from 'lodash-es'
import UPARCELImage from '@/assets/images/UPARCEL物流编码.png' import UPARCELImage from '@/assets/images/UPARCEL物流编码.png'
const [searchForm] = useValue({}) const [searchForm] = useValue({})
const [editForm, resetEditForm] = useValue<LogisticsMethod>({ const [editForm, resetEditForm] = useValue<LogisticsMethod>({
platformList: [ platformList: [
...@@ -140,6 +142,7 @@ const warehouseList = ref<WarehouseListData[]>([]) ...@@ -140,6 +142,7 @@ const warehouseList = ref<WarehouseListData[]>([])
interface ImageList { interface ImageList {
[key: string]: string [key: string]: string
} }
const imgeList = ref<ImageList>({ const imgeList = ref<ImageList>({
UPARCEL: UPARCELImage, UPARCEL: UPARCELImage,
}) })
...@@ -182,6 +185,45 @@ const platformList = ref([]) ...@@ -182,6 +185,45 @@ const platformList = ref([])
const ruleNameList = ref([]) const ruleNameList = ref([])
const uniuniList = ref([]) const uniuniList = ref([])
const logisticsCompanyList = ref([]) const logisticsCompanyList = ref([])
watch(
() => JSON.parse(JSON.stringify(editForm.value.platformList)),
(newValue, oldValue) => {
if (oldValue.length && newValue.length) {
// 遍历旧值数组
oldValue.forEach(
(
oldItem: { logisticsName: string; showPlatform: string[] },
index: number,
) => {
// 检查旧值项是否符合条件
if (
Array.isArray(oldItem.showPlatform) &&
oldItem.showPlatform.length === 1 &&
oldItem.showPlatform[0] === 'TIKTOK' &&
oldItem.logisticsName
) {
// 获取对应的新值项
const newItem = newValue[index]
// 检查新值项是否不再满足条件
if (
newItem &&
(!Array.isArray(newItem.showPlatform) ||
newItem.showPlatform.length === 0 ||
!newItem.showPlatform.includes('TIKTOK') ||
newItem.showPlatform.length > 1)
) {
// 清除 logisticsName
editForm.value.platformList[index].logisticsName = ''
}
}
},
)
}
},
{ deep: true },
)
const formConfig = computed<IFormConfig[]>(() => [ const formConfig = computed<IFormConfig[]>(() => [
{ title: '物流基础信息' }, { title: '物流基础信息' },
{ {
...@@ -370,9 +412,7 @@ const formConfig = computed<IFormConfig[]>(() => [ ...@@ -370,9 +412,7 @@ const formConfig = computed<IFormConfig[]>(() => [
{ {
title: '平台物流名称', title: '平台物流名称',
fixed: 'last', fixed: 'last',
render: (item, formData) => { render: (_, formData) => {
console.log(283, item, formData)
return (formData?.platformList as platformObj[])?.map( return (formData?.platformList as platformObj[])?.map(
(item: platformObj, index: number) => ( (item: platformObj, index: number) => (
<div style="display: flex; width:100%"> <div style="display: flex; width:100%">
...@@ -415,21 +455,21 @@ const formConfig = computed<IFormConfig[]>(() => [ ...@@ -415,21 +455,21 @@ const formConfig = computed<IFormConfig[]>(() => [
required: true, required: true,
message: '请输入物流名称', message: '请输入物流名称',
trigger: 'blur', trigger: 'blur',
validator: (
_: FormItemRule,
value: string,
callback: (error?: string) => void,
) => {
if (value) callback()
},
}, },
]} ]}
> >
<el-select <LogisticsWaySelect
v-model={item.logisticsName} v-model={item.logisticsName as string | number}
placeholder="请选择物流名称" isRadio={true}
> companyList={tiktokCarriers.value as ICompanyList[]}
{tiktokCarriers.value?.map((el) => ( ></LogisticsWaySelect>
<el-option
label={el.name}
value={el.name}
key={el.id}
></el-option>
))}{' '}
</el-select>
</el-form-item> </el-form-item>
) : ( ) : (
<el-form-item <el-form-item
...@@ -466,7 +506,7 @@ const formConfig = computed<IFormConfig[]>(() => [ ...@@ -466,7 +506,7 @@ const formConfig = computed<IFormConfig[]>(() => [
{index >= 1 && ( {index >= 1 && (
<el-button <el-button
style="margin-left: 10px" style="margin-left: 10px"
type="primary" type="danger"
onClick={() => deleteCol(index)} onClick={() => deleteCol(index)}
> >
删除 删除
...@@ -534,7 +574,16 @@ const tableConfig = ref<TableColumn[]>([ ...@@ -534,7 +574,16 @@ const tableConfig = ref<TableColumn[]>([
</span> </span>
<span> <span>
<span>{'物流名称:'}</span> <span>{'物流名称:'}</span>
<span class="logistics-name">{el.logisticsName}</span> {el.platform === 'TIKTOK' ? (
<span class="logistics-name">
{tiktokCarriers.value
?.flatMap((company) => company.wayList)
?.find((item) => el.logisticsName === item.id)?.name ||
el.logisticsName}
</span>
) : (
<span class="logistics-name">{el.logisticsName}</span>
)}
</span> </span>
</div> </div>
)), )),
...@@ -868,13 +917,33 @@ async function getAllList() { ...@@ -868,13 +917,33 @@ async function getAllList() {
} }
} }
const tiktokCarriers = ref<{ name: string; id: number }[]>([]) interface ICompanyList {
warehouseName: string
wayList: IwayList[]
}
interface IwayList {
name: string
id: string
}
const tiktokCarriers = ref<ICompanyList[]>([])
/** /**
* @description: 获取tictok物流承运商 * @description: 获取tictok物流承运商
*/ */
async function getTiktokCarriers() { async function getTiktokCarriers() {
const { data } = await getTiktokCarrier() const { data } = await getTiktokCarrier()
tiktokCarriers.value = data const labelTypeList = Array.from(new Set(data.map((e) => e.label)))
const result: ICompanyList[] = []
labelTypeList.forEach((label) => {
result.push({
warehouseName: label,
wayList: data.filter((e) => e.label === label),
})
})
tiktokCarriers.value = result
console.log(893, tiktokCarriers.value)
} }
/** /**
...@@ -885,7 +954,9 @@ interface LogList { ...@@ -885,7 +954,9 @@ interface LogList {
createTime?: string createTime?: string
description?: string description?: string
} }
const logList = ref<LogList[]>([]) const logList = ref<LogList[]>([])
async function showLog(row: LogisticsMethod) { async function showLog(row: LogisticsMethod) {
logDialogVisible.value = true logDialogVisible.value = true
try { try {
...@@ -909,9 +980,11 @@ async function showLog(row: LogisticsMethod) { ...@@ -909,9 +980,11 @@ async function showLog(row: LogisticsMethod) {
margin-bottom: 10px; margin-bottom: 10px;
} }
} }
.user-operate-btn { .user-operate-btn {
margin-bottom: 10px; margin-bottom: 10px;
} }
.dialog-footer { .dialog-footer {
text-align: center; text-align: center;
} }
......
...@@ -4,7 +4,13 @@ ...@@ -4,7 +4,13 @@
<template #top> <template #top>
<div class="header-filter"> <div class="header-filter">
<div class="header-filter-form"> <div class="header-filter-form">
<ElForm :model="searchForm" size="default" inline> <ElForm
:model="searchForm"
size="default"
inline
label-position="right"
label-width="70px"
>
<ElFormItem> <ElFormItem>
<el-select <el-select
v-model="searchForm.timeType" v-model="searchForm.timeType"
...@@ -139,7 +145,7 @@ ...@@ -139,7 +145,7 @@
<el-select <el-select
v-model="searchForm.order" v-model="searchForm.order"
clearable clearable
style="width: 100px; margin-right: 5px" style="width: 125px"
placeholder="排序类型" placeholder="排序类型"
> >
<el-option value="asc" label="正序"></el-option> <el-option value="asc" label="正序"></el-option>
......
...@@ -701,7 +701,14 @@ onMounted(() => { ...@@ -701,7 +701,14 @@ onMounted(() => {
<split-div otherSize="35"> <split-div otherSize="35">
<template #top> <template #top>
<el-card> <el-card>
<ElForm :model="searchForm" size="default" inline class="search-form"> <ElForm
:model="searchForm"
size="default"
inline
class="search-form"
label-position="right"
label-width="90px"
>
<ElFormItem label="仓库"> <ElFormItem label="仓库">
<ElSelect <ElSelect
v-model="searchForm.warehouseId" v-model="searchForm.warehouseId"
...@@ -1203,4 +1210,12 @@ onMounted(() => { ...@@ -1203,4 +1210,12 @@ onMounted(() => {
} }
} }
} }
.search-form {
::v-deep .el-radio-button {
width: 75px;
.el-radio-button__inner {
width: 100%;
}
}
}
</style> </style>
...@@ -686,7 +686,14 @@ onMounted(() => { ...@@ -686,7 +686,14 @@ onMounted(() => {
<split-div otherSize="35"> <split-div otherSize="35">
<template #top> <template #top>
<el-card> <el-card>
<ElForm :model="searchForm" size="default" inline class="search-form"> <ElForm
:model="searchForm"
size="default"
inline
class="search-form"
label-position="right"
label-width="90px"
>
<ElFormItem label="仓库"> <ElFormItem label="仓库">
<ElSelect <ElSelect
v-model="searchForm.warehouseId" v-model="searchForm.warehouseId"
...@@ -1172,4 +1179,12 @@ onMounted(() => { ...@@ -1172,4 +1179,12 @@ onMounted(() => {
} }
} }
} }
.search-form {
::v-deep .el-radio-button {
width: 75px;
.el-radio-button__inner {
width: 100%;
}
}
}
</style> </style>
<template> <template>
<div class="card flex-column h-100 overflow-hidden"> <div class="card flex-column h-100 overflow-hidden">
<div class="header-filter-form"> <div class="header-filter-form">
<ElForm :model="searchForm" size="default" inline> <ElForm
<ElFormItem> :model="searchForm"
<el-select size="default"
v-model="searchForm.timeType" inline
style="width: 100px; margin-right: 5px" label-position="right"
clearable label-width="70px"
placeholder="时间类型" >
>
<el-option :value="1" label="创建时间"></el-option>
<el-option :value="2" label="确认时间"></el-option>
<el-option :value="3" label="完成时间"></el-option>
<!-- <el-option :value="4" label="发货时间"></el-option> -->
</el-select>
<el-date-picker
v-model="timeRange"
:default-time="[
new Date(0, 0, 0, 0, 0, 0),
new Date(0, 0, 0, 23, 59, 59),
]"
placeholder="收货人"
value-format="YYYY-MM-DD HH:mm:ss"
type="datetimerange"
style="width: 280px"
:shortcuts="pickerOptions.shortcuts"
start-placeholder="开始时间"
end-placeholder="结束时间"
clearable
>
</el-date-picker>
</ElFormItem>
<ElFormItem label="客户"> <ElFormItem label="客户">
<el-select <el-select
v-model="searchForm.userMark" v-model="searchForm.userMark"
clearable clearable
filterable filterable
style="width: 100px" style="width: 150px"
placeholder="客户" placeholder="客户"
> >
<el-option <el-option
...@@ -77,7 +54,7 @@ ...@@ -77,7 +54,7 @@
v-model.trim="searchForm.sku" v-model.trim="searchForm.sku"
placeholder=" SKU" placeholder=" SKU"
clearable clearable
style="width: 130px" style="width: 150px"
></ElInput> ></ElInput>
</ElFormItem> </ElFormItem>
<!-- <ElFormItem label="发货单号"> <!-- <ElFormItem label="发货单号">
...@@ -85,7 +62,7 @@ ...@@ -85,7 +62,7 @@
v-model="searchForm.shipmentNumber" v-model="searchForm.shipmentNumber"
placeholder="发货单号" placeholder="发货单号"
clearable clearable
style="width: 130px" style="width: 150px"
/> />
</ElFormItem> --> </ElFormItem> -->
<ElFormItem label="生产单号"> <ElFormItem label="生产单号">
...@@ -93,7 +70,7 @@ ...@@ -93,7 +70,7 @@
v-model="searchForm.factorySubOrderNumber" v-model="searchForm.factorySubOrderNumber"
placeholder="定制生产单号" placeholder="定制生产单号"
clearable clearable
style="width: 130px" style="width: 150px"
/> />
</ElFormItem> </ElFormItem>
<ElFormItem label="订单号"> <ElFormItem label="订单号">
...@@ -101,7 +78,7 @@ ...@@ -101,7 +78,7 @@
v-model="searchForm.factoryOrderNumber" v-model="searchForm.factoryOrderNumber"
placeholder="定制订单号" placeholder="定制订单号"
clearable clearable
style="width: 130px" style="width: 150px"
/> />
</ElFormItem> </ElFormItem>
<ElFormItem label="店铺单号"> <ElFormItem label="店铺单号">
...@@ -109,7 +86,7 @@ ...@@ -109,7 +86,7 @@
v-model="searchForm.shopNumber" v-model="searchForm.shopNumber"
placeholder="店铺单号" placeholder="店铺单号"
clearable clearable
style="width: 130px" style="width: 150px"
/> />
</ElFormItem> </ElFormItem>
<ElFormItem label="素材ID"> <ElFormItem label="素材ID">
...@@ -117,7 +94,7 @@ ...@@ -117,7 +94,7 @@
v-model.trim="searchForm.productionFileId" v-model.trim="searchForm.productionFileId"
placeholder="素材ID" placeholder="素材ID"
clearable clearable
style="width: 130px" style="width: 150px"
></ElInput> ></ElInput>
</ElFormItem> </ElFormItem>
<ElFormItem label="内部标签"> <ElFormItem label="内部标签">
...@@ -125,14 +102,14 @@ ...@@ -125,14 +102,14 @@
v-model.trim="searchForm.internalMemo" v-model.trim="searchForm.internalMemo"
placeholder="内部标签" placeholder="内部标签"
clearable clearable
style="width: 100px" style="width: 150px"
></ElInput> ></ElInput>
</ElFormItem> </ElFormItem>
<ElFormItem label="排序"> <ElFormItem label="排序">
<el-select <el-select
v-model="searchForm.order" v-model="searchForm.order"
clearable clearable
style="width: 80px" style="width: 150px"
placeholder="排序类型" placeholder="排序类型"
> >
<el-option value="asc" label="正序"></el-option> <el-option value="asc" label="正序"></el-option>
...@@ -143,7 +120,7 @@ ...@@ -143,7 +120,7 @@
<el-select <el-select
v-model="searchForm.customizedQuantity" v-model="searchForm.customizedQuantity"
clearable clearable
style="width: 100px" style="width: 150px"
placeholder="定制类型" placeholder="定制类型"
> >
<el-option value="single" label="单面"></el-option> <el-option value="single" label="单面"></el-option>
...@@ -156,7 +133,7 @@ ...@@ -156,7 +133,7 @@
clearable clearable
filterable filterable
placeholder="尺码类型" placeholder="尺码类型"
style="width: 100px" style="width: 150px"
> >
<el-option <el-option
v-for="item in sizeList" v-for="item in sizeList"
...@@ -167,6 +144,35 @@ ...@@ -167,6 +144,35 @@
</ElSelect> </ElSelect>
</ElFormItem> </ElFormItem>
<ElFormItem> <ElFormItem>
<el-select
v-model="searchForm.timeType"
style="width: 100px; margin-right: 5px"
clearable
placeholder="时间类型"
>
<el-option :value="1" label="创建时间"></el-option>
<el-option :value="2" label="确认时间"></el-option>
<el-option :value="3" label="完成时间"></el-option>
<!-- <el-option :value="4" label="发货时间"></el-option> -->
</el-select>
<el-date-picker
v-model="timeRange"
:default-time="[
new Date(0, 0, 0, 0, 0, 0),
new Date(0, 0, 0, 23, 59, 59),
]"
placeholder="收货人"
value-format="YYYY-MM-DD HH:mm:ss"
type="datetimerange"
style="width: 280px"
:shortcuts="pickerOptions.shortcuts"
start-placeholder="开始时间"
end-placeholder="结束时间"
clearable
>
</el-date-picker>
</ElFormItem>
<ElFormItem>
<ElButton type="primary" @click="loadDiffList">查询</ElButton> <ElButton type="primary" @click="loadDiffList">查询</ElButton>
</ElFormItem> </ElFormItem>
<ElFormItem v-if="status === 'TO_BE_CONFIRMED'"> <ElFormItem v-if="status === 'TO_BE_CONFIRMED'">
......
...@@ -99,10 +99,9 @@ ...@@ -99,10 +99,9 @@
<template #image="{ row }"> <template #image="{ row }">
<div <div
style="display: flex; flex-wrap: nowrap" style="display: flex; flex-wrap: nowrap"
v-if="row.previewImgs?.length"
> >
<div <div
v-for="img in row.previewImgs" v-for="img in row.productMark!=='normal'?row.previewImgs:[{url:row.variantImage}]"
:key="img" :key="img"
@click.stop="handleCurrentChange(img.url)" @click.stop="handleCurrentChange(img.url)"
style="cursor: pointer; margin-right: 5px; flex: 1" style="cursor: pointer; margin-right: 5px; flex: 1"
...@@ -157,6 +156,12 @@ ...@@ -157,6 +156,12 @@
@click="podOrderDetailsData && print(podOrderDetailsData, true)" @click="podOrderDetailsData && print(podOrderDetailsData, true)"
>手动打印</ElButton >手动打印</ElButton
> >
<ElButton
type="primary"
@click="printNormal"
>普货拣货
</ElButton
>
<ElButton type="success" @click="handlePrintFinish" <ElButton type="success" @click="handlePrintFinish"
>打单完成</ElButton >打单完成</ElButton
> >
...@@ -220,11 +225,13 @@ import { ...@@ -220,11 +225,13 @@ import {
clearSuperAllBoxApi, clearSuperAllBoxApi,
getSuperPodBoxListApi, getSuperPodBoxListApi,
submitSuperInspectionApi, submitSuperInspectionApi,
printNormalPdf,
} from '@/api/podCnOrder' } from '@/api/podCnOrder'
import useUserStore from '@/store/user' import useUserStore from '@/store/user'
import { Check } from '@element-plus/icons-vue' import { Check } from '@element-plus/icons-vue'
import socket from '@/utils/cnSuperWebsocket' import socket from '@/utils/cnSuperWebsocket'
import { ElMessage } from 'element-plus'
import { filePath } from '@/api/axios.ts'
const { getCLodop } = useLodop() const { getCLodop } = useLodop()
const userStore = useUserStore() const userStore = useUserStore()
...@@ -268,31 +275,41 @@ const podOrderDetailsColumns = computed(() => [ ...@@ -268,31 +275,41 @@ const podOrderDetailsColumns = computed(() => [
// align: 'center', // align: 'center',
// }, // },
{ {
label: '库存SKU',
prop: 'thirdSkuCode',
width: 180,
align: 'center',
},
{
label: 'variant SKU', label: 'variant SKU',
prop: 'variantSku', prop: 'variantSku',
width: 140, width: 150,
align: 'center', align: 'center',
}, },
{ {
label: '商品名称', label: '商品名称',
width: 200,
prop: 'productName', prop: 'productName',
}, },
{ {
label: '购买数量', label: '购买数量',
prop: 'purchaseNumber',
width: 90, width: 90,
fixed: 'right',
prop: 'purchaseNumber',
align: 'center', align: 'center',
}, },
{ {
label: '拣货数量', label: '拣货数量',
prop: 'count', prop: 'count',
width: 90, width: 90,
fixed: 'right',
align: 'center', align: 'center',
}, },
{ {
label: '验证结果', label: '验证结果',
slot: 'verifyResult', slot: 'verifyResult',
fixed: 'right',
width: 90, width: 90,
align: 'center', align: 'center',
}, },
...@@ -374,7 +391,7 @@ watch( ...@@ -374,7 +391,7 @@ watch(
(val) => { (val) => {
if (val && val.productList?.length) if (val && val.productList?.length)
val.productList.forEach((el) => { val.productList.forEach((el) => {
if (!el.previewImgs) el.previewImgs = JSON.parse(el.imageAry) if (!el.previewImgs) el.previewImgs = JSON.parse(el.imageAry || '[]')
}) })
}, },
{ deep: true }, { deep: true },
...@@ -398,7 +415,7 @@ const renderItemBox = (bool: boolean) => { ...@@ -398,7 +415,7 @@ const renderItemBox = (bool: boolean) => {
if (!boxItem) boxItem = { data: { productList: [] } } if (!boxItem) boxItem = { data: { productList: [] } }
const { data } = boxItem const { data } = boxItem
data?.productList?.forEach((el) => { data?.productList?.forEach((el) => {
if (!el.previewImgs) el.previewImgs = JSON.parse(el.imageAry) if (!el.previewImgs) el.previewImgs = JSON.parse(el.imageAry || '[]')
}) })
if (!data) { if (!data) {
renderLock = false renderLock = false
...@@ -467,6 +484,30 @@ const messageChange = (data: WebSocketMessage) => { ...@@ -467,6 +484,30 @@ const messageChange = (data: WebSocketMessage) => {
setPodBoxList(more) setPodBoxList(more)
} }
} }
const printNormal = async () => {
const arr: (number | undefined)[] = [];
(podBoxList.value || []).forEach((item: PodMakeOrderData) => {
if (item.data) {
if (item.data.productList && item.data.productList.length > 0) {
const flag = item.data.productList.some((item1) => {
return item1.productMark == 'normal'
})
if (flag) {
arr?.push(item.data?.id)
}
}
}
})
if (!arr.length) {
ElMessage.warning('暂无可打印的普货拣货单')
return
}
const res = await printNormalPdf(arr.join())
ElMessage.success('操作成功')
window.open(filePath + res.message)
}
const setPodBoxList = (data: WebSocketMessage) => { const setPodBoxList = (data: WebSocketMessage) => {
const obj = data.txt const obj = data.txt
if (obj && typeof obj === 'string') { if (obj && typeof obj === 'string') {
...@@ -618,6 +659,16 @@ const initOrderDetailBox = async () => { ...@@ -618,6 +659,16 @@ const initOrderDetailBox = async () => {
ElMessage.warning(res.message) ElMessage.warning(res.message)
return return
} }
res.data.forEach(r=>{
r.data?.productList?.forEach(d=>{
if (d.productMark === 'normal') {
d.previewImgs = [{ url: d.variantImage || '' }]
} else {
if (!d.previewImgs) d.previewImgs = JSON.parse(d.imageAry || '[]')
}
})
})
orderStore.setPodBoxList({ orderStore.setPodBoxList({
boxList: res.data, boxList: res.data,
factoryNo, factoryNo,
...@@ -869,7 +920,8 @@ const clearAllBox = async () => { ...@@ -869,7 +920,8 @@ const clearAllBox = async () => {
} }
const handleRowClick = (row: ProductList) => { const handleRowClick = (row: ProductList) => {
console.log(907, row) console.log(907, row)
coverImage.value = row.previewImgs?.[0]?.url || '' const previewImages = row.productMark!=='normal'?row.previewImgs:[{url:row.variantImage}]
coverImage.value =previewImages?.[0]?.url || ''
productionOrderRef.value.focus() productionOrderRef.value.focus()
} }
const handleCurrentChange = (url: string) => { const handleCurrentChange = (url: string) => {
......
<template> <template>
<div class="card flex-column h-100 overflow-hidden"> <div class="card flex-column h-100 overflow-hidden">
<div class="header-filter-form"> <div class="header-filter-form">
<ElForm :model="searchForm" size="default" inline> <ElForm
class="search-form"
:model="searchForm"
size="default"
inline
label-position="right"
label-width="70px"
>
<ElFormItem label="仓库"> <ElFormItem label="仓库">
<ElSelect <ElSelect
v-model="searchForm.warehouseId" v-model="searchForm.warehouseId"
...@@ -120,7 +127,7 @@ ...@@ -120,7 +127,7 @@
<el-select <el-select
v-model="searchForm.order" v-model="searchForm.order"
clearable clearable
style="width: 100px" style="width: 150px"
placeholder="排序类型" placeholder="排序类型"
> >
<el-option value="asc" label="正序"></el-option> <el-option value="asc" label="正序"></el-option>
...@@ -346,6 +353,22 @@ ...@@ -346,6 +353,22 @@
></ElOption> ></ElOption>
</ElSelect> </ElSelect>
</ElFormItem> </ElFormItem>
<ElFormItem label="订单来源">
<ElSelect
v-model="searchForm.source"
placeholder="请选择"
clearable
:teleported="false"
style="width: 150px"
>
<ElOption
v-for="(item, index) in sourceList"
:key="index"
:value="item.id"
:label="item.name"
></ElOption>
</ElSelect>
</ElFormItem>
</ElForm> </ElForm>
<template #reference> <template #reference>
<el-button type="warning" @click="searchVisible = !searchVisible"> <el-button type="warning" @click="searchVisible = !searchVisible">
...@@ -1320,6 +1343,19 @@ ...@@ -1320,6 +1343,19 @@
</el-icon> </el-icon>
</div> </div>
<div class="order-detail-item"> <div class="order-detail-item">
<span class="order-detail-item-label">订单来源:</span>
<span class="order-detail-item-value">
{{
row.source
? {
'jomall-erp': 'erp推送',
'third-party': '第三方推送',
}[row.source as 'jomall-erp' | 'third-party']
: ''
}}
</span>
</div>
<div class="order-detail-item">
<span class="order-detail-item-label">总克重:</span> <span class="order-detail-item-label">总克重:</span>
<span v-if="row.weight" class="order-detail-item-value"> <span v-if="row.weight" class="order-detail-item-value">
{{ row.weight }}g {{ row.weight }}g
...@@ -2613,6 +2649,17 @@ const exportForm = ref({ ...@@ -2613,6 +2649,17 @@ const exportForm = ref({
resource: '', resource: '',
}) })
const sourceList = [
{
name: 'erp推送',
id: 'jomall-erp',
},
{
name: '第三方推送',
id: 'third-party',
},
]
const exportData = () => { const exportData = () => {
exportVisible.value = true exportVisible.value = true
} }
...@@ -5587,6 +5634,14 @@ useRouter().beforeEach((to, from, next) => { ...@@ -5587,6 +5634,14 @@ useRouter().beforeEach((to, from, next) => {
color: white; color: white;
font-weight: bold; font-weight: bold;
} }
.search-form {
::v-deep .el-radio-button {
width: 75px;
.el-radio-button__inner {
width: 100%;
}
}
}
</style> </style>
<style lang="scss"> <style lang="scss">
.customize-select-style { .customize-select-style {
......
<template> <template>
<div class="card flex-column h-100 overflow-hidden"> <div class="card flex-column h-100 overflow-hidden">
<div class="header-filter-form"> <div class="header-filter-form">
<ElForm :model="searchForm" size="default" inline> <ElForm
class="search-form"
label-position="right"
label-width="70px"
:model="searchForm"
size="default"
inline
>
<!-- <div> --> <!-- <div> -->
<ElFormItem label="仓库"> <ElFormItem label="仓库">
<ElSelect <ElSelect
...@@ -54,7 +61,7 @@ ...@@ -54,7 +61,7 @@
collapse-tags collapse-tags
collapse-tags-tooltip collapse-tags-tooltip
placeholder="请输入工艺" placeholder="请输入工艺"
style="width: 230px" style="width: 150px"
> >
<el-option <el-option
v-for="item in craftList" v-for="item in craftList"
...@@ -313,6 +320,38 @@ ...@@ -313,6 +320,38 @@
></ElOption> ></ElOption>
</ElSelect> </ElSelect>
</ElFormItem> </ElFormItem>
<ElFormItem label="物流方式">
<ElSelect
v-model="searchForm.logisticsWayId"
placeholder="请选择"
clearable
:teleported="false"
style="width: 150px"
>
<ElOption
v-for="(item, index) in logisticsWayList"
:key="index"
:value="item.id"
:label="item.name"
></ElOption>
</ElSelect>
</ElFormItem>
<ElFormItem label="订单来源">
<ElSelect
v-model="searchForm.source"
placeholder="请选择"
clearable
:teleported="false"
style="width: 150px"
>
<ElOption
v-for="(item, index) in sourceList"
:key="index"
:value="item.id"
:label="item.name"
></ElOption>
</ElSelect>
</ElFormItem>
</ElForm> </ElForm>
<template #reference> <template #reference>
<el-button type="warning" @click="searchVisible = !searchVisible"> <el-button type="warning" @click="searchVisible = !searchVisible">
...@@ -1476,9 +1515,10 @@ ...@@ -1476,9 +1515,10 @@
<span class="order-detail-item-value"> <span class="order-detail-item-value">
{{ {{
row.source row.source
? { 'jomall-erp': 'erp', 'third-party': '第三方推送' }[ ? {
row.source as 'jomall-erp' | 'third-party' 'jomall-erp': 'erp推送',
] 'third-party': '第三方推送',
}[row.source as 'jomall-erp' | 'third-party']
: '' : ''
}} }}
</span> </span>
...@@ -2868,6 +2908,7 @@ import { ...@@ -2868,6 +2908,7 @@ import {
updateTrackingNumberAndRegister, updateTrackingNumberAndRegister,
countTrackRegisterApi, countTrackRegisterApi,
getCustomTagListApi, getCustomTagListApi,
getLogisticsWayApi,
} from '@/api/podUsOrder' } from '@/api/podUsOrder'
import { BaseRespData } from '@/types/api' import { BaseRespData } from '@/types/api'
...@@ -2937,9 +2978,20 @@ declare global { ...@@ -2937,9 +2978,20 @@ declare global {
responseBody?: unknown responseBody?: unknown
} }
} }
const sourceList = [
{
name: 'erp推送',
id: 'jomall-erp',
},
{
name: '第三方推送',
id: 'third-party',
},
]
const tabsNav = ref<Tab[]>() const tabsNav = ref<Tab[]>()
const isAuto = ref(true) const isAuto = ref(true)
const countryList = ref([]) const countryList = ref([])
const logisticsWayList = ref<{ name: string; id: number }[]>([])
const currentRow = ref<AddressInfo>({ const currentRow = ref<AddressInfo>({
receiverName: '', receiverName: '',
receiverPhone: '', receiverPhone: '',
...@@ -3093,6 +3145,8 @@ const detailData = ref({}) ...@@ -3093,6 +3145,8 @@ const detailData = ref({})
const [searchForm, resetSearchForm] = useValue<SearchForm>({ const [searchForm, resetSearchForm] = useValue<SearchForm>({
timeType: 1, timeType: 1,
shopNumber: '', shopNumber: '',
source: '',
logisticsWayId: null,
shipmentType: '', shipmentType: '',
userMark: '', userMark: '',
processNumber: '', processNumber: '',
...@@ -6124,7 +6178,14 @@ const getTagName = (row: ProductList) => { ...@@ -6124,7 +6178,14 @@ const getTagName = (row: ProductList) => {
: '' : ''
} }
const getLogisticsWay = async () => {
const { data } = await getLogisticsWayApi()
logisticsWayList.value = data
}
getPermission() getPermission()
getLogisticsWay()
const globalProperties = const globalProperties =
getCurrentInstance()?.appContext.config.globalProperties // 获取全局挂载 getCurrentInstance()?.appContext.config.globalProperties // 获取全局挂载
const isPermissionBtn = globalProperties?.$isPermissionBtn const isPermissionBtn = globalProperties?.$isPermissionBtn
...@@ -6473,6 +6534,14 @@ useRouter().beforeEach((to, from, next) => { ...@@ -6473,6 +6534,14 @@ useRouter().beforeEach((to, from, next) => {
color: white; color: white;
font-weight: bold; font-weight: bold;
} }
.search-form {
::v-deep .el-radio-button {
width: 75px;
.el-radio-button__inner {
width: 100%;
}
}
}
</style> </style>
<style lang="scss"> <style lang="scss">
.customize-select-style { .customize-select-style {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"module": "ESNext", "module": "ESNext",
"lib": ["ES2020", "DOM", "DOM.Iterable"], "lib": ["ES2020", "DOM", "DOM.Iterable"],
"skipLibCheck": true, "skipLibCheck": true,
"types":[],
/* Bundler mode */ /* Bundler mode */
"moduleResolution": "bundler", "moduleResolution": "bundler",
"allowImportingTsExtensions": true, "allowImportingTsExtensions": true,
......
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