Commit 91d3a891 by zhuzhequan

podus修改

parent 6534b1b8
...@@ -32,6 +32,7 @@ declare module 'vue' { ...@@ -32,6 +32,7 @@ declare module 'vue' {
ElImage: typeof import('element-plus/es')['ElImage'] ElImage: typeof import('element-plus/es')['ElImage']
ElInput: typeof import('element-plus/es')['ElInput'] ElInput: typeof import('element-plus/es')['ElInput']
ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
ElLink: typeof import('element-plus/es')['ElLink']
ElMenu: typeof import('element-plus/es')['ElMenu'] ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption'] ElOption: typeof import('element-plus/es')['ElOption']
...@@ -52,6 +53,7 @@ declare module 'vue' { ...@@ -52,6 +53,7 @@ declare module 'vue' {
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem'] ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
ElTooltip: typeof import('element-plus/es')['ElTooltip'] ElTooltip: typeof import('element-plus/es')['ElTooltip']
ElTree: typeof import('element-plus/es')['ElTree'] ElTree: typeof import('element-plus/es')['ElTree']
ElUpload: typeof import('element-plus/es')['ElUpload']
Icon: typeof import('./src/components/Icon.vue')['default'] Icon: typeof import('./src/components/Icon.vue')['default']
ImageView: typeof import('./src/components/ImageView.vue')['default'] ImageView: typeof import('./src/components/ImageView.vue')['default']
LogList: typeof import('./src/components/LogList.vue')['default'] LogList: typeof import('./src/components/LogList.vue')['default']
...@@ -64,7 +66,6 @@ declare module 'vue' { ...@@ -64,7 +66,6 @@ declare module 'vue' {
ShipmentOrderDetail: typeof import('./src/components/ShipmentOrderDetail.vue')['default'] ShipmentOrderDetail: typeof import('./src/components/ShipmentOrderDetail.vue')['default']
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']
TableRightClickMenu: typeof import('./src/components/TableRightClickMenu.vue')['default']
TableView: typeof import('./src/components/TableView.vue')['default'] TableView: typeof import('./src/components/TableView.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']
......
...@@ -334,6 +334,28 @@ export function createLogisticsOrderApi(params: { ...@@ -334,6 +334,28 @@ export function createLogisticsOrderApi(params: {
) )
} }
// 创建物流
export function uploadExpressSheet(params: {
trackingNumber:string
file: File
}) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderUs/uploadExpressSheet',
params,
)
}// 创建物流
export function updateSelfLogistics(params: {
trackingNumber:string
expressSheet: string
processNumber: string
id?: string
}) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderUs/updateSelfLogistics',
params,
)
}
// 更改物流 // 更改物流
export function composingDesignImages(data: number[]) { export function composingDesignImages(data: number[]) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
......
...@@ -169,3 +169,9 @@ export interface AddressInfo { ...@@ -169,3 +169,9 @@ export interface AddressInfo {
receiverAddress2: string receiverAddress2: string
receiverPostCode: string receiverPostCode: string
} }
export interface LogisticsFormData {
processNumber: string
trackingNumber: string
expressSheetUrl: string
expressSheet: File | null
}
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,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
> >
</div> </div>
<!-- <div <!-- <div
...@@ -341,19 +341,19 @@ ...@@ -341,19 +341,19 @@
<template #dropdown> <template #dropdown>
<ElDropdownMenu> <ElDropdownMenu>
<ElDropdownItem @click="getOrderByIdApi('createLogisticsOrder')" <ElDropdownItem @click="getOrderByIdApi('createLogisticsOrder')"
>创建物流订单</ElDropdownItem >创建物流订单</ElDropdownItem
> >
<ElDropdownItem @click="getOrderByIdApi('getTrackingNumber')" <ElDropdownItem @click="getOrderByIdApi('getTrackingNumber')"
>获取跟踪号</ElDropdownItem >获取跟踪号</ElDropdownItem
> >
<ElDropdownItem @click="getOrderByIdApi('getPrintOrder')" <ElDropdownItem @click="getOrderByIdApi('getPrintOrder')"
>获取打印面单</ElDropdownItem >获取打印面单</ElDropdownItem
> >
<ElDropdownItem @click="getOrderByIdApi('cancelLogisticsOrder')" <ElDropdownItem @click="getOrderByIdApi('cancelLogisticsOrder')"
>取消物流订单</ElDropdownItem >取消物流订单</ElDropdownItem
> >
<ElDropdownItem @click="getOrderByIdApi('batchChangeLogistics')" <ElDropdownItem @click="getOrderByIdApi('batchChangeLogistics')"
>更换物流</ElDropdownItem >更换物流</ElDropdownItem
> >
</ElDropdownMenu> </ElDropdownMenu>
</template> </template>
...@@ -496,7 +496,7 @@ ...@@ -496,7 +496,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"
...@@ -552,13 +552,13 @@ ...@@ -552,13 +552,13 @@
<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'
? '数量:' ? '数量:'
: '已生产数量:' : '已生产数量:'
}}</span> }}</span>
<span class="goods-item-info-item-value"> <span class="goods-item-info-item-value">
{{ {{
status === 'EXCEPTION_ORDER' || status === 'EXCEPTION_ORDER' ||
...@@ -752,17 +752,20 @@ ...@@ -752,17 +752,20 @@
<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> </el-timeline>
<!-- <div class="order-time-box"> <!-- <div class="order-time-box">
...@@ -826,6 +829,17 @@ ...@@ -826,6 +829,17 @@
</span> --> </span> -->
<span <span
v-if=" v-if="
row.shipmentType === 0 &&
['CREATE_LOGISTICS', 'WAIT_SHIPMENT'].includes(status)
"
class="operate-item"
>
<ElButton link type="primary" @click="showLogistics(row)">
更新物流信息
</ElButton>
</span>
<span
v-if="
row.shipmentType === 1 && row.shipmentType === 1 &&
['CREATE_LOGISTICS', 'WAIT_SHIPMENT'].includes(status) ['CREATE_LOGISTICS', 'WAIT_SHIPMENT'].includes(status)
" "
...@@ -924,7 +938,7 @@ ...@@ -924,7 +938,7 @@
<div class="grid-container"> <div class="grid-container">
<div class="grid-item" title="商品名称"> <div class="grid-item" title="商品名称">
<span class="grid-item-value" <span class="grid-item-value"
>{{ cardItem?.productName }} >{{ cardItem?.productName }}
</span> </span>
</div> </div>
<div class="grid-item" title="未生产数量"> <div class="grid-item" title="未生产数量">
...@@ -1005,7 +1019,8 @@ ...@@ -1005,7 +1019,8 @@
@on-change="rightChange" @on-change="rightChange"
> >
<template #default <template #default
><div class="menu-item" @click="rightChange('order-number')"> >
<div class="menu-item" @click="rightChange('order-number')">
复制订单号 复制订单号
</div> </div>
</template> </template>
...@@ -1285,11 +1300,39 @@ ...@@ -1285,11 +1300,39 @@
</span> </span>
</template> </template>
</ElDialog> </ElDialog>
<el-dialog v-model="logisticsVisible" :close-on-click-modal="false" width="700px" title="更新物流信息">
<el-form
v-if="logisticsVisible"
ref="logisticsFormRef" label-width="100px" label-position="left"
:model="logisticsForm">
<el-form-item prop="processNumber" label="物流处理号">
<el-input v-model="logisticsForm.processNumber" placeholder="请输入物流处理号" clearable></el-input>
</el-form-item>
<el-form-item prop="trackingNumber" label="物流跟踪号">
<el-input v-model="logisticsForm.trackingNumber" placeholder="请输入物流跟踪号" clearable></el-input>
</el-form-item>
<el-form-item v-if="logisticsForm.trackingNumber" prop="expressSheetUrl" label="物流面单">
<el-upload accept=".pdf" action="" :before-upload="expressSheetUpload">
<el-button type="primary">点击上传</el-button>
</el-upload>
<div v-if="logisticsForm.expressSheet" class="file">
<span>{{ logisticsForm.expressSheet.name }}</span>
<el-icon @click="logisticsForm.expressSheet=null" class="expressSheetClose">
<Close></Close>
</el-icon>
</div>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="logisticsVisible=false">取消</el-button>
<el-button type="primary" @click="logisticsSubmit"> 确定</el-button>
</template>
</el-dialog>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { getUserMarkList } from '@/api/common' import { getUserMarkList } from '@/api/common'
import { ArrowDown, WarningFilled } from '@element-plus/icons-vue' import { ArrowDown, Close, WarningFilled } from '@element-plus/icons-vue'
import { import {
getCardOrderList, getCardOrderList,
getOrderList, getOrderList,
...@@ -1323,6 +1366,8 @@ import { ...@@ -1323,6 +1366,8 @@ import {
refreshAddressApi, refreshAddressApi,
confirmProductApi, confirmProductApi,
confirmProductToRiinApi, confirmProductToRiinApi,
updateSelfLogistics,
uploadExpressSheet,
// handleExceptionOrderApi, // handleExceptionOrderApi,
} from '@/api/podUsOrder' } from '@/api/podUsOrder'
import { BaseRespData } from '@/types/api' import { BaseRespData } from '@/types/api'
...@@ -1342,7 +1387,7 @@ import { ...@@ -1342,7 +1387,7 @@ import {
WarehouseListData, WarehouseListData,
cardImages, cardImages,
AddressInfo, AddressInfo,
LogisticsData, LogisticsData, LogisticsFormData,
} from '@/types/api/podUsOrder' } from '@/types/api/podUsOrder'
import usePageList from '@/utils/hooks/usePageList' import usePageList from '@/utils/hooks/usePageList'
import { useValue } from '@/utils/hooks/useValue' import { useValue } from '@/utils/hooks/useValue'
...@@ -1360,10 +1405,11 @@ import RightClickMenu from '@/components/RightClickMenu.vue' ...@@ -1360,10 +1405,11 @@ import RightClickMenu from '@/components/RightClickMenu.vue'
import ResultInfo from './components/ResultInfo.vue' import ResultInfo from './components/ResultInfo.vue'
import { isArray, isString } from '@/utils/validate' import { isArray, isString } from '@/utils/validate'
import platformJson from '../../../json/platform.json' import platformJson from '../../../json/platform.json'
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[] }
...@@ -1390,6 +1436,15 @@ const currentRow = ref<AddressInfo>({ ...@@ -1390,6 +1436,15 @@ const currentRow = ref<AddressInfo>({
}) })
const updateAddVisible = ref(false) const updateAddVisible = ref(false)
const logisticsVisible = ref(false)
const logisticsFormRef = ref()
const logistics = {
processNumber: '',
trackingNumber: '',
expressSheetUrl: '',
expressSheet: null,
}
const logisticsForm = ref<LogisticsFormData>(logistics)
const resultRefs = ref<InstanceType<typeof ResultInfo> | null>(null) const resultRefs = ref<InstanceType<typeof ResultInfo> | null>(null)
const confirmDialogShow = ref(false) const confirmDialogShow = ref(false)
const downloadLoading = ref(false) const downloadLoading = ref(false)
...@@ -1758,6 +1813,7 @@ async function confirmProduct() { ...@@ -1758,6 +1813,7 @@ async function confirmProduct() {
return return
} }
} }
//转至锐印 //转至锐印
async function confirmProductToRiin() { async function confirmProductToRiin() {
if (selection.value.length === 0) { if (selection.value.length === 0) {
...@@ -1785,6 +1841,7 @@ async function confirmProductToRiin() { ...@@ -1785,6 +1841,7 @@ async function confirmProductToRiin() {
return return
} }
} }
const handleConfirm = async () => { const handleConfirm = async () => {
if (!productionClientValue.value) { if (!productionClientValue.value) {
return ElMessage.warning('请选择生产端') return ElMessage.warning('请选择生产端')
...@@ -1857,7 +1914,7 @@ const downloadTif = async () => { ...@@ -1857,7 +1914,7 @@ const downloadTif = async () => {
downloadLoading.value = true downloadLoading.value = true
try { try {
const res = await composingDesignImages(selection.value.map((el) => el.id)) const res = await composingDesignImages(selection.value.map((el) => el.id))
window.open(filePath + res.message, '_blank') window.open('http://ps.jomalls.com/tiff' + res.message, '_blank')
downloadLoading.value = false downloadLoading.value = false
} catch (e) { } catch (e) {
downloadLoading.value = false downloadLoading.value = false
...@@ -2780,6 +2837,12 @@ const refreshMaterial = async () => { ...@@ -2780,6 +2837,12 @@ const refreshMaterial = async () => {
loading.close() loading.close()
} }
} }
const showLogistics = (item: PodUsOrderListData) => {
currentRow.value = JSON.parse(JSON.stringify(item))
logisticsVisible.value = true
logisticsForm.value = JSON.parse(JSON.stringify(logistics))
}
onMounted(() => { onMounted(() => {
loadTabData() loadTabData()
getUserMark() getUserMark()
...@@ -2787,6 +2850,36 @@ onMounted(() => { ...@@ -2787,6 +2850,36 @@ onMounted(() => {
loadWarehouseList() loadWarehouseList()
}) })
const expressSheetUpload = async (file: File) => {
const fm = new FormData()
fm.append('file', file)
fm.append('trackingNumber', logisticsForm.value.trackingNumber)
const res = await uploadExpressSheet(fm as never)
logisticsForm.value.expressSheetUrl = res.message || ''
logisticsForm.value.expressSheet = file
return false
}
const logisticsSubmit = () => {
if (!logisticsForm.value.expressSheetUrl) {
return ElMessage.warning('请上传物流面单')
}
logisticsFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
const params = {
trackingNumber: logisticsForm.value.trackingNumber,
expressSheet: logisticsForm.value.expressSheetUrl,
processNumber: logisticsForm.value.processNumber,
id: currentRow.value.id,
}
await updateSelfLogistics(params)
ElMessage.success('操作成功')
logisticsVisible.value = false
search()
}
})
}
const handleExceptionCommand = (command: number) => { const handleExceptionCommand = (command: number) => {
exceptionStatus.value = command exceptionStatus.value = command
search() search()
...@@ -2826,6 +2919,7 @@ const handleExceptionCommand = (command: number) => { ...@@ -2826,6 +2919,7 @@ const handleExceptionCommand = (command: number) => {
font-weight: 600; font-weight: 600;
} }
} }
.table-wrapper { .table-wrapper {
:deep(.exception-reason) { :deep(.exception-reason) {
.cell { .cell {
...@@ -2833,6 +2927,7 @@ const handleExceptionCommand = (command: number) => { ...@@ -2833,6 +2927,7 @@ const handleExceptionCommand = (command: number) => {
} }
} }
} }
.goods-item { .goods-item {
display: grid; display: grid;
grid-template-columns: 100px 1fr minmax(180px, 1fr) 140px; grid-template-columns: 100px 1fr minmax(180px, 1fr) 140px;
...@@ -2888,12 +2983,14 @@ const handleExceptionCommand = (command: number) => { ...@@ -2888,12 +2983,14 @@ const handleExceptionCommand = (command: number) => {
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
} }
.operate-item { .operate-item {
.el-button { .el-button {
margin-left: 0 !important; margin-left: 0 !important;
margin-top: 20px !important; margin-top: 20px !important;
} }
} }
.tabs-node_count { .tabs-node_count {
display: inline-block; display: inline-block;
min-width: 20px; min-width: 20px;
...@@ -2946,9 +3043,11 @@ const handleExceptionCommand = (command: number) => { ...@@ -2946,9 +3043,11 @@ const handleExceptionCommand = (command: number) => {
gap: 10px; gap: 10px;
font-size: 12px; font-size: 12px;
margin-top: 10px; margin-top: 10px;
.grid-item { .grid-item {
display: flex; display: flex;
overflow: hidden; overflow: hidden;
.grid-item-value { .grid-item-value {
flex: 1; flex: 1;
overflow: hidden; overflow: hidden;
...@@ -2971,10 +3070,12 @@ const handleExceptionCommand = (command: number) => { ...@@ -2971,10 +3070,12 @@ const handleExceptionCommand = (command: number) => {
color: white !important; color: white !important;
background-color: #409eff; background-color: #409eff;
} }
// &:hover { // &:hover {
// color: #808285; // color: #808285;
// } // }
} }
:deep() { :deep() {
.current-row { .current-row {
&:hover { &:hover {
...@@ -2985,11 +3086,13 @@ const handleExceptionCommand = (command: number) => { ...@@ -2985,11 +3086,13 @@ const handleExceptionCommand = (command: number) => {
} }
} }
} }
.sub-status { .sub-status {
display: flex; display: flex;
align-items: center; align-items: center;
border-bottom: 1px solid #e5e6eb; border-bottom: 1px solid #e5e6eb;
background: #fff; background: #fff;
.sub-status-item { .sub-status-item {
position: relative; position: relative;
font-size: 16px; font-size: 16px;
...@@ -3000,9 +3103,11 @@ const handleExceptionCommand = (command: number) => { ...@@ -3000,9 +3103,11 @@ const handleExceptionCommand = (command: number) => {
color: #606266; color: #606266;
margin-bottom: -1px; margin-bottom: -1px;
transition: background 0.2s, color 0.2s; transition: background 0.2s, color 0.2s;
&:not(:last-child) { &:not(:last-child) {
border-right: none; border-right: none;
} }
&.sub-active { &.sub-active {
background: #fff; background: #fff;
color: #1d2129; color: #1d2129;
...@@ -3018,6 +3123,27 @@ const handleExceptionCommand = (command: number) => { ...@@ -3018,6 +3123,27 @@ const handleExceptionCommand = (command: number) => {
flex-direction: column; flex-direction: column;
gap: 10px; gap: 10px;
} }
.file {
position: relative;
top: -5px;
left: 20px;
display: flex;
align-items: center;
span {
font-size: 14px;
}
.expressSheetClose {
margin-left: 30px;
cursor: pointer;
&:hover {
color: red;
}
}
}
</style> </style>
<style lang="scss"> <style lang="scss">
.customize-select-style { .customize-select-style {
......
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