Commit b8e6fad6 by wusiyi

feat: 修改tiff文件打开链接

parent c75f478c
...@@ -128,13 +128,19 @@ ...@@ -128,13 +128,19 @@
</el-select> </el-select>
</ElFormItem> </ElFormItem>
<ElFormItem label="类型"> <ElFormItem label="类型">
<el-radio-group v-model="searchForm.customizedQuantity" @click.stop="(e: Event) => handleRadioGroupClick(e)"> <el-radio-group
v-model="searchForm.customizedQuantity"
@click.stop="(e: Event) => handleRadioGroupClick(e)"
>
<el-radio-button value="single">单面</el-radio-button> <el-radio-button value="single">单面</el-radio-button>
<el-radio-button value="multiple">多面</el-radio-button> <el-radio-button value="multiple">多面</el-radio-button>
</el-radio-group> </el-radio-group>
</ElFormItem> </ElFormItem>
<ElFormItem label="数量"> <ElFormItem label="数量">
<el-radio-group v-model="searchForm.multi" @click.stop="(e: Event) => handleMultiRadioGroupClick(e)"> <el-radio-group
v-model="searchForm.multi"
@click.stop="(e: Event) => handleMultiRadioGroupClick(e)"
>
<el-radio-button :value="false">单件</el-radio-button> <el-radio-button :value="false">单件</el-radio-button>
<el-radio-button :value="true">多件</el-radio-button> <el-radio-button :value="true">多件</el-radio-button>
</el-radio-group> </el-radio-group>
...@@ -385,31 +391,25 @@ ...@@ -385,31 +391,25 @@
:loading="tifDownloadLoading" :loading="tifDownloadLoading"
@click="downloadTif('tiff', 42)" @click="downloadTif('tiff', 42)"
>TIF(40+2cm) >TIF(40+2cm)
</ElDropdownItem </ElDropdownItem>
>
<ElDropdownItem <ElDropdownItem
:loading="tifDownloadLoading" :loading="tifDownloadLoading"
@click="downloadTif('tiff', 60)" @click="downloadTif('tiff', 60)"
>TIF(60cm) >TIF(60cm)
</ElDropdownItem </ElDropdownItem>
>
<ElDropdownItem <ElDropdownItem
:loading="pngDownloadLoading" :loading="pngDownloadLoading"
@click="downloadTif('png', 42)" @click="downloadTif('png', 42)"
>PNG(40+2cm) >PNG(40+2cm)
</ElDropdownItem </ElDropdownItem>
>
<ElDropdownItem <ElDropdownItem
:loading="pngDownloadLoading" :loading="pngDownloadLoading"
@click="downloadTif('png', 60)" @click="downloadTif('png', 60)"
>PNG(60cm) >PNG(60cm)
</ElDropdownItem </ElDropdownItem>
>
</ElDropdownMenu> </ElDropdownMenu>
</template </template>
> </ElDropdown>
</ElDropdown
>
</ElFormItem> </ElFormItem>
<ElFormItem> <ElFormItem>
<!-- <span <!-- <span
...@@ -691,17 +691,8 @@ ...@@ -691,17 +691,8 @@
刷新商品信息 刷新商品信息
</ElButton> </ElButton>
</span> </span>
<span <span v-if="['WAIT_SHIPMENT'].includes(status)" class="item">
v-if=" <ElButton type="primary" @click="printNormal"> 普货拣货 </ElButton>
[
'WAIT_SHIPMENT',
].includes(status)
"
class="item"
>
<ElButton type="primary" @click="printNormal">
普货拣货
</ElButton>
</span> </span>
<span <span
v-if=" v-if="
...@@ -970,7 +961,9 @@ ...@@ -970,7 +961,9 @@
style="display: flex; flex-direction: column" style="display: flex; flex-direction: column"
> >
<div <div
v-for="img in item.productMark!=='normal' ?item.previewImgs:[{url:item.variantImage}]" v-for="img in item.productMark !== 'normal'
? item.previewImgs
: [{ url: item.variantImage }]"
:key="img" :key="img"
style="text-align: center" style="text-align: center"
> >
...@@ -1197,7 +1190,10 @@ ...@@ -1197,7 +1190,10 @@
{{ item.replenishmentSumNum || 0 }} {{ item.replenishmentSumNum || 0 }}
</span> </span>
<el-button <el-button
v-if="status === 'WAIT_SHIPMENT' && item.productMark!=='normal'" v-if="
status === 'WAIT_SHIPMENT' &&
item.productMark !== 'normal'
"
link link
size="small" size="small"
type="success" type="success"
...@@ -1215,7 +1211,10 @@ ...@@ -1215,7 +1211,10 @@
{{ item.weight }}g {{ item.weight }}g
</span> </span>
<el-button <el-button
v-if="status === 'WAIT_SHIPMENT' && item.productMark!=='normal'" v-if="
status === 'WAIT_SHIPMENT' &&
item.productMark !== 'normal'
"
link link
size="small" size="small"
type="warning" type="warning"
...@@ -1714,8 +1713,7 @@ ...@@ -1714,8 +1713,7 @@
:title="item.name || ''" :title="item.name || ''"
style="margin-bottom: 2px" style="margin-bottom: 2px"
>{{ item.name || '' }} >{{ item.name || '' }}
</el-tag </el-tag>
>
</div> </div>
</template> </template>
<div <div
...@@ -1750,8 +1748,7 @@ ...@@ -1750,8 +1748,7 @@
size="small" size="small"
type="primary" type="primary"
>+{{ cardItem.customTagList.slice(3).length }} >+{{ cardItem.customTagList.slice(3).length }}
</el-tag </el-tag>
>
</div> </div>
</el-tooltip> </el-tooltip>
</template> </template>
...@@ -1805,7 +1802,7 @@ ...@@ -1805,7 +1802,7 @@
</template> </template>
<template #images> <template #images>
<div class="flex-between"> <div class="flex-between">
<div v-if="cardItem.imageAry " class="images-position"> <div v-if="cardItem.imageAry" class="images-position">
<div <div
v-for="(item, index) in JSON.parse( v-for="(item, index) in JSON.parse(
cardItem.imageAry || '', cardItem.imageAry || '',
...@@ -2436,8 +2433,7 @@ ...@@ -2436,8 +2433,7 @@
} }
" "
>取消 >取消
</el-button </el-button>
>
<el-button type="primary" @click="submitTypesetting">确认</el-button> <el-button type="primary" @click="submitTypesetting">确认</el-button>
</template> </template>
</ElDialog> </ElDialog>
...@@ -2503,7 +2499,8 @@ import { ...@@ -2503,7 +2499,8 @@ import {
printPickPdfByBatchNumberApi, printPickPdfByBatchNumberApi,
printProductionPdfByBatchNumberApi, printProductionPdfByBatchNumberApi,
batchDownloadRecomposingApi, batchDownloadRecomposingApi,
getCustomTagListCnApi, printNormalPdf, getCustomTagListCnApi,
printNormalPdf,
} from '@/api/podCnOrder' } from '@/api/podCnOrder'
import { BaseRespData } from '@/types/api' import { BaseRespData } from '@/types/api'
...@@ -2557,7 +2554,7 @@ import { ...@@ -2557,7 +2554,7 @@ import {
declare global { declare global {
interface Window { interface Window {
ActiveXObject: { ActiveXObject: {
new(type: string): XMLHttpRequest new (type: string): XMLHttpRequest
} }
VBS_BinaryToArray: { VBS_BinaryToArray: {
(data: unknown): { toArray(): number[] } (data: unknown): { toArray(): number[] }
...@@ -2679,13 +2676,16 @@ const productMarkList = [ ...@@ -2679,13 +2676,16 @@ const productMarkList = [
{ {
label: '普通商品', label: '普通商品',
value: 'normal', value: 'normal',
}, { },
{
label: 'pod商品', label: 'pod商品',
value: 'pod', value: 'pod',
}, { },
{
label: '一件定制局部印', label: '一件定制局部印',
value: 'custom_part', value: 'custom_part',
}, { },
{
label: '一件定制满印', label: '一件定制满印',
value: 'custom_full', value: 'custom_full',
}, },
...@@ -2886,8 +2886,9 @@ const printNormal = async () => { ...@@ -2886,8 +2886,9 @@ const printNormal = async () => {
if (!selection.value.length) { if (!selection.value.length) {
return ElMessage.warning('请选择订单') return ElMessage.warning('请选择订单')
} }
selection.value.forEach(s => { selection.value.forEach((s) => {
const f = s.productList && s.productList.find(p => p.productMark === 'normal') const f =
s.productList && s.productList.find((p) => p.productMark === 'normal')
if (f) arr.push(s.id) if (f) arr.push(s.id)
}) })
if (!arr.length) { if (!arr.length) {
...@@ -3883,8 +3884,10 @@ const downloadSingleType = async ( ...@@ -3883,8 +3884,10 @@ const downloadSingleType = async (
const res = await composingDesignImages([id], type, templateWidth) const res = await composingDesignImages([id], type, templateWidth)
const isTiff = type === 'tiff' const isTiff = type === 'tiff'
const url = isTiff const url = isTiff
? `https://ps.jomalls.com/tiff/${res.message}` ? res.message?.startsWith('/temp')
: `${filePath}${res.message}` ? `https://factory.jomalls.com/upload/factory` + res.message
: `https://ps.jomalls.com/tiff/` + res.message
: filePath + res.message
if (isTiff) { if (isTiff) {
// 对于tiff类型,直接在新窗口打开 // 对于tiff类型,直接在新窗口打开
...@@ -3903,7 +3906,9 @@ const handleRadioGroupClick = (event: Event) => { ...@@ -3903,7 +3906,9 @@ const handleRadioGroupClick = (event: Event) => {
const radioButton = target.closest('.el-radio-button') const radioButton = target.closest('.el-radio-button')
if (radioButton) { if (radioButton) {
const input = radioButton.querySelector('input[type="radio"]') as HTMLInputElement const input = radioButton.querySelector(
'input[type="radio"]',
) as HTMLInputElement
if (input) { if (input) {
const value = input.value const value = input.value
if (searchForm.value.customizedQuantity === value) { if (searchForm.value.customizedQuantity === value) {
...@@ -3920,7 +3925,9 @@ const handleMultiRadioGroupClick = (event: Event) => { ...@@ -3920,7 +3925,9 @@ const handleMultiRadioGroupClick = (event: Event) => {
const radioButton = target.closest('.el-radio-button') const radioButton = target.closest('.el-radio-button')
if (radioButton) { if (radioButton) {
const input = radioButton.querySelector('input[type="radio"]') as HTMLInputElement const input = radioButton.querySelector(
'input[type="radio"]',
) as HTMLInputElement
if (input) { if (input) {
const value = input.value === 'true' ? true : false const value = input.value === 'true' ? true : false
if (searchForm.value.multi === value) { if (searchForm.value.multi === value) {
......
...@@ -4103,8 +4103,10 @@ const downloadSingleType = async ( ...@@ -4103,8 +4103,10 @@ const downloadSingleType = async (
const res = await composingDesignImages([id], type, templateWidth) const res = await composingDesignImages([id], type, templateWidth)
const isTiff = type === 'tiff' const isTiff = type === 'tiff'
const url = isTiff const url = isTiff
? `https://ps.jomalls.com/tiff/${res.message}` ? res.message?.startsWith('/temp')
: `${filePath}${res.message}` ? `https://factory.jomalls.com/upload/factory` + res.message
: `https://ps.jomalls.com/tiff/` + res.message
: filePath + res.message
if (isTiff) { if (isTiff) {
// 对于tiff类型,直接在新窗口打开 // 对于tiff类型,直接在新窗口打开
...@@ -4153,7 +4155,9 @@ const handleRadioGroupClick = (event: Event) => { ...@@ -4153,7 +4155,9 @@ const handleRadioGroupClick = (event: Event) => {
const radioButton = target.closest('.el-radio-button') const radioButton = target.closest('.el-radio-button')
if (radioButton) { if (radioButton) {
const input = radioButton.querySelector('input[type="radio"]') as HTMLInputElement const input = radioButton.querySelector(
'input[type="radio"]',
) as HTMLInputElement
if (input) { if (input) {
const value = input.value const value = input.value
if (searchForm.value.customizedQuantity === value) { if (searchForm.value.customizedQuantity === value) {
...@@ -4170,7 +4174,9 @@ const handleMultiRadioGroupClick = (event: Event) => { ...@@ -4170,7 +4174,9 @@ const handleMultiRadioGroupClick = (event: Event) => {
const radioButton = target.closest('.el-radio-button') const radioButton = target.closest('.el-radio-button')
if (radioButton) { if (radioButton) {
const input = radioButton.querySelector('input[type="radio"]') as HTMLInputElement const input = radioButton.querySelector(
'input[type="radio"]',
) as HTMLInputElement
if (input) { if (input) {
const value = input.value === 'true' ? true : false const value = input.value === 'true' ? true : false
if (searchForm.value.multi === value) { if (searchForm.value.multi === value) {
......
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