Commit a99b1a3d by qinjianhui

Merge branch 'dev' into 'master'

Dev

See merge request !34
parents 54cd7a01 3c3bdd81
...@@ -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']
......
...@@ -324,6 +324,28 @@ export function createLogisticsOrderApi(params: { ...@@ -324,6 +324,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>>(
......
...@@ -171,3 +171,9 @@ export interface AddressInfo { ...@@ -171,3 +171,9 @@ export interface AddressInfo {
receiverAddress2: string receiverAddress2: string
receiverPostCode: string receiverPostCode: string
} }
export interface LogisticsFormData {
processNumber: string
trackingNumber: string
expressSheetUrl: string
expressSheet: File | null
}
...@@ -651,6 +651,7 @@ ...@@ -651,6 +651,7 @@
{{ item.replenishmentNum || 0 }} {{ item.replenishmentNum || 0 }}
</span> </span>
<el-icon <el-icon
v-if="status === 'WAIT_SHIPMENT'"
class="icon" class="icon"
style="color: #f56c6c; font-size: 24px" style="color: #f56c6c; font-size: 24px"
title="申请补胚" title="申请补胚"
...@@ -841,17 +842,20 @@ ...@@ -841,17 +842,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">
...@@ -915,6 +919,17 @@ ...@@ -915,6 +919,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)
" "
...@@ -1124,7 +1139,8 @@ ...@@ -1124,7 +1139,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>
...@@ -1404,10 +1420,37 @@ ...@@ -1404,10 +1420,37 @@
</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 { import {
ArrowDown, ArrowDown,
CaretBottom, CaretBottom,
...@@ -1448,6 +1491,8 @@ import { ...@@ -1448,6 +1491,8 @@ import {
refreshAddressApi, refreshAddressApi,
confirmProductApi, confirmProductApi,
confirmProductToRiinApi, confirmProductToRiinApi,
updateSelfLogistics,
uploadExpressSheet,
// handleExceptionOrderApi, // handleExceptionOrderApi,
applyForReplenishmentApi, applyForReplenishmentApi,
replenishmentSuccessApi, replenishmentSuccessApi,
...@@ -1470,7 +1515,7 @@ import { ...@@ -1470,7 +1515,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'
...@@ -1488,10 +1533,11 @@ import RightClickMenu from '@/components/RightClickMenu.vue' ...@@ -1488,10 +1533,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[] }
...@@ -1518,6 +1564,15 @@ const currentRow = ref<AddressInfo>({ ...@@ -1518,6 +1564,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)
...@@ -1893,6 +1948,7 @@ async function confirmProduct() { ...@@ -1893,6 +1948,7 @@ async function confirmProduct() {
return return
} }
} }
//转至锐印 //转至锐印
async function confirmProductToRiin() { async function confirmProductToRiin() {
if (selection.value.length === 0) { if (selection.value.length === 0) {
...@@ -1920,6 +1976,7 @@ async function confirmProductToRiin() { ...@@ -1920,6 +1976,7 @@ async function confirmProductToRiin() {
return return
} }
} }
const handleConfirm = async () => { const handleConfirm = async () => {
if (!productionClientValue.value) { if (!productionClientValue.value) {
return ElMessage.warning('请选择生产端') return ElMessage.warning('请选择生产端')
...@@ -1994,7 +2051,7 @@ const downloadTif = async () => { ...@@ -1994,7 +2051,7 @@ const downloadTif = async () => {
const res = await composingDesignImages( const res = await composingDesignImages(
cardSelection.value.map((el) => el.id), cardSelection.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
...@@ -2967,6 +3024,12 @@ const refreshMaterial = async () => { ...@@ -2967,6 +3024,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()
...@@ -2974,6 +3037,36 @@ onMounted(() => { ...@@ -2974,6 +3037,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()
...@@ -3102,6 +3195,7 @@ const replenishmentSuccess = async () => { ...@@ -3102,6 +3195,7 @@ const replenishmentSuccess = async () => {
font-weight: 600; font-weight: 600;
} }
} }
.table-wrapper { .table-wrapper {
:deep(.exception-reason) { :deep(.exception-reason) {
.cell { .cell {
...@@ -3109,6 +3203,7 @@ const replenishmentSuccess = async () => { ...@@ -3109,6 +3203,7 @@ const replenishmentSuccess = async () => {
} }
} }
} }
.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;
...@@ -3165,6 +3260,7 @@ const replenishmentSuccess = async () => { ...@@ -3165,6 +3260,7 @@ const replenishmentSuccess = async () => {
overflow-y: auto; overflow-y: auto;
} }
.tabs-node_count { .tabs-node_count {
display: inline-block; display: inline-block;
min-width: 20px; min-width: 20px;
...@@ -3217,9 +3313,11 @@ const replenishmentSuccess = async () => { ...@@ -3217,9 +3313,11 @@ const replenishmentSuccess = async () => {
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;
...@@ -3242,10 +3340,12 @@ const replenishmentSuccess = async () => { ...@@ -3242,10 +3340,12 @@ const replenishmentSuccess = async () => {
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 {
...@@ -3256,11 +3356,13 @@ const replenishmentSuccess = async () => { ...@@ -3256,11 +3356,13 @@ const replenishmentSuccess = async () => {
} }
} }
} }
.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;
...@@ -3271,9 +3373,11 @@ const replenishmentSuccess = async () => { ...@@ -3271,9 +3373,11 @@ const replenishmentSuccess = async () => {
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;
...@@ -3289,6 +3393,27 @@ const replenishmentSuccess = async () => { ...@@ -3289,6 +3393,27 @@ const replenishmentSuccess = async () => {
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