Commit abc9c623 by wusiyi

Merge branch 'dev'

parents 7cd30234 b8e6fad6
......@@ -128,13 +128,19 @@
</el-select>
</ElFormItem>
<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="multiple">多面</el-radio-button>
</el-radio-group>
</ElFormItem>
<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="true">多件</el-radio-button>
</el-radio-group>
......@@ -356,7 +362,7 @@
<ElFormItem>
<span>
<ElButton link style="font-size: 12px" @click="resetSearchForm"
><span title="重置查询条件">重置</span></ElButton
><span title="重置查询条件">重置</span></ElButton
>
</span>
</ElFormItem>
......@@ -384,32 +390,26 @@
<ElDropdownItem
:loading="tifDownloadLoading"
@click="downloadTif('tiff', 42)"
>TIF(40+2cm)
</ElDropdownItem
>
>TIF(40+2cm)
</ElDropdownItem>
<ElDropdownItem
:loading="tifDownloadLoading"
@click="downloadTif('tiff', 60)"
>TIF(60cm)
</ElDropdownItem
>
>TIF(60cm)
</ElDropdownItem>
<ElDropdownItem
:loading="pngDownloadLoading"
@click="downloadTif('png', 42)"
>PNG(40+2cm)
</ElDropdownItem
>
>PNG(40+2cm)
</ElDropdownItem>
<ElDropdownItem
:loading="pngDownloadLoading"
@click="downloadTif('png', 60)"
>PNG(60cm)
</ElDropdownItem
>
>PNG(60cm)
</ElDropdownItem>
</ElDropdownMenu>
</template
>
</ElDropdown
>
</template>
</ElDropdown>
</ElFormItem>
<ElFormItem>
<!-- <span
......@@ -549,7 +549,7 @@
</span>
<span v-if="status === 'WAIT_SHIPMENT'" class="item">
<ElButton type="primary" @click="completeDelivery()"
>完成发货</ElButton
>完成发货</ElButton
>
</span>
<span
......@@ -587,7 +587,7 @@
selection.some((item) => item.shipmentType !== 1)
"
@click="getOrderByIdApi('createLogisticsOrder')"
>创建物流订单</ElDropdownItem
>创建物流订单</ElDropdownItem
>
<ElDropdownItem
:disabled="
......@@ -595,7 +595,7 @@
selection.some((item) => item.shipmentType !== 1)
"
@click="getOrderByIdApi('getTrackingNumber')"
>获取跟踪号</ElDropdownItem
>获取跟踪号</ElDropdownItem
>
<ElDropdownItem
:disabled="
......@@ -603,7 +603,7 @@
selection.some((item) => item.shipmentType !== 1)
"
@click="getOrderByIdApi('getPrintOrder')"
>获取打印面单</ElDropdownItem
>获取打印面单</ElDropdownItem
>
<ElDropdownItem
:disabled="
......@@ -611,7 +611,7 @@
selection.some((item) => item.shipmentType !== 1)
"
@click="getOrderByIdApi('cancelLogisticsOrder')"
>取消物流订单</ElDropdownItem
>取消物流订单</ElDropdownItem
>
</ElDropdownMenu>
</template>
......@@ -633,7 +633,7 @@
class="item"
>
<ElButton type="primary" @click="downloadMaterial"
>下载素材</ElButton
>下载素材</ElButton
>
</span>
<span
......@@ -691,17 +691,8 @@
刷新商品信息
</ElButton>
</span>
<span
v-if="
[
'WAIT_SHIPMENT',
].includes(status)
"
class="item"
>
<ElButton type="primary" @click="printNormal">
普货拣货
</ElButton>
<span v-if="['WAIT_SHIPMENT'].includes(status)" class="item">
<ElButton type="primary" @click="printNormal"> 普货拣货 </ElButton>
</span>
<span
v-if="
......@@ -724,7 +715,7 @@
selection.length === 0 && cardSelection.length === 0
"
@click="rejectOrder('TO_BE_CONFIRMED')"
>待确认</ElDropdownItem
>待确认</ElDropdownItem
>
<ElDropdownItem
v-if="
......@@ -736,7 +727,7 @@
selection.length === 0 && cardSelection.length === 0
"
@click="rejectOrder('CREATE_LOGISTICS')"
>待创建物流</ElDropdownItem
>待创建物流</ElDropdownItem
>
<ElDropdownItem
v-if="status === 'PICKING' || status === 'IN_PRODUCTION'"
......@@ -744,7 +735,7 @@
selection.length === 0 && cardSelection.length === 0
"
@click="rejectOrder('TO_BE_ARRANGE')"
>待排单</ElDropdownItem
>待排单</ElDropdownItem
>
<ElDropdownItem
v-if="status === 'IN_PRODUCTION'"
......@@ -752,7 +743,7 @@
selection.length === 0 && cardSelection.length === 0
"
@click="rejectOrder('PICKING')"
>待拣胚</ElDropdownItem
>待拣胚</ElDropdownItem
>
</ElDropdownMenu>
</template>
......@@ -769,12 +760,12 @@
:loading="exportLoading"
type="success"
@click="exportData"
>导出</ElButton
>导出</ElButton
>
</span>
<span v-if="status === 'BATCH_DOWNLOAD'" class="item">
<ElButton type="danger" @click="handleBatchDelete('batch')"
>批量删除</ElButton
>批量删除</ElButton
>
</span>
</ElFormItem>
......@@ -795,7 +786,7 @@
:class="{
blue: true,
}"
>{{ item.quantity && item.quantity > 0 ? item.quantity : 0 }}</span
>{{ item.quantity && item.quantity > 0 ? item.quantity : 0 }}</span
>
</div>
</div>
......@@ -850,7 +841,7 @@
<span
v-if="interceptionStatus.production['0']"
class="tabs-node_count blue"
>{{ interceptionStatus.production['0'] }}</span
>{{ interceptionStatus.production['0'] }}</span
>
</div>
<div
......@@ -862,7 +853,7 @@
<span
v-if="interceptionStatus.production['1']"
class="tabs-node_count blue"
>{{ interceptionStatus.production['1'] }}</span
>{{ interceptionStatus.production['1'] }}</span
>
</div>
<div
......@@ -874,7 +865,7 @@
<span
v-if="interceptionStatus.production['2']"
class="tabs-node_count red"
>{{ interceptionStatus.production['2'] }}</span
>{{ interceptionStatus.production['2'] }}</span
>
</div>
<div
......@@ -886,7 +877,7 @@
<span
v-if="interceptionStatus.shipment['0']"
class="tabs-node_count blue"
>{{ interceptionStatus.shipment['0'] }}</span
>{{ interceptionStatus.shipment['0'] }}</span
>
</div>
<div
......@@ -898,7 +889,7 @@
<span
v-if="interceptionStatus.shipment['1']"
class="tabs-node_count blue"
>{{ interceptionStatus.shipment['1'] }}</span
>{{ interceptionStatus.shipment['1'] }}</span
>
</div>
<div
......@@ -910,7 +901,7 @@
<span
v-if="interceptionStatus.shipment['2']"
class="tabs-node_count red"
>{{ interceptionStatus.shipment['2'] }}</span
>{{ interceptionStatus.shipment['2'] }}</span
>
</div>
</div>
......@@ -970,7 +961,9 @@
style="display: flex; flex-direction: column"
>
<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"
style="text-align: center"
>
......@@ -1087,7 +1080,7 @@
</div>
<div class="goods-item-info-item">
<span class="goods-item-info-item-label"
>第三方生产单号:</span
>第三方生产单号:</span
>
<span
class="goods-item-info-item-value"
......@@ -1129,7 +1122,7 @@
>
<!-- <span class="goods-item-info-item-label">补胚状态:</span> -->
<el-tag size="small" effect="dark" type="danger"
>补胚中
>补胚中
</el-tag>
</div>
</div>
......@@ -1142,7 +1135,7 @@
</div> -->
<div class="goods-item-info-item">
<span class="goods-item-info-item-label"
>模板单价¥:</span
>模板单价¥:</span
>
<span class="goods-item-info-item-value">
{{ item.templatePrice }}
......@@ -1150,7 +1143,7 @@
</div>
<div class="goods-item-info-item">
<span class="goods-item-info-item-label"
>工艺单价¥:</span
>工艺单价¥:</span
>
<span class="goods-item-info-item-value">
{{ item.craftPrice }}
......@@ -1158,7 +1151,7 @@
</div>
<div class="goods-item-info-item">
<span class="goods-item-info-item-label"
>单件价格¥:</span
>单件价格¥:</span
>
<span class="goods-item-info-item-value">
{{ calculatedPrice(item) }}
......@@ -1167,13 +1160,13 @@
<div class="goods-item-info-item">
<span class="goods-item-info-item-label">{{
status === 'PICKING' ||
status === 'TO_BE_CONFIRMED' ||
status === 'STOCK_OUT' ||
status === 'CREATE_LOGISTICS'
? '数量:'
: '已生产数量:'
}}</span>
status === 'PICKING' ||
status === 'TO_BE_CONFIRMED' ||
status === 'STOCK_OUT' ||
status === 'CREATE_LOGISTICS'
? '数量:'
: '已生产数量:'
}}</span>
<span class="goods-item-info-item-value">
{{
status === 'PICKING' ||
......@@ -1197,12 +1190,15 @@
{{ item.replenishmentSumNum || 0 }}
</span>
<el-button
v-if="status === 'WAIT_SHIPMENT' && item.productMark!=='normal'"
v-if="
status === 'WAIT_SHIPMENT' &&
item.productMark !== 'normal'
"
link
size="small"
type="success"
@click="applyForReplenishment(item)"
>申请补胚
>申请补胚
</el-button>
<!-- f -->
</div>
......@@ -1215,13 +1211,16 @@
{{ item.weight }}g
</span>
<el-button
v-if="status === 'WAIT_SHIPMENT' && item.productMark!=='normal'"
v-if="
status === 'WAIT_SHIPMENT' &&
item.productMark !== 'normal'
"
link
size="small"
type="warning"
style="height: 23px; margin: 0"
@click="showArrange(3, item)"
>排版
>排版
</el-button>
</div>
</div>
......@@ -1443,17 +1442,17 @@
<el-timeline-item
:color="row.createTime ? '#409EFF' : ''"
:timestamp="row.createTime"
>创建时间
>创建时间
</el-timeline-item>
<el-timeline-item
:color="row.startStockingTime ? '#E6A23C' : ''"
:timestamp="row.startStockingTime"
>确认时间
>确认时间
</el-timeline-item>
<el-timeline-item
:color="row.finishTime ? '#67C23A' : ''"
:timestamp="row.finishTime"
>完成时间
>完成时间
</el-timeline-item>
</el-timeline>
<!-- <div class="order-time-box">
......@@ -1713,9 +1712,8 @@
type="primary"
:title="item.name || ''"
style="margin-bottom: 2px"
>{{ item.name || '' }}
</el-tag
>
>{{ item.name || '' }}
</el-tag>
</div>
</template>
<div
......@@ -1732,8 +1730,8 @@
:key="index"
size="small"
type="primary"
><span
style="
><span
style="
width: 50px;
text-align: center;
overflow: hidden;
......@@ -1741,17 +1739,16 @@
text-overflow: ellipsis;
display: inline-block;
"
:title="item.name || ''"
>{{ item.name || '' }}</span
></el-tag
:title="item.name || ''"
>{{ item.name || '' }}</span
></el-tag
>
<el-tag
v-if="cardItem.customTagList?.slice(3)?.length"
size="small"
type="primary"
>+{{ cardItem.customTagList.slice(3).length }}
</el-tag
>
>+{{ cardItem.customTagList.slice(3).length }}
</el-tag>
</div>
</el-tooltip>
</template>
......@@ -1805,7 +1802,7 @@
</template>
<template #images>
<div class="flex-between">
<div v-if="cardItem.imageAry " class="images-position">
<div v-if="cardItem.imageAry" class="images-position">
<div
v-for="(item, index) in JSON.parse(
cardItem.imageAry || '',
......@@ -1857,7 +1854,7 @@
:title="`商品名称:${cardItem?.productName || ''}`"
>
<span class="grid-item-value"
>{{ cardItem?.productName }}
>{{ cardItem?.productName }}
</span>
</div>
<div
......@@ -1991,7 +1988,7 @@
</div>
<div v-if="cardItem.isReplenishment" class="grid-item">
<el-tag size="small" type="danger" effect="dark"
>补胚中
>补胚中
</el-tag>
</div>
</div>
......@@ -2004,10 +2001,10 @@
<div class="pagination">
<div class="total">
<span
>已选择
>已选择
<span style="color: red">{{
selection.length || cardSelection.length
}}</span>
selection.length || cardSelection.length
}}</span>
条数据</span
>
</div>
......@@ -2024,15 +2021,15 @@
></ElPagination>
<div class="pageSize">
<span
>自定义条数
>自定义条数
<span
><el-input
v-model="pageSize"
type="number"
style="width: 100px"
clearable
@blur="inputBlur"
></el-input
><el-input
v-model="pageSize"
type="number"
style="width: 100px"
clearable
@blur="inputBlur"
></el-input
></span>
/</span
>
......@@ -2435,9 +2432,8 @@
typesettingVisible = false
}
"
>取消
</el-button
>
>取消
</el-button>
<el-button type="primary" @click="submitTypesetting">确认</el-button>
</template>
</ElDialog>
......@@ -2503,7 +2499,8 @@ import {
printPickPdfByBatchNumberApi,
printProductionPdfByBatchNumberApi,
batchDownloadRecomposingApi,
getCustomTagListCnApi, printNormalPdf,
getCustomTagListCnApi,
printNormalPdf,
} from '@/api/podCnOrder'
import { BaseRespData } from '@/types/api'
......@@ -2557,7 +2554,7 @@ import {
declare global {
interface Window {
ActiveXObject: {
new(type: string): XMLHttpRequest
new (type: string): XMLHttpRequest
}
VBS_BinaryToArray: {
(data: unknown): { toArray(): number[] }
......@@ -2679,13 +2676,16 @@ const productMarkList = [
{
label: '普通商品',
value: 'normal',
}, {
},
{
label: 'pod商品',
value: 'pod',
}, {
},
{
label: '一件定制局部印',
value: 'custom_part',
}, {
},
{
label: '一件定制满印',
value: 'custom_full',
},
......@@ -2886,8 +2886,9 @@ const printNormal = async () => {
if (!selection.value.length) {
return ElMessage.warning('请选择订单')
}
selection.value.forEach(s => {
const f = s.productList && s.productList.find(p => p.productMark === 'normal')
selection.value.forEach((s) => {
const f =
s.productList && s.productList.find((p) => p.productMark === 'normal')
if (f) arr.push(s.id)
})
if (!arr.length) {
......@@ -3064,8 +3065,8 @@ const interceptChange = async (status: boolean) => {
? 1
: 3
: interceptCurrent.value === 1
? 2
: 4
? 2
: 4
try {
const res = await interceptUpdateApi({
orderIds: selection.value.map((item) => item.id),
......@@ -3106,8 +3107,8 @@ const rejectOrder = async (type: string) => {
orderStatus: type,
productList: selection.value.length
? selection.value.flatMap(
(item: PodCnOrderListData) => item.productList || [],
)
(item: PodCnOrderListData) => item.productList || [],
)
: cardSelection.value,
reasonStr: value,
})
......@@ -3818,8 +3819,8 @@ const downloadTif = async (type: string, templateWidth: number) => {
a.href = window.URL.createObjectURL(blob)
a.target = '_blank'
a.download = (res.message as string).split('/')[
(res.message as string).split('/').length - 1
]
(res.message as string).split('/').length - 1
]
a.click()
pngDownloadLoading.value = false
})
......@@ -3883,8 +3884,10 @@ const downloadSingleType = async (
const res = await composingDesignImages([id], type, templateWidth)
const isTiff = type === 'tiff'
const url = isTiff
? `https://ps.jomalls.com/tiff/${res.message}`
: `${filePath}${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 (isTiff) {
// 对于tiff类型,直接在新窗口打开
......@@ -3903,7 +3906,9 @@ const handleRadioGroupClick = (event: Event) => {
const radioButton = target.closest('.el-radio-button')
if (radioButton) {
const input = radioButton.querySelector('input[type="radio"]') as HTMLInputElement
const input = radioButton.querySelector(
'input[type="radio"]',
) as HTMLInputElement
if (input) {
const value = input.value
if (searchForm.value.customizedQuantity === value) {
......@@ -3920,7 +3925,9 @@ const handleMultiRadioGroupClick = (event: Event) => {
const radioButton = target.closest('.el-radio-button')
if (radioButton) {
const input = radioButton.querySelector('input[type="radio"]') as HTMLInputElement
const input = radioButton.querySelector(
'input[type="radio"]',
) as HTMLInputElement
if (input) {
const value = input.value === 'true' ? true : false
if (searchForm.value.multi === value) {
......
......@@ -131,7 +131,7 @@
</el-radio-group>
</ElFormItem>
<ElFormItem label="数量">
<el-radio-group
<el-radio-group
v-model="searchForm.multi"
@click.stop="(e: Event) => handleMultiRadioGroupClick(e)"
>
......@@ -4103,8 +4103,10 @@ const downloadSingleType = async (
const res = await composingDesignImages([id], type, templateWidth)
const isTiff = type === 'tiff'
const url = isTiff
? `https://ps.jomalls.com/tiff/${res.message}`
: `${filePath}${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 (isTiff) {
// 对于tiff类型,直接在新窗口打开
......@@ -4151,9 +4153,11 @@ const downloadFile = async (url: string, message: string) => {
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
const input = radioButton.querySelector(
'input[type="radio"]',
) as HTMLInputElement
if (input) {
const value = input.value
if (searchForm.value.customizedQuantity === value) {
......@@ -4168,9 +4172,11 @@ const handleRadioGroupClick = (event: Event) => {
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
const input = radioButton.querySelector(
'input[type="radio"]',
) as HTMLInputElement
if (input) {
const value = input.value === 'true' ? true : false
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