Commit b894be94 by wuqian
parents 822a9eb1 786c61ea
...@@ -12,7 +12,7 @@ export interface ExportParams extends SearchForm { ...@@ -12,7 +12,7 @@ export interface ExportParams extends SearchForm {
export interface SearchForm { export interface SearchForm {
timeType?: number | null timeType?: number | null
shopNumber?: string shopNumber?: string
shipmentType?: string shipmentType?: string | number | null
userMark?: string userMark?: string
processNumber?: string processNumber?: string
trackingNumber?: string trackingNumber?: string
...@@ -40,6 +40,7 @@ export interface SearchForm { ...@@ -40,6 +40,7 @@ export interface SearchForm {
sizeType?: number | null sizeType?: number | null
tagsId?: string tagsId?: string
tagsIdArr?: (number | null)[] tagsIdArr?: (number | null)[]
replaceShipment?: number | null
} }
export interface PodUsOrderListData { export interface PodUsOrderListData {
id: number id: number
......
...@@ -128,13 +128,13 @@ ...@@ -128,13 +128,13 @@
</el-select> </el-select>
</ElFormItem> </ElFormItem>
<ElFormItem label="类型"> <ElFormItem label="类型">
<el-radio-group v-model="searchForm.customizedQuantity"> <el-radio-group v-model="searchForm.customizedQuantity" @click.stop="(e: Event) => handleRadioGroupClick(e)">
<el-radio-button label="single">单面</el-radio-button> <el-radio-button label="single">单面</el-radio-button>
<el-radio-button label="multiple">多面</el-radio-button> <el-radio-button label="multiple">多面</el-radio-button>
</el-radio-group> </el-radio-group>
</ElFormItem> </ElFormItem>
<ElFormItem label="数量"> <ElFormItem label="数量">
<el-radio-group v-model="searchForm.multi"> <el-radio-group v-model="searchForm.multi" @click.stop="(e: Event) => handleMultiRadioGroupClick(e)">
<el-radio-button :label="false">单件</el-radio-button> <el-radio-button :label="false">单件</el-radio-button>
<el-radio-button :label="true">多件</el-radio-button> <el-radio-button :label="true">多件</el-radio-button>
</el-radio-group> </el-radio-group>
...@@ -3067,9 +3067,11 @@ const handleDownload = async (row: PodCnOrderListData) => { ...@@ -3067,9 +3067,11 @@ const handleDownload = async (row: PodCnOrderListData) => {
const type = row.url && row.tiffUrl ? 'tiff' : row.url ? 'png' : 'tiff' const type = row.url && row.tiffUrl ? 'tiff' : row.url ? 'png' : 'tiff'
try { try {
const url = const url =
type === 'png' type === 'tiff'
? filePath + row.url ? row.tiffUrl?.startsWith('/temp')
? `https://factory.jomalls.com/upload/factory` + row.tiffUrl
: `https://ps.jomalls.com/tiff/` + row.tiffUrl : `https://ps.jomalls.com/tiff/` + row.tiffUrl
: filePath + row.url
if (type === 'tiff') { if (type === 'tiff') {
window.open(url, '_blank') window.open(url, '_blank')
...@@ -3702,8 +3704,11 @@ const downloadTif = async (type: string, templateWidth: number) => { ...@@ -3702,8 +3704,11 @@ const downloadTif = async (type: string, templateWidth: number) => {
) )
const url = const url =
type === 'tiff' type === 'tiff'
? `https://ps.jomalls.com/tiff/` + res.message ? res.message?.startsWith('/temp')
? `https://factory.jomalls.com/upload/factory` + res.message
: `https://ps.jomalls.com/tiff/` + res.message
: filePath + res.message : filePath + res.message
if (type === 'tiff') { if (type === 'tiff') {
window.open(url, '_blank') window.open(url, '_blank')
tifDownloadLoading.value = false tifDownloadLoading.value = false
...@@ -3802,7 +3807,39 @@ const downloadSingleType = async ( ...@@ -3802,7 +3807,39 @@ const downloadSingleType = async (
throw error // 重新抛出错误以便外部捕获 throw error // 重新抛出错误以便外部捕获
} }
} }
const handleRadioGroupClick = (event: Event) => {
const target = event.target as HTMLElement
const radioButton = target.closest('.el-radio-button')
if (radioButton) {
const input = radioButton.querySelector('input[type="radio"]') as HTMLInputElement
if (input) {
const value = input.value
if (searchForm.value.customizedQuantity === value) {
event.preventDefault()
event.stopPropagation()
searchForm.value.customizedQuantity = ''
}
}
}
}
const handleMultiRadioGroupClick = (event: Event) => {
const target = event.target as HTMLElement
const radioButton = target.closest('.el-radio-button')
if (radioButton) {
const input = radioButton.querySelector('input[type="radio"]') as HTMLInputElement
if (input) {
const value = input.value === 'true' ? true : false
if (searchForm.value.multi === value) {
event.preventDefault()
event.stopPropagation()
searchForm.value.multi = null
}
}
}
}
// 提取文件下载逻辑为独立函数 // 提取文件下载逻辑为独立函数
const downloadFile = async (url: string, message: string) => { const downloadFile = async (url: string, message: string) => {
try { try {
......
...@@ -122,13 +122,19 @@ ...@@ -122,13 +122,19 @@
</ElFormItem> </ElFormItem>
<!-- </div> --> <!-- </div> -->
<ElFormItem label="类型"> <ElFormItem label="类型">
<el-radio-group v-model="searchForm.customizedQuantity"> <el-radio-group
v-model="searchForm.customizedQuantity"
@click.stop="(e: Event) => handleRadioGroupClick(e)"
>
<el-radio-button label="single">单面</el-radio-button> <el-radio-button label="single">单面</el-radio-button>
<el-radio-button label="multiple">多面</el-radio-button> <el-radio-button label="multiple">多面</el-radio-button>
</el-radio-group> </el-radio-group>
</ElFormItem> </ElFormItem>
<ElFormItem label="数量"> <ElFormItem label="数量">
<el-radio-group v-model="searchForm.multi"> <el-radio-group
v-model="searchForm.multi"
@click.stop="(e: Event) => handleMultiRadioGroupClick(e)"
>
<el-radio-button :label="false">单件</el-radio-button> <el-radio-button :label="false">单件</el-radio-button>
<el-radio-button :label="true">多件</el-radio-button> <el-radio-button :label="true">多件</el-radio-button>
</el-radio-group> </el-radio-group>
...@@ -247,9 +253,10 @@ ...@@ -247,9 +253,10 @@
clearable clearable
:teleported="false" :teleported="false"
style="width: 150px" style="width: 150px"
:disabled="searchForm.replaceShipment === 0"
> >
<ElOption <ElOption
v-for="(item, index) in ['自有物流', '工厂物流']" v-for="(item, index) in shipmentList"
:key="index" :key="index"
:value="index" :value="index"
:label="item" :label="item"
...@@ -276,6 +283,36 @@ ...@@ -276,6 +283,36 @@
></ElOption> ></ElOption>
</ElSelect> </ElSelect>
</ElFormItem> </ElFormItem>
<ElFormItem label="是否代发">
<ElSelect
v-model="searchForm.replaceShipment"
placeholder="请选择"
clearable
:teleported="false"
style="width: 150px"
@change="
(e:number) => {
if (e == 0) {
shipmentList=['自提','快递']
searchForm.shipmentType=0
}else{
shipmentList=['自有物流', '工厂物流']
searchForm.shipmentType=''
}
}
"
>
<ElOption
v-for="(item, index) in [
{ value: 1, label: '代发' },
{ value: 0, label: '不代发' },
]"
:key="index"
:value="item.value"
:label="item.label"
></ElOption>
</ElSelect>
</ElFormItem>
</ElForm> </ElForm>
<template #reference> <template #reference>
<el-button type="warning" @click="searchVisible = !searchVisible"> <el-button type="warning" @click="searchVisible = !searchVisible">
...@@ -1389,16 +1426,36 @@ ...@@ -1389,16 +1426,36 @@
</span> </span>
</div> </div>
<div class="order-detail-item"> <div class="order-detail-item">
<!-- 是否代发 0.否 1.是 -->
<span class="order-detail-item-label">是否代发:</span>
<span
style="color: red; font-weight: 500"
class="order-detail-item-value"
>
{{ ['否', '是'][row.replaceShipment] }}
</span>
</div>
<div class="order-detail-item">
<span class="order-detail-item-label">物流类型:</span> <span class="order-detail-item-label">物流类型:</span>
<span <span
style="color: red; font-weight: 500" style="color: red; font-weight: 500"
class="order-detail-item-value" class="order-detail-item-value"
> >
{{ ['自有物流', '工厂物流'][row.shipmentType] }} {{
row.shipmentType == 0 && row.replaceShipment == 0
? '自提'
: ['自有物流', '工厂物流'][row.shipmentType]
}}
</span> </span>
</div> </div>
<div class="order-detail-item"> <div class="order-detail-item">
<span class="order-detail-item-label">物流跟踪号:</span> <span class="order-detail-item-label">
{{
row.replaceShipment === 0 && row.shipmentType === 0
? '取货码:'
: '物流跟踪号:'
}}</span
>
<span class="order-detail-item-value"> <span class="order-detail-item-value">
<el-button <el-button
type="primary" type="primary"
...@@ -1737,7 +1794,14 @@ ...@@ -1737,7 +1794,14 @@
</ElButton> </ElButton>
</span> </span>
<span v-if="['WAIT_TRACK'].includes(status)" class="operate-item"> <span
v-if="
['WAIT_TRACK'].includes(status) &&
row.replaceShipment !== 0 &&
row.shipmentType !== 0
"
class="operate-item"
>
<ElButton link type="warning" @click="updateTrackingNumber(row)" <ElButton link type="warning" @click="updateTrackingNumber(row)"
>修改跟踪号</ElButton >修改跟踪号</ElButton
> >
...@@ -1753,6 +1817,7 @@ ...@@ -1753,6 +1817,7 @@
<span <span
v-if=" v-if="
row.shipmentType === 0 && row.shipmentType === 0 &&
row.replaceShipment !== 0 &&
['CREATE_LOGISTICS', 'WAIT_SHIPMENT'].includes(status) ['CREATE_LOGISTICS', 'WAIT_SHIPMENT'].includes(status)
" "
class="operate-item" class="operate-item"
...@@ -1791,6 +1856,7 @@ ...@@ -1791,6 +1856,7 @@
<span <span
v-if=" v-if="
row.shipmentType === 0 && row.shipmentType === 0 &&
row.replaceShipment !== 0 &&
['CREATE_LOGISTICS', 'WAIT_SHIPMENT'].includes(status) ['CREATE_LOGISTICS', 'WAIT_SHIPMENT'].includes(status)
" "
class="operate-item" class="operate-item"
...@@ -1805,6 +1871,8 @@ ...@@ -1805,6 +1871,8 @@
</span> </span>
<span <span
v-if=" v-if="
row.shipmentType !== 0 &&
row.replaceShipment !== 0 &&
(status === 'IN_TRANSIT' || status === 'COMPLETE') && (status === 'IN_TRANSIT' || status === 'COMPLETE') &&
isPermissionBtn('TRACK') isPermissionBtn('TRACK')
" "
...@@ -3198,9 +3266,11 @@ const handleDownload = async (row: PodUsOrderListData) => { ...@@ -3198,9 +3266,11 @@ const handleDownload = async (row: PodUsOrderListData) => {
const type = row.url && row.tiffUrl ? 'tiff' : row.url ? 'png' : 'tiff' const type = row.url && row.tiffUrl ? 'tiff' : row.url ? 'png' : 'tiff'
try { try {
const url = const url =
type === 'png' type === 'tiff'
? filePath + row.url ? row.tiffUrl?.startsWith('/temp')
? `https://factory.jomalls.com/upload/factory` + row.tiffUrl
: `https://ps.jomalls.com/tiff/` + row.tiffUrl : `https://ps.jomalls.com/tiff/` + row.tiffUrl
: filePath + row.url
if (type === 'tiff') { if (type === 'tiff') {
window.open(url, '_blank') window.open(url, '_blank')
...@@ -3264,6 +3334,9 @@ const handleBatchDelete = async (type: string, id?: string) => { ...@@ -3264,6 +3334,9 @@ const handleBatchDelete = async (type: string, id?: string) => {
loading.close() loading.close()
} }
} }
const shipmentList = ref(['自有物流', '工厂物流'])
// 批量下载 重新排版 // 批量下载 重新排版
const handleReComposingDesign = async () => { const handleReComposingDesign = async () => {
const row = { ...(typesettingRow.value as PodUsOrderListData) } const row = { ...(typesettingRow.value as PodUsOrderListData) }
...@@ -3944,7 +4017,9 @@ const downloadTif = async (type: string, templateWidth: number) => { ...@@ -3944,7 +4017,9 @@ const downloadTif = async (type: string, templateWidth: number) => {
) )
const url = const url =
type === 'tiff' type === 'tiff'
? `https://ps.jomalls.com/tiff/` + res.message ? res.message?.startsWith('/temp')
? `https://factory.jomalls.com/upload/factory` + res.message
: `https://ps.jomalls.com/tiff/` + res.message
: filePath + res.message : filePath + res.message
if (type === 'tiff') { if (type === 'tiff') {
window.open(url, '_blank') window.open(url, '_blank')
...@@ -4073,6 +4148,39 @@ const downloadFile = async (url: string, message: string) => { ...@@ -4073,6 +4148,39 @@ const downloadFile = async (url: string, message: string) => {
pngDownloadLoading.value = false pngDownloadLoading.value = false
} }
} }
const handleRadioGroupClick = (event: Event) => {
const target = event.target as HTMLElement
const radioButton = target.closest('.el-radio-button')
if (radioButton) {
const input = radioButton.querySelector('input[type="radio"]') as HTMLInputElement
if (input) {
const value = input.value
if (searchForm.value.customizedQuantity === value) {
event.preventDefault()
event.stopPropagation()
searchForm.value.customizedQuantity = ''
}
}
}
}
const handleMultiRadioGroupClick = (event: Event) => {
const target = event.target as HTMLElement
const radioButton = target.closest('.el-radio-button')
if (radioButton) {
const input = radioButton.querySelector('input[type="radio"]') as HTMLInputElement
if (input) {
const value = input.value === 'true' ? true : false
if (searchForm.value.multi === value) {
event.preventDefault()
event.stopPropagation()
searchForm.value.multi = null
}
}
}
}
// const downloadTifItem = async () => { // const downloadTifItem = async () => {
// const row = { ...(typesettingRow.value as PodUsOrderListData) } // const row = { ...(typesettingRow.value as PodUsOrderListData) }
// const loading = ElLoading.service({ // const loading = ElLoading.service({
...@@ -4568,7 +4676,8 @@ const downloadMaterial = async () => { ...@@ -4568,7 +4676,8 @@ const downloadMaterial = async () => {
if ( if (
status.value === 'IN_PRODUCTION' || status.value === 'IN_PRODUCTION' ||
status.value === 'PICKING' || status.value === 'PICKING' ||
status.value === 'TO_BE_REPLENISHMENT' status.value === 'TO_BE_REPLENISHMENT' ||
status.value === 'TO_BE_ARRANGE'
) { ) {
selectedIds = cardSelection.value selectedIds = cardSelection.value
.map((item: ProductList) => item.id) .map((item: ProductList) => item.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