Commit 123e06cb by qinjianhui

Merge branch 'dev' into 'master'

Dev

See merge request !111
parents c43da699 8a280ddb
...@@ -72,6 +72,7 @@ declare module 'vue' { ...@@ -72,6 +72,7 @@ declare module 'vue' {
SplitDiv: typeof import('./src/components/splitDiv/splitDiv.vue')['default'] SplitDiv: typeof import('./src/components/splitDiv/splitDiv.vue')['default']
'Switch ': typeof import('./src/components/Form/Switch .vue')['default'] 'Switch ': typeof import('./src/components/Form/Switch .vue')['default']
TableView: typeof import('./src/components/TableView.vue')['default'] TableView: typeof import('./src/components/TableView.vue')['default']
UploadBox: typeof import('./src/components/uploadBox.vue')['default']
UploadExcel: typeof import('./src/components/UploadExcel.vue')['default'] UploadExcel: typeof import('./src/components/UploadExcel.vue')['default']
UploadImage: typeof import('./src/components/UploadImage.vue')['default'] UploadImage: typeof import('./src/components/UploadImage.vue')['default']
WangEditor: typeof import('./src/components/WangEditor.vue')['default'] WangEditor: typeof import('./src/components/WangEditor.vue')['default']
......
...@@ -4,7 +4,7 @@ import { showError } from '@/utils/ui.ts' ...@@ -4,7 +4,7 @@ import { showError } from '@/utils/ui.ts'
const axios = Axios.create({ const axios = Axios.create({
baseURL: import.meta.env.VITE_API_BASE, baseURL: import.meta.env.VITE_API_BASE,
timeout: 30 * 60 * 1000, //半小时 timeout: 60 * 60 * 1000, //半小时
}) })
const TOKEN_KEY = 'token' const TOKEN_KEY = 'token'
......
<template>
<div class="upload-list-container">
<div class="list-header" @click="toggleFn">
<div>上传列表 ({{ props.uploadList.length || 0 }})</div>
<span
class="toggle-icon"
:style="{ transform: isExpanded ? 'rotate(0deg)' : 'rotate(-180deg)' }"
>▼</span
>
</div>
<div class="list-content" :class="{ collapsed: !isExpanded }">
<div v-if="!props.uploadList.length" class="upload-item">
暂无上传任务
</div>
<div
v-else
v-for="(upload, index) in props.uploadList"
:key="index"
class="upload-item"
>
<div class="file-name" :title="upload.batchArrangeNum">
批次号:{{ upload.batchArrangeNum }}
</div>
<div class="file-name" :title="upload.fileName">
文件名:{{ upload.fileName }}
</div>
<div
class="file-status"
:class="{ success: !upload.isUpload, loading: upload.isUpload }"
>
{{ upload.isUpload ? '上传中' : '已上传' }}
<el-icon v-if="upload.isUpload" class="is-loading">
<Loading />
</el-icon>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { PodUsOrderListData } from '@/types/api/podUsOrder'
import { PropType } from 'vue'
import { Loading } from '@element-plus/icons-vue'
const props = defineProps({
uploadList: {
type: Array as PropType<PodUsOrderListData[]>,
default: () => [],
},
})
watch(
() => props.uploadList,
(value) => {
console.log(43, value)
},
{ deep: true },
)
const isExpanded = ref(false)
function toggleFn() {
isExpanded.value = !isExpanded.value
}
</script>
<style lang="scss" scoped>
.upload-list-container {
position: fixed;
right: 3%;
bottom: 30px;
width: 400px;
background: white;
border-radius: 12px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
overflow: hidden;
transition: all 0.3s ease;
z-index: 100;
}
.list-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 5px 10px;
background: #4a6ee0;
color: white;
cursor: pointer;
user-select: none;
}
.list-header h2 {
font-size: 18px;
font-weight: 600;
}
.toggle-icon {
font-size: 16px;
transition: transform 0.3s ease;
}
.list-header:hover {
background: #3a5bc7;
}
.list-content.collapsed {
max-height: 0;
opacity: 0;
}
.list-content {
max-height: 300px;
overflow-y: auto;
transition: max-height 0.4s ease, opacity 0.3s ease;
}
.upload-item {
display: flex;
padding: 10px;
border-bottom: 1px solid #f0f0f0;
align-items: center;
justify-content: space-between;
transition: background 0.2s;
gap: 10px;
}
.file-icon {
flex: 1;
}
.file-name {
font-weight: 600;
font-size: 14px;
color: #333;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.file-details {
display: flex;
justify-content: space-between;
font-size: 12px;
color: #777;
}
.success {
color: #67c23a;
}
.loading {
color: #e6a23c;
}
.file-status {
display: flex;
white-space: nowrap;
align-items: center;
}
.status-uploading {
background: #e1f0ff;
color: #0066cc;
}
.progress-bar {
height: 4px;
background: #e0e0e0;
border-radius: 2px;
margin-top: 8px;
overflow: hidden;
}
.progress {
height: 100%;
background: #4a6ee0;
width: 0%;
transition: width 0.3s ease;
}
</style>
...@@ -94,6 +94,8 @@ export interface PodUsOrderListData { ...@@ -94,6 +94,8 @@ export interface PodUsOrderListData {
tiffUrl?: string | null tiffUrl?: string | null
lanshouAddress?: string | null lanshouAddress?: string | null
customTagList?: { name: string }[] customTagList?: { name: string }[]
batchArrangeNum?: string
fileName?: string
} }
export interface ProductList { export interface ProductList {
id: number id: number
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
</ElSelect> </ElSelect>
</ElFormItem> </ElFormItem>
<ElFormItem label="工艺"> <ElFormItem label="工艺">
<LogisticsWaySelect <LogisticsWaySelect
v-model="searchForm.craftCode" v-model="searchForm.craftCode"
...@@ -379,14 +378,14 @@ ...@@ -379,14 +378,14 @@
<ElFormItem> <ElFormItem>
<span> <span>
<ElButton link style="font-size: 12px" @click="resetSearchForm" <ElButton link style="font-size: 12px" @click="resetSearchForm"
><span title="重置查询条件">重置</span></ElButton ><span title="重置查询条件">重置</span></ElButton
> >
</span> </span>
</ElFormItem> </ElFormItem>
<ElFormItem> <ElFormItem>
<span> <span>
<ElButton ref="searchBtnRef" type="primary" @click="search" <ElButton ref="searchBtnRef" type="primary" @click="search"
>查询</ElButton >查询</ElButton
> >
</span> </span>
</ElFormItem> </ElFormItem>
...@@ -409,34 +408,27 @@ ...@@ -409,34 +408,27 @@
<ElDropdownItem <ElDropdownItem
: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
v-if=" v-if="
status === 'PICKING' || status === 'PICKING' ||
...@@ -619,7 +611,7 @@ ...@@ -619,7 +611,7 @@
<ElFormItem v-if="status === 'WAIT_SHIPMENT'"> <ElFormItem v-if="status === 'WAIT_SHIPMENT'">
<span class="item"> <span class="item">
<ElButton type="primary" @click="completeDelivery()" <ElButton type="primary" @click="completeDelivery()"
>完成发货</ElButton >完成发货</ElButton
> >
</span> </span>
</ElFormItem> </ElFormItem>
...@@ -639,7 +631,7 @@ ...@@ -639,7 +631,7 @@
selection.some((item) => item.shipmentType !== 1) selection.some((item) => item.shipmentType !== 1)
" "
@click="getOrderByIdApi('createLogisticsOrder')" @click="getOrderByIdApi('createLogisticsOrder')"
>创建物流订单</ElDropdownItem >创建物流订单</ElDropdownItem
> >
<ElDropdownItem <ElDropdownItem
:disabled=" :disabled="
...@@ -647,7 +639,7 @@ ...@@ -647,7 +639,7 @@
selection.some((item) => item.shipmentType !== 1) selection.some((item) => item.shipmentType !== 1)
" "
@click="getOrderByIdApi('getTrackingNumber')" @click="getOrderByIdApi('getTrackingNumber')"
>获取跟踪号</ElDropdownItem >获取跟踪号</ElDropdownItem
> >
<ElDropdownItem <ElDropdownItem
:disabled=" :disabled="
...@@ -655,7 +647,7 @@ ...@@ -655,7 +647,7 @@
selection.some((item) => item.shipmentType !== 1) selection.some((item) => item.shipmentType !== 1)
" "
@click="getOrderByIdApi('getPrintOrder')" @click="getOrderByIdApi('getPrintOrder')"
>获取打印面单</ElDropdownItem >获取打印面单</ElDropdownItem
> >
<ElDropdownItem <ElDropdownItem
:disabled=" :disabled="
...@@ -663,7 +655,7 @@ ...@@ -663,7 +655,7 @@
selection.some((item) => item.shipmentType !== 1) selection.some((item) => item.shipmentType !== 1)
" "
@click="getOrderByIdApi('cancelLogisticsOrder')" @click="getOrderByIdApi('cancelLogisticsOrder')"
>取消物流订单</ElDropdownItem >取消物流订单</ElDropdownItem
> >
<!-- <ElDropdownItem <!-- <ElDropdownItem
:disabled=" :disabled="
...@@ -700,7 +692,7 @@ ...@@ -700,7 +692,7 @@
> >
<span class="item"> <span class="item">
<ElButton type="primary" @click="downloadMaterial" <ElButton type="primary" @click="downloadMaterial"
>下载素材</ElButton >下载素材</ElButton
> >
</span> </span>
</ElFormItem> </ElFormItem>
...@@ -776,7 +768,7 @@ ...@@ -776,7 +768,7 @@
selection.length === 0 && cardSelection.length === 0 selection.length === 0 && cardSelection.length === 0
" "
@click="rejectOrder('TO_BE_CONFIRMED')" @click="rejectOrder('TO_BE_CONFIRMED')"
>待确认</ElDropdownItem >待确认</ElDropdownItem
> >
<ElDropdownItem <ElDropdownItem
v-if=" v-if="
...@@ -788,7 +780,7 @@ ...@@ -788,7 +780,7 @@
selection.length === 0 && cardSelection.length === 0 selection.length === 0 && cardSelection.length === 0
" "
@click="rejectOrder('CREATE_LOGISTICS')" @click="rejectOrder('CREATE_LOGISTICS')"
>待创建物流</ElDropdownItem >待创建物流</ElDropdownItem
> >
<ElDropdownItem <ElDropdownItem
v-if="status === 'PICKING' || status === 'IN_PRODUCTION'" v-if="status === 'PICKING' || status === 'IN_PRODUCTION'"
...@@ -796,7 +788,7 @@ ...@@ -796,7 +788,7 @@
selection.length === 0 && cardSelection.length === 0 selection.length === 0 && cardSelection.length === 0
" "
@click="rejectOrder('TO_BE_ARRANGE')" @click="rejectOrder('TO_BE_ARRANGE')"
>待排单</ElDropdownItem >待排单</ElDropdownItem
> >
<ElDropdownItem <ElDropdownItem
v-if="status === 'IN_PRODUCTION'" v-if="status === 'IN_PRODUCTION'"
...@@ -804,7 +796,7 @@ ...@@ -804,7 +796,7 @@
selection.length === 0 && cardSelection.length === 0 selection.length === 0 && cardSelection.length === 0
" "
@click="rejectOrder('PICKING')" @click="rejectOrder('PICKING')"
>待拣胚</ElDropdownItem >待拣胚</ElDropdownItem
> >
</ElDropdownMenu> </ElDropdownMenu>
</template> </template>
...@@ -832,11 +824,13 @@ ...@@ -832,11 +824,13 @@
<ElFormItem v-if="status === 'BATCH_DOWNLOAD'"> <ElFormItem v-if="status === 'BATCH_DOWNLOAD'">
<span class="item"> <span class="item">
<ElButton type="danger" @click="handleBatchDelete('batch')" <ElButton type="danger" @click="handleBatchDelete('batch')"
>批量删除</ElButton >批量删除</ElButton
> >
</span> </span>
</ElFormItem> </ElFormItem>
<ElFormItem v-if="['WAIT_TRACK'].includes(status) && waitTrackStatus === 5"> <ElFormItem
v-if="['WAIT_TRACK'].includes(status) && waitTrackStatus === 5"
>
<span class="item"> <span class="item">
<ElButton type="success" @click="reissueOrder">补发</ElButton> <ElButton type="success" @click="reissueOrder">补发</ElButton>
</span> </span>
...@@ -860,7 +854,7 @@ ...@@ -860,7 +854,7 @@
blue: item.quantity && item.quantity > 0, blue: item.quantity && item.quantity > 0,
red: item.status === 'EXCEPTION_ORDER', red: item.status === 'EXCEPTION_ORDER',
}" }"
>{{ item.quantity }}</span >{{ item.quantity }}</span
> >
<span <span
v-if=" v-if="
...@@ -869,9 +863,9 @@ ...@@ -869,9 +863,9 @@
interceptionStatus.shipment['0']) interceptionStatus.shipment['0'])
" "
class="tabs-node-quantity" class="tabs-node-quantity"
>+{{ >+{{
(interceptionStatus.production['0'] || 0) + (interceptionStatus.production['0'] || 0) +
(interceptionStatus.shipment['0'] || 0) || '' (interceptionStatus.shipment['0'] || 0) || ''
}}</span }}</span
> >
</div> </div>
...@@ -908,11 +902,11 @@ ...@@ -908,11 +902,11 @@
@click="handleWaitTrackCommand(1)" @click="handleWaitTrackCommand(1)"
> >
<span class="sub-status-item-label">{{ <span class="sub-status-item-label">{{
trackRegisterCount[0]?.name trackRegisterCount[0]?.name
}}</span> }}</span>
<span class="tabs-node_count">{{ <span class="tabs-node_count">{{
trackRegisterCount[0]?.count || 0 trackRegisterCount[0]?.count || 0
}}</span> }}</span>
</div> </div>
<div <div
class="sub-status-item" class="sub-status-item"
...@@ -920,11 +914,11 @@ ...@@ -920,11 +914,11 @@
@click="handleWaitTrackCommand(2)" @click="handleWaitTrackCommand(2)"
> >
<span class="sub-status-item-label">{{ <span class="sub-status-item-label">{{
trackRegisterCount[1]?.name trackRegisterCount[1]?.name
}}</span> }}</span>
<span class="tabs-node_count blue">{{ <span class="tabs-node_count blue">{{
trackRegisterCount[1]?.count || 0 trackRegisterCount[1]?.count || 0
}}</span> }}</span>
</div> </div>
<div <div
class="sub-status-item" class="sub-status-item"
...@@ -932,11 +926,11 @@ ...@@ -932,11 +926,11 @@
@click="handleWaitTrackCommand(3)" @click="handleWaitTrackCommand(3)"
> >
<span class="sub-status-item-label">{{ <span class="sub-status-item-label">{{
trackRegisterCount[2]?.name trackRegisterCount[2]?.name
}}</span> }}</span>
<span class="tabs-node_count green">{{ <span class="tabs-node_count green">{{
trackRegisterCount[2]?.count || 0 trackRegisterCount[2]?.count || 0
}}</span> }}</span>
</div> </div>
<div <div
class="sub-status-item" class="sub-status-item"
...@@ -944,11 +938,11 @@ ...@@ -944,11 +938,11 @@
@click="handleWaitTrackCommand(4)" @click="handleWaitTrackCommand(4)"
> >
<span class="sub-status-item-label">{{ <span class="sub-status-item-label">{{
trackRegisterCount[3]?.name trackRegisterCount[3]?.name
}}</span> }}</span>
<span class="tabs-node_count yellow">{{ <span class="tabs-node_count yellow">{{
trackRegisterCount[3]?.count || 0 trackRegisterCount[3]?.count || 0
}}</span> }}</span>
</div> </div>
<div <div
class="sub-status-item" class="sub-status-item"
...@@ -956,11 +950,11 @@ ...@@ -956,11 +950,11 @@
@click="handleWaitTrackCommand(5)" @click="handleWaitTrackCommand(5)"
> >
<span class="sub-status-item-label">{{ <span class="sub-status-item-label">{{
trackRegisterCount[4]?.name trackRegisterCount[4]?.name
}}</span> }}</span>
<span class="tabs-node_count red">{{ <span class="tabs-node_count red">{{
trackRegisterCount[4]?.count || 0 trackRegisterCount[4]?.count || 0
}}</span> }}</span>
</div> </div>
</div> </div>
<div v-if="status === 'INTERCEPTED'" class="sub-status mb-10"> <div v-if="status === 'INTERCEPTED'" class="sub-status mb-10">
...@@ -973,7 +967,7 @@ ...@@ -973,7 +967,7 @@
<span <span
v-if="interceptionStatus.production['0']" v-if="interceptionStatus.production['0']"
class="tabs-node_count blue" class="tabs-node_count blue"
>{{ interceptionStatus.production['0'] }}</span >{{ interceptionStatus.production['0'] }}</span
> >
</div> </div>
<div <div
...@@ -985,7 +979,7 @@ ...@@ -985,7 +979,7 @@
<span <span
v-if="interceptionStatus.production['1']" v-if="interceptionStatus.production['1']"
class="tabs-node_count blue" class="tabs-node_count blue"
>{{ interceptionStatus.production['1'] }}</span >{{ interceptionStatus.production['1'] }}</span
> >
</div> </div>
<div <div
...@@ -997,7 +991,7 @@ ...@@ -997,7 +991,7 @@
<span <span
v-if="interceptionStatus.production['2']" v-if="interceptionStatus.production['2']"
class="tabs-node_count red" class="tabs-node_count red"
>{{ interceptionStatus.production['2'] }}</span >{{ interceptionStatus.production['2'] }}</span
> >
</div> </div>
<div <div
...@@ -1009,7 +1003,7 @@ ...@@ -1009,7 +1003,7 @@
<span <span
v-if="interceptionStatus.shipment['0']" v-if="interceptionStatus.shipment['0']"
class="tabs-node_count blue" class="tabs-node_count blue"
>{{ interceptionStatus.shipment['0'] }}</span >{{ interceptionStatus.shipment['0'] }}</span
> >
</div> </div>
<div <div
...@@ -1021,7 +1015,7 @@ ...@@ -1021,7 +1015,7 @@
<span <span
v-if="interceptionStatus.shipment['1']" v-if="interceptionStatus.shipment['1']"
class="tabs-node_count blue" class="tabs-node_count blue"
>{{ interceptionStatus.shipment['1'] }}</span >{{ interceptionStatus.shipment['1'] }}</span
> >
</div> </div>
<div <div
...@@ -1033,7 +1027,7 @@ ...@@ -1033,7 +1027,7 @@
<span <span
v-if="interceptionStatus.shipment['2']" v-if="interceptionStatus.shipment['2']"
class="tabs-node_count red" class="tabs-node_count red"
>{{ interceptionStatus.shipment['2'] }}</span >{{ interceptionStatus.shipment['2'] }}</span
> >
</div> </div>
</div> </div>
...@@ -1232,7 +1226,7 @@ ...@@ -1232,7 +1226,7 @@
</div> </div>
<div class="goods-item-info-item"> <div class="goods-item-info-item">
<span class="goods-item-info-item-label" <span class="goods-item-info-item-label"
>第三方生产单号:</span >第三方生产单号:</span
> >
<span <span
class="goods-item-info-item-value" class="goods-item-info-item-value"
...@@ -1282,14 +1276,14 @@ ...@@ -1282,14 +1276,14 @@
> >
<!-- <span class="goods-item-info-item-label">补胚状态:</span> --> <!-- <span class="goods-item-info-item-label">补胚状态:</span> -->
<el-tag size="small" effect="dark" type="danger" <el-tag size="small" effect="dark" type="danger"
>补胚中 >补胚中
</el-tag> </el-tag>
</div> </div>
</div> </div>
<div class="goods-item-info"> <div class="goods-item-info">
<div class="goods-item-info-item"> <div class="goods-item-info-item">
<span class="goods-item-info-item-label" <span class="goods-item-info-item-label"
>商品单价($):</span >商品单价($):</span
> >
<span class="goods-item-info-item-value"> <span class="goods-item-info-item-value">
{{ item.productPrice }} {{ item.productPrice }}
...@@ -1316,14 +1310,14 @@ ...@@ -1316,14 +1310,14 @@
<div class="goods-item-info-item"> <div class="goods-item-info-item">
<span class="goods-item-info-item-label">{{ <span class="goods-item-info-item-label">{{
status === 'EXCEPTION_ORDER' || status === 'EXCEPTION_ORDER' ||
status === 'PICKING' || status === 'PICKING' ||
status === 'TO_BE_CONFIRMED' || status === 'TO_BE_CONFIRMED' ||
status === 'STOCK_OUT' || status === 'STOCK_OUT' ||
status === 'CREATE_LOGISTICS' status === 'CREATE_LOGISTICS'
? '数量:' ? '数量:'
: '已生产数量:' : '已生产数量:'
}}</span> }}</span>
<span class="goods-item-info-item-value"> <span class="goods-item-info-item-value">
{{ {{
status === 'EXCEPTION_ORDER' || status === 'EXCEPTION_ORDER' ||
...@@ -1394,7 +1388,7 @@ ...@@ -1394,7 +1388,7 @@
type="success" type="success"
style="height: 23px" style="height: 23px"
@click="applyForReplenishment(item)" @click="applyForReplenishment(item)"
>申请补胚 >申请补胚
</el-button> </el-button>
</div> </div>
...@@ -1413,7 +1407,7 @@ ...@@ -1413,7 +1407,7 @@
type="primary" type="primary"
style="height: 23px; padding: 0" style="height: 23px; padding: 0"
@click="downloadMaterialItem(item)" @click="downloadMaterialItem(item)"
>下载素材 >下载素材
</el-button> </el-button>
<el-button <el-button
...@@ -1422,7 +1416,7 @@ ...@@ -1422,7 +1416,7 @@
type="warning" type="warning"
style="height: 23px; margin: 0" style="height: 23px; margin: 0"
@click="showArrange(3, item)" @click="showArrange(3, item)"
>排版 >排版
</el-button> </el-button>
</div> </div>
<div <div
...@@ -1442,7 +1436,7 @@ ...@@ -1442,7 +1436,7 @@
type="success" type="success"
style="height: 23px" style="height: 23px"
@click="printProductionOrder(1, item)" @click="printProductionOrder(1, item)"
>打印生产单 >打印生产单
</el-button> </el-button>
</div> </div>
</div> </div>
...@@ -1542,14 +1536,22 @@ ...@@ -1542,14 +1536,22 @@
</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">订单来源:</span>
<span :class="{'red-big':row.source==='factory-reissue'}" class="order-detail-item-value"> <span
:class="{ 'red-big': row.source === 'factory-reissue' }"
class="order-detail-item-value"
>
{{ {{
row.source row.source
? { ? {
'jomall-erp': 'erp推送', 'jomall-erp': 'erp推送',
'third-party': '第三方推送', 'third-party': '第三方推送',
'factory-reissue': '补发订单', 'factory-reissue': '补发订单',
}[row.source as 'jomall-erp' | 'third-party' | 'factory-reissue'] }[
row.source as
| 'jomall-erp'
| 'third-party'
| 'factory-reissue'
]
: '' : ''
}} }}
</span> </span>
...@@ -1665,17 +1667,17 @@ ...@@ -1665,17 +1667,17 @@
<el-timeline-item <el-timeline-item
:color="row.createTime ? '#409EFF' : ''" :color="row.createTime ? '#409EFF' : ''"
:timestamp="row.createTime" :timestamp="row.createTime"
>创建时间 >创建时间
</el-timeline-item> </el-timeline-item>
<el-timeline-item <el-timeline-item
:color="row.startStockingTime ? '#E6A23C' : ''" :color="row.startStockingTime ? '#E6A23C' : ''"
:timestamp="row.startStockingTime" :timestamp="row.startStockingTime"
>确认时间 >确认时间
</el-timeline-item> </el-timeline-item>
<el-timeline-item <el-timeline-item
:color="row.finishTime ? '#67C23A' : ''" :color="row.finishTime ? '#67C23A' : ''"
:timestamp="row.finishTime" :timestamp="row.finishTime"
>发货时间 >发货时间
</el-timeline-item> </el-timeline-item>
<el-timeline-item <el-timeline-item
v-if="status === 'IN_TRANSIT'" v-if="status === 'IN_TRANSIT'"
...@@ -1761,21 +1763,37 @@ ...@@ -1761,21 +1763,37 @@
</template> </template>
<template #prn="{ row }"> <template #prn="{ row }">
<div style="display: flex"> <div style="display: flex">
<span :title="fileName(row)" class="flex-1">{{ fileName(row) }}</span> <span :title="fileName(row)" class="flex-1">{{
<el-link :disabled="row.isUpload" underline="never" type="success" @click="uploadFile(row)">上传</el-link> fileName(row)
<el-icon v-if="row.isUpload" style="right: 0;top:5px;" class="is-loading" }}</span>
<el-link
:disabled="row.isUpload"
underline="never"
type="success"
@click="uploadFile(row)"
>上传</el-link
> >
<Loading <el-icon
/> v-if="row.isUpload"
style="right: 0; top: 5px"
class="is-loading"
>
<Loading />
</el-icon> </el-icon>
<el-link <el-link
:disabled="!row.prnUrl" style="margin-left: 8px" underline="never" type="primary" :disabled="!row.prnUrl"
@click="downloadRowProFile(row)">下载 style="margin-left: 8px"
underline="never"
type="primary"
@click="downloadRowProFile(row)"
>下载
</el-link> </el-link>
<el-icon v-if="row.prnDownloadStatus" style="right: -2px" class="check-icon" <el-icon
v-if="row.prnDownloadStatus"
style="right: -2px"
class="check-icon"
> >
<CircleCheckFilled <CircleCheckFilled />
/>
</el-icon> </el-icon>
</div> </div>
</template> </template>
...@@ -1807,7 +1825,7 @@ ...@@ -1807,7 +1825,7 @@
下载 下载
</ElButton> </ElButton>
<el-icon v-if="row.downloadStatus" class="check-icon" <el-icon v-if="row.downloadStatus" class="check-icon"
><CircleCheckFilled ><CircleCheckFilled
/></el-icon> /></el-icon>
</span> </span>
<!-- <span class="operate-item"> <!-- <span class="operate-item">
...@@ -1830,7 +1848,7 @@ ...@@ -1830,7 +1848,7 @@
拣货单 拣货单
</ElButton> </ElButton>
<el-icon v-if="row.printPickOrder" class="check-icon" <el-icon v-if="row.printPickOrder" class="check-icon"
><CircleCheckFilled ><CircleCheckFilled
/></el-icon> /></el-icon>
</span> </span>
<span class="operate-item"> <span class="operate-item">
...@@ -1843,7 +1861,7 @@ ...@@ -1843,7 +1861,7 @@
生产单 生产单
</ElButton> </ElButton>
<el-icon v-if="row.printProductOrder" class="check-icon" <el-icon v-if="row.printProductOrder" class="check-icon"
><CircleCheckFilled ><CircleCheckFilled
/></el-icon> /></el-icon>
</span> </span>
<span class="operate-item"> <span class="operate-item">
...@@ -1897,7 +1915,7 @@ ...@@ -1897,7 +1915,7 @@
class="operate-item" class="operate-item"
> >
<ElButton link type="warning" @click="updateTrackingNumber(row)" <ElButton link type="warning" @click="updateTrackingNumber(row)"
>修改跟踪号</ElButton >修改跟踪号</ElButton
> >
</span> </span>
<!-- <span <!-- <span
...@@ -1973,7 +1991,7 @@ ...@@ -1973,7 +1991,7 @@
class="operate-item" class="operate-item"
> >
<ElButton link type="primary" @click="logTrajectory(row)" <ElButton link type="primary" @click="logTrajectory(row)"
>物流轨迹</ElButton >物流轨迹</ElButton
> >
</span> </span>
</div> </div>
...@@ -2044,9 +2062,8 @@ ...@@ -2044,9 +2062,8 @@
type="primary" type="primary"
: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
...@@ -2063,8 +2080,8 @@ ...@@ -2063,8 +2080,8 @@
:key="index" :key="index"
size="small" size="small"
type="primary" type="primary"
><span ><span
style=" style="
width: 50px; width: 50px;
text-align: center; text-align: center;
overflow: hidden; overflow: hidden;
...@@ -2072,17 +2089,16 @@ ...@@ -2072,17 +2089,16 @@
text-overflow: ellipsis; text-overflow: ellipsis;
display: inline-block; display: inline-block;
" "
:title="item.name || ''" :title="item.name || ''"
>{{ item.name || '' }}</span >{{ item.name || '' }}</span
></el-tag ></el-tag
> >
<el-tag <el-tag
v-if="cardItem.customTagList?.slice(3)?.length" v-if="cardItem.customTagList?.slice(3)?.length"
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>
...@@ -2166,7 +2182,7 @@ ...@@ -2166,7 +2182,7 @@
:title="`商品名称:${cardItem?.productName || ''}`" :title="`商品名称:${cardItem?.productName || ''}`"
> >
<span class="grid-item-value" <span class="grid-item-value"
>{{ cardItem?.productName }} >{{ cardItem?.productName }}
</span> </span>
</div> </div>
<div <div
...@@ -2309,7 +2325,7 @@ ...@@ -2309,7 +2325,7 @@
</div> </div>
<div v-if="cardItem.isReplenishment" class="grid-item"> <div v-if="cardItem.isReplenishment" class="grid-item">
<el-tag size="small" type="danger" effect="dark" <el-tag size="small" type="danger" effect="dark"
>补胚中 >补胚中
</el-tag> </el-tag>
</div> </div>
</div> </div>
...@@ -2322,10 +2338,10 @@ ...@@ -2322,10 +2338,10 @@
<div class="pagination"> <div class="pagination">
<div class="total"> <div class="total">
<span <span
>已选择 >已选择
<span style="color: red">{{ <span style="color: red">{{
selection.length || cardSelection.length selection.length || cardSelection.length
}}</span> }}</span>
条数据</span 条数据</span
> >
</div> </div>
...@@ -2342,15 +2358,15 @@ ...@@ -2342,15 +2358,15 @@
></ElPagination> ></ElPagination>
<div class="pageSize"> <div class="pageSize">
<span <span
>自定义条数 >自定义条数
<span <span
><el-input ><el-input
v-model="pageSize" v-model="pageSize"
type="number" type="number"
style="width: 100px" style="width: 100px"
clearable clearable
@blur="inputBlur" @blur="inputBlur"
></el-input ></el-input
></span> ></span>
/</span /</span
> >
...@@ -2462,7 +2478,7 @@ ...@@ -2462,7 +2478,7 @@
link link
style="margin-left: 10px" style="margin-left: 10px"
@click="changeChinaTime('Asia/Shanghai')" @click="changeChinaTime('Asia/Shanghai')"
>北京时间 >北京时间
</el-button> </el-button>
<el-button <el-button
:type="timeType === 'America/New_York' ? 'primary' : ''" :type="timeType === 'America/New_York' ? 'primary' : ''"
...@@ -2470,7 +2486,7 @@ ...@@ -2470,7 +2486,7 @@
link link
style="margin-left: 10px" style="margin-left: 10px"
@click="changeChinaTime('America/New_York')" @click="changeChinaTime('America/New_York')"
>新泽西时间 >新泽西时间
</el-button> </el-button>
<el-button <el-button
:type="timeType === 'America/Los_Angeles' ? 'primary' : ''" :type="timeType === 'America/Los_Angeles' ? 'primary' : ''"
...@@ -2478,7 +2494,7 @@ ...@@ -2478,7 +2494,7 @@
link link
style="margin-left: 10px" style="margin-left: 10px"
@click="changeChinaTime('America/Los_Angeles')" @click="changeChinaTime('America/Los_Angeles')"
>洛杉矶时间 >洛杉矶时间
</el-button> </el-button>
</div> </div>
</div> </div>
...@@ -2777,7 +2793,7 @@ ...@@ -2777,7 +2793,7 @@
:loading="exportLoading" :loading="exportLoading"
type="primary" type="primary"
@click="submitExportForm" @click="submitExportForm"
>确认</el-button >确认</el-button
> >
</span> </span>
</template> </template>
...@@ -2845,9 +2861,8 @@ ...@@ -2845,9 +2861,8 @@
typesettingVisible = false typesettingVisible = false
} }
" "
>取消 >取消
</el-button </el-button>
>
<el-button type="primary" @click="submitTypesetting">确认</el-button> <el-button type="primary" @click="submitTypesetting">确认</el-button>
</template> </template>
</ElDialog> </ElDialog>
...@@ -2890,12 +2905,22 @@ ...@@ -2890,12 +2905,22 @@
<ElButton type="primary" @click="confirmReplenishment">确定</ElButton> <ElButton type="primary" @click="confirmReplenishment">确定</ElButton>
</template> </template>
</ElDialog> </ElDialog>
<ReissueOrderComponent ref="reissueOrderRef" :selection="selection" @success="handleSuccess"></ReissueOrderComponent> <ReissueOrderComponent
ref="reissueOrderRef"
:selection="selection"
@success="handleSuccess"
></ReissueOrderComponent>
<uploadBox
v-if="status === 'BATCH_DOWNLOAD'"
:uploadList="uploadList"
></uploadBox>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import LogisticsWaySelect from '../../logistics/components/LogisticsWaySelect.tsx' import LogisticsWaySelect from '../../logistics/components/LogisticsWaySelect.tsx'
import { getUserMarkList } from '@/api/common' import { getUserMarkList } from '@/api/common'
// import { AnyObject } from '@/types/api/warehouse' // import { AnyObject } from '@/types/api/warehouse'
import uploadBox from '@/components/uploadBox.vue'
import { convertToChinaTime } from '@/utils/index' import { convertToChinaTime } from '@/utils/index'
import { import {
InfoFilled, InfoFilled,
...@@ -2970,7 +2995,7 @@ import { ...@@ -2970,7 +2995,7 @@ import {
getCustomTagListApi, getCustomTagListApi,
getLogisticsWayApi, getLogisticsWayApi,
printNormalPickPdfApi, printNormalPickPdfApi,
updatePRNDownloadStatus, updatePRNDownloadStatus,
} from '@/api/podUsOrder' } from '@/api/podUsOrder'
import { BaseRespData } from '@/types/api' import { BaseRespData } from '@/types/api'
...@@ -3034,7 +3059,7 @@ import { ...@@ -3034,7 +3059,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[] }
...@@ -3054,7 +3079,8 @@ const sourceList = [ ...@@ -3054,7 +3079,8 @@ const sourceList = [
{ {
name: '第三方推送', name: '第三方推送',
id: 'third-party', id: 'third-party',
},{ },
{
name: '补发订单', name: '补发订单',
id: 'factory-reissue', id: 'factory-reissue',
}, },
...@@ -3147,10 +3173,10 @@ const submitExportForm = async () => { ...@@ -3147,10 +3173,10 @@ const submitExportForm = async () => {
...params, ...params,
...(resourceType === 2 ...(resourceType === 2
? { ? {
...searchForm.value, ...searchForm.value,
startTime: timeRange.value?.[0] || null, startTime: timeRange.value?.[0] || null,
endTime: timeRange.value?.[1] || null, endTime: timeRange.value?.[1] || null,
} }
: {}), : {}),
}) })
ElMessage.success('请求成功,请稍后到右上角[我的下载]中查看') ElMessage.success('请求成功,请稍后到右上角[我的下载]中查看')
...@@ -3565,7 +3591,8 @@ const tableColumns = computed(() => { ...@@ -3565,7 +3591,8 @@ const tableColumns = computed(() => {
prop: 'automaticComposing', prop: 'automaticComposing',
slot: 'automaticComposing', slot: 'automaticComposing',
align: 'center', align: 'center',
}, { },
{
label: 'PRN文件', label: 'PRN文件',
width: 300, width: 300,
prop: 'automaticComposing', prop: 'automaticComposing',
...@@ -3808,16 +3835,16 @@ const loadTabData = async () => { ...@@ -3808,16 +3835,16 @@ const loadTabData = async () => {
// 发货拦截数量 // 发货拦截数量
const shipmentCount = (statusRes.data as InterceptStateGroupData)?.shipment const shipmentCount = (statusRes.data as InterceptStateGroupData)?.shipment
? Object.values( ? Object.values(
(statusRes.data as InterceptStateGroupData).shipment, (statusRes.data as InterceptStateGroupData).shipment,
).reduce((sum: number, value: unknown) => sum + (Number(value) || 0), 0) ).reduce((sum: number, value: unknown) => sum + (Number(value) || 0), 0)
: 0 : 0
// 生产拦截数量 // 生产拦截数量
const productionCount = (statusRes.data as InterceptStateGroupData) const productionCount = (statusRes.data as InterceptStateGroupData)
?.production ?.production
? Object.values( ? Object.values(
(statusRes.data as InterceptStateGroupData).production, (statusRes.data as InterceptStateGroupData).production,
).reduce((sum: number, value: unknown) => sum + (Number(value) || 0), 0) ).reduce((sum: number, value: unknown) => sum + (Number(value) || 0), 0)
: 0 : 0
tabsNav.value.splice(completeIndex + 1, 0, { tabsNav.value.splice(completeIndex + 1, 0, {
...@@ -4168,15 +4195,12 @@ const productionClientVisible = ref(false) ...@@ -4168,15 +4195,12 @@ const productionClientVisible = ref(false)
// } // }
const downloadRowProFile = async (row: PodUsOrderListData) => { const downloadRowProFile = async (row: PodUsOrderListData) => {
const url = const url = `https://factory.jomalls.com/upload/factory` + row.prnUrl
`https://factory.jomalls.com/upload/factory` + row.prnUrl
window.open(url, '_blank') window.open(url, '_blank')
await updatePRNDownloadStatus( await updatePRNDownloadStatus(row.id)
row.id,
)
search() search()
} }
const uploadList = ref<PodUsOrderListData[]>([])
const uploadFile = (row: PodUsOrderListData) => { const uploadFile = (row: PodUsOrderListData) => {
const input = document.createElement('input') const input = document.createElement('input')
input.style.display = 'none' input.style.display = 'none'
...@@ -4184,11 +4208,17 @@ const uploadFile = (row: PodUsOrderListData) => { ...@@ -4184,11 +4208,17 @@ const uploadFile = (row: PodUsOrderListData) => {
input.multiple = false input.multiple = false
input?.click() input?.click()
row.isUpload = true row.isUpload = true
input.onchange = async function() {
input.onchange = async function () {
try { try {
if (input.files && input.files.length) { if (input.files && input.files.length) {
uploadList.value.push(row)
const fm = new FormData() const fm = new FormData()
fm.append('file', input.files?.[0]) fm.append('file', input.files?.[0])
row.fileName = input.files?.[0]?.name
// console.log(4219, input.files?.[0])
const res = await uploadPRNFile(row.id, fm) const res = await uploadPRNFile(row.id, fm)
row.prnUrl = res.message row.prnUrl = res.message
} }
...@@ -4196,6 +4226,12 @@ const uploadFile = (row: PodUsOrderListData) => { ...@@ -4196,6 +4226,12 @@ const uploadFile = (row: PodUsOrderListData) => {
row.isUpload = false row.isUpload = false
} }
} }
input.oncancel = () => {
row.isUpload = false
}
if (input.parentNode) {
input.parentNode.removeChild(input)
}
} }
const downloadTif = async (type: string, templateWidth: number) => { const downloadTif = async (type: string, templateWidth: number) => {
...@@ -4242,8 +4278,8 @@ const downloadTif = async (type: string, templateWidth: number) => { ...@@ -4242,8 +4278,8 @@ const downloadTif = async (type: string, templateWidth: number) => {
a.href = window.URL.createObjectURL(blob) a.href = window.URL.createObjectURL(blob)
a.target = '_blank' a.target = '_blank'
a.download = (res.message as string).split('/')[ a.download = (res.message as string).split('/')[
(res.message as string).split('/').length - 1 (res.message as string).split('/').length - 1
] ]
a.click() a.click()
pngDownloadLoading.value = false pngDownloadLoading.value = false
}) })
...@@ -5253,8 +5289,8 @@ const rejectOrder = async (type: string) => { ...@@ -5253,8 +5289,8 @@ const rejectOrder = async (type: string) => {
orderStatus: type, orderStatus: type,
productList: selection.value.length productList: selection.value.length
? selection.value.flatMap( ? selection.value.flatMap(
(item: PodUsOrderListData) => item.productList || [], (item: PodUsOrderListData) => item.productList || [],
) )
: cardSelection.value, : cardSelection.value,
reasonStr: value, reasonStr: value,
}) })
...@@ -6241,8 +6277,8 @@ const interceptChange = async (status: boolean) => { ...@@ -6241,8 +6277,8 @@ const interceptChange = async (status: boolean) => {
? 1 ? 1
: 3 : 3
: interceptCurrent.value === 1 : interceptCurrent.value === 1
? 2 ? 2
: 4 : 4
try { try {
const res = await interceptUpdateApi({ const res = await interceptUpdateApi({
orderIds: selection.value.map((item) => item.id), orderIds: selection.value.map((item) => item.id),
...@@ -6326,8 +6362,9 @@ const reissueOrder = async () => { ...@@ -6326,8 +6362,9 @@ const reissueOrder = async () => {
if (selection.value.length === 0) { if (selection.value.length === 0) {
return ElMessage.warning('请选择数据') return ElMessage.warning('请选择数据')
} }
const isSameShipmentType = Array.from(new Set(selection.value.map(s=>s.shipmentType))).length===1 const isSameShipmentType =
if(!isSameShipmentType){ Array.from(new Set(selection.value.map((s) => s.shipmentType))).length === 1
if (!isSameShipmentType) {
return ElMessage.warning('请选择相同物流类型的数据') return ElMessage.warning('请选择相同物流类型的数据')
} }
reissueOrderRef.value.open() reissueOrderRef.value.open()
...@@ -6447,11 +6484,11 @@ const printNormal = async () => { ...@@ -6447,11 +6484,11 @@ const printNormal = async () => {
selection.value.forEach((s) => { selection.value.forEach((s) => {
s.productList && s.productList &&
s.productList.forEach((p) => { s.productList.forEach((p) => {
if (p.productMark === 'normal' || p.productMark === 'custom_normal') { if (p.productMark === 'normal' || p.productMark === 'custom_normal') {
arr.push(p.id) arr.push(p.id)
} }
}) })
}) })
console.log(3661, arr) console.log(3661, arr)
...@@ -6883,8 +6920,8 @@ const printNormal = async () => { ...@@ -6883,8 +6920,8 @@ const printNormal = async () => {
} }
.el-timeline .el-timeline
> .el-timeline-item:first-child > .el-timeline-item:first-child
.el-timeline-item__timestamp.is-top { .el-timeline-item__timestamp.is-top {
color: #409eff; color: #409eff;
} }
...@@ -6921,7 +6958,7 @@ const printNormal = async () => { ...@@ -6921,7 +6958,7 @@ const printNormal = async () => {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.red-big{ .red-big {
font-size: 15px; font-size: 15px;
color: red; color: red;
} }
......
...@@ -1039,7 +1039,7 @@ const updateTableSelection = () => { ...@@ -1039,7 +1039,7 @@ const updateTableSelection = () => {
}) })
console.log('rowsToSelect', rowsToSelect) console.log('rowsToSelect', rowsToSelect)
selection.value = [...(rowsToSelect || [])] selectPirceList.value = [...(rowsToSelect || [])]
} }
// 获取应该选中的行 // 获取应该选中的行
......
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