Commit b894be94 by wuqian
parents 822a9eb1 786c61ea
......@@ -12,7 +12,7 @@ export interface ExportParams extends SearchForm {
export interface SearchForm {
timeType?: number | null
shopNumber?: string
shipmentType?: string
shipmentType?: string | number | null
userMark?: string
processNumber?: string
trackingNumber?: string
......@@ -40,6 +40,7 @@ export interface SearchForm {
sizeType?: number | null
tagsId?: string
tagsIdArr?: (number | null)[]
replaceShipment?: number | null
}
export interface PodUsOrderListData {
id: number
......
......@@ -128,13 +128,13 @@
</el-select>
</ElFormItem>
<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="multiple">多面</el-radio-button>
</el-radio-group>
</ElFormItem>
<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="true">多件</el-radio-button>
</el-radio-group>
......@@ -3067,9 +3067,11 @@ const handleDownload = async (row: PodCnOrderListData) => {
const type = row.url && row.tiffUrl ? 'tiff' : row.url ? 'png' : 'tiff'
try {
const url =
type === 'png'
? filePath + row.url
: `https://ps.jomalls.com/tiff/` + row.tiffUrl
type === 'tiff'
? row.tiffUrl?.startsWith('/temp')
? `https://factory.jomalls.com/upload/factory` + row.tiffUrl
: `https://ps.jomalls.com/tiff/` + row.tiffUrl
: filePath + row.url
if (type === 'tiff') {
window.open(url, '_blank')
......@@ -3702,8 +3704,11 @@ const downloadTif = async (type: string, templateWidth: number) => {
)
const url =
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
if (type === 'tiff') {
window.open(url, '_blank')
tifDownloadLoading.value = false
......@@ -3802,7 +3807,39 @@ const downloadSingleType = async (
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) => {
try {
......
......@@ -122,13 +122,19 @@
</ElFormItem>
<!-- </div> -->
<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="multiple">多面</el-radio-button>
</el-radio-group>
</ElFormItem>
<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="true">多件</el-radio-button>
</el-radio-group>
......@@ -247,9 +253,10 @@
clearable
:teleported="false"
style="width: 150px"
:disabled="searchForm.replaceShipment === 0"
>
<ElOption
v-for="(item, index) in ['自有物流', '工厂物流']"
v-for="(item, index) in shipmentList"
:key="index"
:value="index"
:label="item"
......@@ -276,6 +283,36 @@
></ElOption>
</ElSelect>
</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>
<template #reference>
<el-button type="warning" @click="searchVisible = !searchVisible">
......@@ -1389,16 +1426,36 @@
</span>
</div>
<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
style="color: red; font-weight: 500"
class="order-detail-item-value"
>
{{ ['自有物流', '工厂物流'][row.shipmentType] }}
{{
row.shipmentType == 0 && row.replaceShipment == 0
? '自提'
: ['自有物流', '工厂物流'][row.shipmentType]
}}
</span>
</div>
<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">
<el-button
type="primary"
......@@ -1737,7 +1794,14 @@
</ElButton>
</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
>
......@@ -1753,6 +1817,7 @@
<span
v-if="
row.shipmentType === 0 &&
row.replaceShipment !== 0 &&
['CREATE_LOGISTICS', 'WAIT_SHIPMENT'].includes(status)
"
class="operate-item"
......@@ -1791,6 +1856,7 @@
<span
v-if="
row.shipmentType === 0 &&
row.replaceShipment !== 0 &&
['CREATE_LOGISTICS', 'WAIT_SHIPMENT'].includes(status)
"
class="operate-item"
......@@ -1805,6 +1871,8 @@
</span>
<span
v-if="
row.shipmentType !== 0 &&
row.replaceShipment !== 0 &&
(status === 'IN_TRANSIT' || status === 'COMPLETE') &&
isPermissionBtn('TRACK')
"
......@@ -3198,9 +3266,11 @@ const handleDownload = async (row: PodUsOrderListData) => {
const type = row.url && row.tiffUrl ? 'tiff' : row.url ? 'png' : 'tiff'
try {
const url =
type === 'png'
? filePath + row.url
: `https://ps.jomalls.com/tiff/` + row.tiffUrl
type === 'tiff'
? row.tiffUrl?.startsWith('/temp')
? `https://factory.jomalls.com/upload/factory` + row.tiffUrl
: `https://ps.jomalls.com/tiff/` + row.tiffUrl
: filePath + row.url
if (type === 'tiff') {
window.open(url, '_blank')
......@@ -3264,6 +3334,9 @@ const handleBatchDelete = async (type: string, id?: string) => {
loading.close()
}
}
const shipmentList = ref(['自有物流', '工厂物流'])
// 批量下载 重新排版
const handleReComposingDesign = async () => {
const row = { ...(typesettingRow.value as PodUsOrderListData) }
......@@ -3944,7 +4017,9 @@ const downloadTif = async (type: string, templateWidth: number) => {
)
const url =
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
if (type === 'tiff') {
window.open(url, '_blank')
......@@ -4073,6 +4148,39 @@ const downloadFile = async (url: string, message: string) => {
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 row = { ...(typesettingRow.value as PodUsOrderListData) }
// const loading = ElLoading.service({
......@@ -4568,7 +4676,8 @@ const downloadMaterial = async () => {
if (
status.value === 'IN_PRODUCTION' ||
status.value === 'PICKING' ||
status.value === 'TO_BE_REPLENISHMENT'
status.value === 'TO_BE_REPLENISHMENT' ||
status.value === 'TO_BE_ARRANGE'
) {
selectedIds = cardSelection.value
.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