Commit 91d3a891 by zhuzhequan

podus修改

parent 6534b1b8
......@@ -32,6 +32,7 @@ declare module 'vue' {
ElImage: typeof import('element-plus/es')['ElImage']
ElInput: typeof import('element-plus/es')['ElInput']
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
ElLink: typeof import('element-plus/es')['ElLink']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption']
......@@ -52,6 +53,7 @@ declare module 'vue' {
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
ElTooltip: typeof import('element-plus/es')['ElTooltip']
ElTree: typeof import('element-plus/es')['ElTree']
ElUpload: typeof import('element-plus/es')['ElUpload']
Icon: typeof import('./src/components/Icon.vue')['default']
ImageView: typeof import('./src/components/ImageView.vue')['default']
LogList: typeof import('./src/components/LogList.vue')['default']
......@@ -64,7 +66,6 @@ declare module 'vue' {
ShipmentOrderDetail: typeof import('./src/components/ShipmentOrderDetail.vue')['default']
SplitDiv: typeof import('./src/components/splitDiv/splitDiv.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']
UploadExcel: typeof import('./src/components/UploadExcel.vue')['default']
UploadImage: typeof import('./src/components/UploadImage.vue')['default']
......
......@@ -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[]) {
return axios.post<never, BaseRespData<never>>(
......
......@@ -169,3 +169,9 @@ export interface AddressInfo {
receiverAddress2: string
receiverPostCode: string
}
export interface LogisticsFormData {
processNumber: string
trackingNumber: string
expressSheetUrl: string
expressSheet: File | null
}
......@@ -752,17 +752,20 @@
<el-timeline-item
:color="row.createTime ? '#409EFF' : ''"
:timestamp="row.createTime"
>创建时间</el-timeline-item
>创建时间
</el-timeline-item
>
<el-timeline-item
:color="row.startStockingTime ? '#E6A23C' : ''"
:timestamp="row.startStockingTime"
>确认时间</el-timeline-item
>确认时间
</el-timeline-item
>
<el-timeline-item
:color="row.finishTime ? '#67C23A' : ''"
:timestamp="row.finishTime"
>完成时间</el-timeline-item
>完成时间
</el-timeline-item
>
</el-timeline>
<!-- <div class="order-time-box">
......@@ -826,6 +829,17 @@
</span> -->
<span
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 &&
['CREATE_LOGISTICS', 'WAIT_SHIPMENT'].includes(status)
"
......@@ -1005,7 +1019,8 @@
@on-change="rightChange"
>
<template #default
><div class="menu-item" @click="rightChange('order-number')">
>
<div class="menu-item" @click="rightChange('order-number')">
复制订单号
</div>
</template>
......@@ -1285,11 +1300,39 @@
</span>
</template>
</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>
<script setup lang="ts">
import { getUserMarkList } from '@/api/common'
import { ArrowDown, WarningFilled } from '@element-plus/icons-vue'
import { ArrowDown, Close, WarningFilled } from '@element-plus/icons-vue'
import {
getCardOrderList,
getOrderList,
......@@ -1323,6 +1366,8 @@ import {
refreshAddressApi,
confirmProductApi,
confirmProductToRiinApi,
updateSelfLogistics,
uploadExpressSheet,
// handleExceptionOrderApi,
} from '@/api/podUsOrder'
import { BaseRespData } from '@/types/api'
......@@ -1342,7 +1387,7 @@ import {
WarehouseListData,
cardImages,
AddressInfo,
LogisticsData,
LogisticsData, LogisticsFormData,
} from '@/types/api/podUsOrder'
import usePageList from '@/utils/hooks/usePageList'
import { useValue } from '@/utils/hooks/useValue'
......@@ -1360,10 +1405,11 @@ import RightClickMenu from '@/components/RightClickMenu.vue'
import ResultInfo from './components/ResultInfo.vue'
import { isArray, isString } from '@/utils/validate'
import platformJson from '../../../json/platform.json'
declare global {
interface Window {
ActiveXObject: {
new (type: string): XMLHttpRequest
new(type: string): XMLHttpRequest
}
VBS_BinaryToArray: {
(data: unknown): { toArray(): number[] }
......@@ -1390,6 +1436,15 @@ const currentRow = ref<AddressInfo>({
})
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 confirmDialogShow = ref(false)
const downloadLoading = ref(false)
......@@ -1758,6 +1813,7 @@ async function confirmProduct() {
return
}
}
//转至锐印
async function confirmProductToRiin() {
if (selection.value.length === 0) {
......@@ -1785,6 +1841,7 @@ async function confirmProductToRiin() {
return
}
}
const handleConfirm = async () => {
if (!productionClientValue.value) {
return ElMessage.warning('请选择生产端')
......@@ -1857,7 +1914,7 @@ const downloadTif = async () => {
downloadLoading.value = true
try {
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
} catch (e) {
downloadLoading.value = false
......@@ -2780,6 +2837,12 @@ const refreshMaterial = async () => {
loading.close()
}
}
const showLogistics = (item: PodUsOrderListData) => {
currentRow.value = JSON.parse(JSON.stringify(item))
logisticsVisible.value = true
logisticsForm.value = JSON.parse(JSON.stringify(logistics))
}
onMounted(() => {
loadTabData()
getUserMark()
......@@ -2787,6 +2850,36 @@ onMounted(() => {
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) => {
exceptionStatus.value = command
search()
......@@ -2826,6 +2919,7 @@ const handleExceptionCommand = (command: number) => {
font-weight: 600;
}
}
.table-wrapper {
:deep(.exception-reason) {
.cell {
......@@ -2833,6 +2927,7 @@ const handleExceptionCommand = (command: number) => {
}
}
}
.goods-item {
display: grid;
grid-template-columns: 100px 1fr minmax(180px, 1fr) 140px;
......@@ -2888,12 +2983,14 @@ const handleExceptionCommand = (command: number) => {
height: 100%;
overflow-y: auto;
}
.operate-item {
.el-button {
margin-left: 0 !important;
margin-top: 20px !important;
}
}
.tabs-node_count {
display: inline-block;
min-width: 20px;
......@@ -2946,9 +3043,11 @@ const handleExceptionCommand = (command: number) => {
gap: 10px;
font-size: 12px;
margin-top: 10px;
.grid-item {
display: flex;
overflow: hidden;
.grid-item-value {
flex: 1;
overflow: hidden;
......@@ -2971,10 +3070,12 @@ const handleExceptionCommand = (command: number) => {
color: white !important;
background-color: #409eff;
}
// &:hover {
// color: #808285;
// }
}
:deep() {
.current-row {
&:hover {
......@@ -2985,11 +3086,13 @@ const handleExceptionCommand = (command: number) => {
}
}
}
.sub-status {
display: flex;
align-items: center;
border-bottom: 1px solid #e5e6eb;
background: #fff;
.sub-status-item {
position: relative;
font-size: 16px;
......@@ -3000,9 +3103,11 @@ const handleExceptionCommand = (command: number) => {
color: #606266;
margin-bottom: -1px;
transition: background 0.2s, color 0.2s;
&:not(:last-child) {
border-right: none;
}
&.sub-active {
background: #fff;
color: #1d2129;
......@@ -3018,6 +3123,27 @@ const handleExceptionCommand = (command: number) => {
flex-direction: column;
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 lang="scss">
.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