Commit c85eb33d by wuqian

Merge branch 'dev'

parents 7190baff 7d2db864
...@@ -10,7 +10,14 @@ import { ...@@ -10,7 +10,14 @@ import {
} from '@/types/api/podUsOrder' } from '@/types/api/podUsOrder'
import axios from './axios' import axios from './axios'
import { PodMakeOrderData } from '@/types/api/podMakeOrder' import { PodMakeOrderData } from '@/types/api/podMakeOrder'
export interface LogisticsData {
logisticsWayName: string // 物流名称
warehouseName: string // 发货仓库
status: boolean
logisticsWayCode: string // 物流编码
partition: string // 所在分区
logisticsWayId?: number | null
}
export interface AddressInfo { export interface AddressInfo {
id?:string id?:string
receiverName: string, receiverName: string,
...@@ -23,22 +30,31 @@ export interface AddressInfo { ...@@ -23,22 +30,31 @@ export interface AddressInfo {
receiverAddress2: string, receiverAddress2: string,
receiverPostCode: string, receiverPostCode: string,
} }
// 同步收货地址
export interface LogisticsData { export function syncReceiverAddress(data: number[]) {
logisticsWayName: string // 物流名称 return axios.post<never, BaseRespData<never>>(
warehouseName: string // 发货仓库 'factory/podJomallOrderUs/syncReceiverAddress',
status: boolean data,
logisticsWayCode: string // 物流编码 )
partition: string // 所在分区 }
logisticsWayId?: number | null export function refreshAddressApi(idList: number[]) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderUs/syncReceiverAddress',
idList,
)
} }
export function updateAddressApi(data: PodUsOrderListData) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderUs/updateReceiverAddress',
data,
)
}
export function getOrderTabData() { export function getOrderTabData() {
return axios.get<never, BaseRespData<Tab[]>>( return axios.get<never, BaseRespData<Tab[]>>(
'/factory/podJomallOrderUs/findStateGroupList', '/factory/podJomallOrderUs/findStateGroupList',
) )
} }
export function getOrderList( export function getOrderList(
params: SearchForm, params: SearchForm,
currentPage: number, currentPage: number,
...@@ -53,14 +69,12 @@ export function getOrderList( ...@@ -53,14 +69,12 @@ export function getOrderList(
}, },
) )
} }
export function handleExceptionOrderApi(orderIds: number[]) { export function handleExceptionOrderApi(orderIds: number[]) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderUs/processExceptionOrders', 'factory/podJomallOrderUs/processExceptionOrders',
orderIds, orderIds,
) )
} }
export function getCardOrderList( export function getCardOrderList(
params: SearchForm, params: SearchForm,
currentPage: number, currentPage: number,
...@@ -75,7 +89,6 @@ export function getCardOrderList( ...@@ -75,7 +89,6 @@ export function getCardOrderList(
}, },
) )
} }
export function confirmOrderApi( export function confirmOrderApi(
data: number[], data: number[],
productionClient: string, productionClient: string,
...@@ -92,13 +105,11 @@ export function confirmOrderApi( ...@@ -92,13 +105,11 @@ export function confirmOrderApi(
}, },
) )
} }
export function getProductionClientApi() { export function getProductionClientApi() {
return axios.get<never, BaseRespData<ProductionClient[]>>( return axios.get<never, BaseRespData<ProductionClient[]>>(
'factory/podJomallOrderUs/getProductionClientList', 'factory/podJomallOrderUs/getProductionClientList',
) )
} }
export function updateExceptionOrderApi(data: number[]) { export function updateExceptionOrderApi(data: number[]) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderUs/updateExceptionOrders', 'factory/podJomallOrderUs/updateExceptionOrders',
...@@ -107,15 +118,6 @@ export function updateExceptionOrderApi(data: number[]) { ...@@ -107,15 +118,6 @@ export function updateExceptionOrderApi(data: number[]) {
}, },
) )
} }
// 同步收货地址
export function syncReceiverAddress(data: number[]) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderUs/syncReceiverAddress',
data,
)
}
export function changeExceptionOrderApi( export function changeExceptionOrderApi(
url: string, url: string,
ids: number[], ids: number[],
...@@ -128,7 +130,6 @@ export function changeExceptionOrderApi( ...@@ -128,7 +130,6 @@ export function changeExceptionOrderApi(
exceptionReason: value, exceptionReason: value,
}) })
} }
export function cancelOrderApi(ids: number[], value: string) { export function cancelOrderApi(ids: number[], value: string) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderUs/cancelOrders', 'factory/podJomallOrderUs/cancelOrders',
...@@ -138,13 +139,11 @@ export function cancelOrderApi(ids: number[], value: string) { ...@@ -138,13 +139,11 @@ export function cancelOrderApi(ids: number[], value: string) {
}, },
) )
} }
export function getOperationLogApi(id: number) { export function getOperationLogApi(id: number) {
return axios.get<never, BaseRespData<LogListData[]>>( return axios.get<never, BaseRespData<LogListData[]>>(
`factory/podJomallOrderUsLog/getPodJomallOrderUsLog?id=${id}`, `factory/podJomallOrderUsLog/getPodJomallOrderUsLog?id=${id}`,
) )
} }
export function getSubOrderBySubOrderNumber(factorySubOrderNumber: string) { export function getSubOrderBySubOrderNumber(factorySubOrderNumber: string) {
return axios.get<never, BaseRespData<ProductList>>( return axios.get<never, BaseRespData<ProductList>>(
'factory/podJomallOrderProductUs/getProductUsByFactorySubOrderNumber', 'factory/podJomallOrderProductUs/getProductUsByFactorySubOrderNumber',
...@@ -155,14 +154,12 @@ export function getSubOrderBySubOrderNumber(factorySubOrderNumber: string) { ...@@ -155,14 +154,12 @@ export function getSubOrderBySubOrderNumber(factorySubOrderNumber: string) {
}, },
) )
} }
export function downloadMaterialApi(id: number[]) { export function downloadMaterialApi(id: number[]) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderProductUs/downloadDesignImages', 'factory/podJomallOrderProductUs/downloadDesignImages',
id, id,
) )
} }
export function productionQueryApi(id: number, podJomallOrderUsId: number) { export function productionQueryApi(id: number, podJomallOrderUsId: number) {
return axios.post<never, BasePaginationData<never>>( return axios.post<never, BasePaginationData<never>>(
'factory/podJomallOrderProductUs/completeDelivery', 'factory/podJomallOrderProductUs/completeDelivery',
...@@ -172,14 +169,12 @@ export function productionQueryApi(id: number, podJomallOrderUsId: number) { ...@@ -172,14 +169,12 @@ export function productionQueryApi(id: number, podJomallOrderUsId: number) {
}, },
) )
} }
export function printProductionOrderApi(orderIds: number[]) { export function printProductionOrderApi(orderIds: number[]) {
return axios.post<never, BaseRespData<string>>( return axios.post<never, BaseRespData<string>>(
'factory/podJomallOrderUs/printProducePdf', 'factory/podJomallOrderUs/printProducePdf',
orderIds, orderIds,
) )
} }
export function printPrintOrderApi(orderIds: number[]) { export function printPrintOrderApi(orderIds: number[]) {
return axios.post<never, BaseRespData<string>>( return axios.post<never, BaseRespData<string>>(
'factory/podJomallOrderUs/printPickPdf', 'factory/podJomallOrderUs/printPickPdf',
...@@ -188,7 +183,6 @@ export function printPrintOrderApi(orderIds: number[]) { ...@@ -188,7 +183,6 @@ export function printPrintOrderApi(orderIds: number[]) {
}, },
) )
} }
export function printPickingOrderApi(orderIds: number[]) { export function printPickingOrderApi(orderIds: number[]) {
return axios.post<never, BaseRespData<string>>( return axios.post<never, BaseRespData<string>>(
'factory/podJomallOrderUs/pickingComplete', 'factory/podJomallOrderUs/pickingComplete',
...@@ -197,13 +191,11 @@ export function printPickingOrderApi(orderIds: number[]) { ...@@ -197,13 +191,11 @@ export function printPickingOrderApi(orderIds: number[]) {
}, },
) )
} }
export function stockOutCheckApi(orderIds: number[]) { export function stockOutCheckApi(orderIds: number[]) {
return axios.get<never, BaseRespData<number[]>>( return axios.get<never, BaseRespData<number[]>>(
`factory/podJomallOrderUs/replenishVerify?ids=${orderIds.join(',')}`, `factory/podJomallOrderUs/replenishVerify?ids=${orderIds.join(',')}`,
) )
} }
export function toBePickingApi(orderIds: number[]) { export function toBePickingApi(orderIds: number[]) {
return axios.get<never, BaseRespData<never>>( return axios.get<never, BaseRespData<never>>(
`factory/podJomallOrderUs/updateStockOutOrderToPicking?ids=${orderIds.join( `factory/podJomallOrderUs/updateStockOutOrderToPicking?ids=${orderIds.join(
...@@ -211,13 +203,11 @@ export function toBePickingApi(orderIds: number[]) { ...@@ -211,13 +203,11 @@ export function toBePickingApi(orderIds: number[]) {
)}`, )}`,
) )
} }
export function getOrderDetailById(id: number) { export function getOrderDetailById(id: number) {
return axios.get<never, BaseRespData<ProductList>>( return axios.get<never, BaseRespData<ProductList>>(
`factory/podJomallOrderProductUs/getProductUsById?id=${id}`, `factory/podJomallOrderProductUs/getProductUsById?id=${id}`,
) )
} }
export function getPackingDataApi( export function getPackingDataApi(
code: string, code: string,
factoryNo: number, factoryNo: number,
...@@ -236,7 +226,6 @@ export function getPackingDataApi( ...@@ -236,7 +226,6 @@ export function getPackingDataApi(
}, },
) )
} }
export function getPodBoxListApi( export function getPodBoxListApi(
factoryNo: number | string, factoryNo: number | string,
warehouseId: number | string, warehouseId: number | string,
...@@ -261,7 +250,6 @@ export function submitInspectionApi( ...@@ -261,7 +250,6 @@ export function submitInspectionApi(
}, },
) )
} }
export function clearBoxApi( export function clearBoxApi(
factoryNo: number, factoryNo: number,
box: number | null, box: number | null,
...@@ -274,13 +262,11 @@ export function clearBoxApi( ...@@ -274,13 +262,11 @@ export function clearBoxApi(
}, },
) )
} }
export function clearAllBoxApi() { export function clearAllBoxApi() {
return axios.get<never, BaseRespData<never>>( return axios.get<never, BaseRespData<never>>(
'factory/podJomallOrderUs/delPodBoxOrderDetails', 'factory/podJomallOrderUs/delPodBoxOrderDetails',
) )
} }
export function updateRemarkApi(id: number, content: string) { export function updateRemarkApi(id: number, content: string) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderUs/addRemark', 'factory/podJomallOrderUs/addRemark',
...@@ -288,40 +274,23 @@ export function updateRemarkApi(id: number, content: string) { ...@@ -288,40 +274,23 @@ export function updateRemarkApi(id: number, content: string) {
) )
} }
export function refreshAddressApi(idList: number[]) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderUs/syncReceiverAddress',
idList,
)
}
export function updateAddressApi(data: PodUsOrderListData) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderUs/updateReceiverAddress',
data,
)
}
export function getLogisticsCalculation(id: number) { export function getLogisticsCalculation(id: number) {
return axios.get<never, BaseRespData<never>>( return axios.get<never, BaseRespData<never>>(
'factory/podJomallOrderUs/getLogisticsCalculation', 'factory/podJomallOrderUs/getLogisticsCalculation',
{ params: { id } }, { params: { id } },
) )
} }
export function loadWarehouseListApi() { export function loadWarehouseListApi() {
return axios.get<never, BaseRespData<WarehouseListData[]>>( return axios.get<never, BaseRespData<WarehouseListData[]>>(
'factoryWarehouseInfo/getAll', 'factoryWarehouseInfo/getAll',
) )
} }
export function refreshMaterialApi(orderIds: string) { export function refreshMaterialApi(orderIds: string) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderProductUs/refreshDesignImages ', 'factory/podJomallOrderProductUs/refreshDesignImages ',
{ orderIds }, { orderIds },
) )
} }
// 获取跟踪号 // 获取跟踪号
export function getTrackingNumberApi(orderIds: (string | number)[]) { export function getTrackingNumberApi(orderIds: (string | number)[]) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
...@@ -329,7 +298,6 @@ export function getTrackingNumberApi(orderIds: (string | number)[]) { ...@@ -329,7 +298,6 @@ export function getTrackingNumberApi(orderIds: (string | number)[]) {
orderIds, orderIds,
) )
} }
// 获取打印面单 // 获取打印面单
export function getfaceSimplexFileApi(orderIds: (string | number)[]) { export function getfaceSimplexFileApi(orderIds: (string | number)[]) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
...@@ -337,7 +305,6 @@ export function getfaceSimplexFileApi(orderIds: (string | number)[]) { ...@@ -337,7 +305,6 @@ export function getfaceSimplexFileApi(orderIds: (string | number)[]) {
orderIds, orderIds,
) )
} }
// 取消物流订单 // 取消物流订单
export function cancelLogisticsOrderApi(orderIds: (string | number)[]) { export function cancelLogisticsOrderApi(orderIds: (string | number)[]) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
...@@ -345,7 +312,6 @@ export function cancelLogisticsOrderApi(orderIds: (string | number)[]) { ...@@ -345,7 +312,6 @@ export function cancelLogisticsOrderApi(orderIds: (string | number)[]) {
orderIds, orderIds,
) )
} }
// 更改物流 // 更改物流
export function changeLogisticsApi(params: { export function changeLogisticsApi(params: {
updateByIdParam: { updateByIdParam: {
...@@ -359,7 +325,6 @@ export function changeLogisticsApi(params: { ...@@ -359,7 +325,6 @@ export function changeLogisticsApi(params: {
params, params,
) )
} }
// 创建物流 // 创建物流
export function createLogisticsOrderApi(params: { export function createLogisticsOrderApi(params: {
updateByIdParam: { updateByIdParam: {
...@@ -375,13 +340,12 @@ export function createLogisticsOrderApi(params: { ...@@ -375,13 +340,12 @@ export function createLogisticsOrderApi(params: {
} }
// 更改物流 // 更改物流
export function composingDesignImages(data: number[]) { export function composingDesignImages(data:number[]) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderUs/composingDesignImages', 'factory/podJomallOrderUs/composingDesignImages',
data, data
) )
} }
// 转至待拣胚 // 转至待拣胚
export function updateLogisticsToPickingApi(params: { ids: string }) { export function updateLogisticsToPickingApi(params: { ids: string }) {
return axios.get<never, BaseRespData<never>>( return axios.get<never, BaseRespData<never>>(
...@@ -391,7 +355,6 @@ export function updateLogisticsToPickingApi(params: { ids: string }) { ...@@ -391,7 +355,6 @@ export function updateLogisticsToPickingApi(params: { ids: string }) {
}, },
) )
} }
//创建物流订单 //创建物流订单
export function createLogisticsOrdersApi(orderIds: (string | number)[]) { export function createLogisticsOrdersApi(orderIds: (string | number)[]) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class="upload-area" @click="triggerFileInput"> <div class="upload-area" @click="triggerFileInput">
<el-icon class="el-icon--upload"><UploadFilled /></el-icon> <el-icon class="el-icon--upload"><UploadFilled /></el-icon>
<div class="el-upload__text"> <div class="el-upload__text">
将文件拖到此处,或<span style="color: #409eff">点击上传</span> <span style="color: #409eff">点击上传</span>
</div> </div>
</div> </div>
<input <input
...@@ -46,7 +46,14 @@ ...@@ -46,7 +46,14 @@
<script setup lang="ts"> <script setup lang="ts">
import * as XLSX from 'xlsx' import * as XLSX from 'xlsx'
import { ref, watch, defineProps, defineEmits, computed } from 'vue' import {
ref,
watch,
defineProps,
defineEmits,
computed,
defineExpose,
} from 'vue'
import { UploadFilled, Document, Close } from '@element-plus/icons-vue' import { UploadFilled, Document, Close } from '@element-plus/icons-vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { uploadFileApi } from '@/api/common' import { uploadFileApi } from '@/api/common'
...@@ -89,7 +96,7 @@ watch( ...@@ -89,7 +96,7 @@ watch(
const triggerFileInput = () => { const triggerFileInput = () => {
if (loading.value) return if (loading.value) return
fileInputRef.value?.click() if (fileInputRef.value) fileInputRef.value?.click()
} }
const downloadFile = (path: string) => { const downloadFile = (path: string) => {
window.open(path) window.open(path)
...@@ -120,8 +127,17 @@ const onFileChange = async (e: Event) => { ...@@ -120,8 +127,17 @@ const onFileChange = async (e: Event) => {
ElMessage.error('文件大小不能超过50MB') ElMessage.error('文件大小不能超过50MB')
return return
} }
if (props.importType === 'local') { if (props.importType === 'localAndUpload') {
// 本地解析 // 本地直接获取上传内容
emit('imported', { path: file.name, data: file })
if (fileInputRef.value) {
fileInputRef.value.value = ''
}
loading.value = false
return
}
if (props.importType === 'localAndXlsx') {
// 本地解析,并自行处理xlsx数据
const reader = new FileReader() const reader = new FileReader()
reader.onload = (evt) => { reader.onload = (evt) => {
const data = evt.target?.result const data = evt.target?.result
...@@ -134,6 +150,7 @@ const onFileChange = async (e: Event) => { ...@@ -134,6 +150,7 @@ const onFileChange = async (e: Event) => {
fileList.value = [{ path: file.name, filename: file.name }] fileList.value = [{ path: file.name, filename: file.name }]
value.value = file.name || '' value.value = file.name || ''
ElMessage.success('导入成功') ElMessage.success('导入成功')
loading.value = false
} }
reader.readAsBinaryString(file) reader.readAsBinaryString(file)
if (fileInputRef.value) fileInputRef.value.value = '' if (fileInputRef.value) fileInputRef.value.value = ''
...@@ -143,7 +160,18 @@ const onFileChange = async (e: Event) => { ...@@ -143,7 +160,18 @@ const onFileChange = async (e: Event) => {
await fileUpload(file) await fileUpload(file)
if (fileInputRef.value) fileInputRef.value.value = '' if (fileInputRef.value) fileInputRef.value.value = ''
} }
const resetUpload = () => {
fileList.value = []
value.value = ''
if (fileInputRef.value) {
fileInputRef.value.value = ''
}
}
// 暴露重置方法给父组件
defineExpose({
resetUpload,
})
const fileUpload = async (file: File) => { const fileUpload = async (file: File) => {
const formData = new FormData() const formData = new FormData()
const filename = file.name const filename = file.name
......
...@@ -19,7 +19,7 @@ export interface SearchForm { ...@@ -19,7 +19,7 @@ export interface SearchForm {
endTime: string | null endTime: string | null
exceptionHandling: number | undefined exceptionHandling: number | undefined
platform: string platform: string
productionClient:string productionClient: string
} }
export interface PodUsOrderListData { export interface PodUsOrderListData {
id: number id: number
...@@ -93,6 +93,7 @@ export interface ProductList { ...@@ -93,6 +93,7 @@ export interface ProductList {
tagIds?: string tagIds?: string
isProduction?: boolean isProduction?: boolean
createTime?: string createTime?: string
startStockingTime?: string | null
updateTime?: string updateTime?: string
remark?: string | null remark?: string | null
version?: number version?: number
......
...@@ -101,6 +101,7 @@ const [editForm, resetEditForm] = useValue<AddDeclarationRuleObj>({ ...@@ -101,6 +101,7 @@ const [editForm, resetEditForm] = useValue<AddDeclarationRuleObj>({
currency: 'USD', currency: 'USD',
}) })
const { const {
loading,
currentPage, currentPage,
pageSize, pageSize,
total, total,
...@@ -466,7 +467,7 @@ const tableConfig = ref<TableColumn[]>([ ...@@ -466,7 +467,7 @@ const tableConfig = ref<TableColumn[]>([
}, },
]) ])
const loading = ref(false) // const loading = ref(false)
/** /**
* @description: 取消按钮 * @description: 取消按钮
......
...@@ -436,7 +436,7 @@ onMounted(() => { ...@@ -436,7 +436,7 @@ onMounted(() => {
}) })
async function search() { async function search() {
loading.value = true // loading.value = true
const isEqual = const isEqual =
JSON.stringify(searchForm.value) === JSON.stringify({ logisticsIdList: [] }) JSON.stringify(searchForm.value) === JSON.stringify({ logisticsIdList: [] })
try { try {
...@@ -448,7 +448,7 @@ async function search() { ...@@ -448,7 +448,7 @@ async function search() {
} catch (e) { } catch (e) {
console.log(e) console.log(e)
} finally { } finally {
loading.value = false // loading.value = false
} }
} }
...@@ -729,6 +729,7 @@ function handleSizeChange(val: number) { ...@@ -729,6 +729,7 @@ function handleSizeChange(val: number) {
} }
async function getList() { async function getList() {
loading.value = true
try { try {
const { data } = await getlogisticsQuotationPage({ const { data } = await getlogisticsQuotationPage({
...searchForm.value, ...searchForm.value,
...@@ -741,10 +742,13 @@ async function getList() { ...@@ -741,10 +742,13 @@ async function getList() {
mergeCells.value = [] mergeCells.value = []
} catch (error) { } catch (error) {
console.log(error) console.log(error)
} finally {
loading.value = false
} }
} }
const templeData = ref<LogisticsQuotation[]>([]) const templeData = ref<LogisticsQuotation[]>([])
async function getSearchList() { async function getSearchList() {
loading.value = true
try { try {
const { data } = await getlogisticsQuotationList({ const { data } = await getlogisticsQuotationList({
...searchForm.value, ...searchForm.value,
...@@ -784,6 +788,8 @@ async function getSearchList() { ...@@ -784,6 +788,8 @@ async function getSearchList() {
mergeCells.value = newMergeCells mergeCells.value = newMergeCells
} catch (error) { } catch (error) {
console.log(error) console.log(error)
} finally {
loading.value = false
} }
} }
......
...@@ -74,7 +74,7 @@ const checkAll = ref(false) ...@@ -74,7 +74,7 @@ const checkAll = ref(false)
const selectedList = ref<(string | number)[]>([]) const selectedList = ref<(string | number)[]>([])
// 显示弹窗 // 显示弹窗
const showDialog = (type: string) => { const showDialog = (type?: string) => {
console.log(type) console.log(type)
resultDialog.value = true resultDialog.value = true
......
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
style="width: 130px" style="width: 130px"
> >
<ElOption <ElOption
v-for="(item, index) in ['自有物流','工厂物流']" v-for="(item, index) in ['自有物流', '工厂物流']"
:key="index" :key="index"
:value="index" :value="index"
:label="item" :label="item"
...@@ -245,7 +245,13 @@ ...@@ -245,7 +245,13 @@
</div> </div>
<div class="operation-box mb-10"> <div class="operation-box mb-10">
<span v-if="status === 'PICKING'" class="item"> <span v-if="status === 'PICKING'" class="item">
<ElButton :loading="downloadLoading" type="warning" @click="downloadTif"> 排版 </ElButton> <ElButton
:loading="downloadLoading"
type="primary"
@click="downloadTif"
>
排版
</ElButton>
</span> </span>
<span v-if="status === 'TO_BE_CONFIRMED'" class="item"> <span v-if="status === 'TO_BE_CONFIRMED'" class="item">
<ElButton type="success" @click="confirmOrder"> 确认 </ElButton> <ElButton type="success" @click="confirmOrder"> 确认 </ElButton>
...@@ -253,8 +259,13 @@ ...@@ -253,8 +259,13 @@
<span v-if="status === 'EXCEPTION_ORDER'" class="item"> <span v-if="status === 'EXCEPTION_ORDER'" class="item">
<ElButton type="success" @click="updateOrder"> 转至待确认 </ElButton> <ElButton type="success" @click="updateOrder"> 转至待确认 </ElButton>
</span> </span>
<span v-if="status === 'EXCEPTION_ORDER' && exceptionStatus === 3" class="item"> <span
<ElButton type="success" @click="asyncOrderAddress"> 同步收货地址 </ElButton> v-if="status === 'EXCEPTION_ORDER' && exceptionStatus === 3"
class="item"
>
<ElButton type="success" @click="asyncOrderAddress">
同步收货地址
</ElButton>
</span> </span>
<span <span
v-if="status === 'EXCEPTION_ORDER' && exceptionStatus === 1" v-if="status === 'EXCEPTION_ORDER' && exceptionStatus === 1"
...@@ -596,7 +607,7 @@ ...@@ -596,7 +607,7 @@
<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="order-detail-item-value"> <span class="order-detail-item-value">
{{ ['自有物流','工厂物流'][row.shipmentType] }} {{ ['自有物流', '工厂物流'][row.shipmentType] }}
</span> </span>
</div> </div>
<div class="order-detail-item"> <div class="order-detail-item">
...@@ -697,6 +708,15 @@ ...@@ -697,6 +708,15 @@
{{ row.lanshouAddress }} {{ row.lanshouAddress }}
</span> </span>
</div> </div>
<div
v-if="['TO_BE_CONFIRMED', 'STOCK_OUT'].includes(status)"
class="order-detail-item"
>
<span class="order-detail-item-label">订单延期时间:</span>
<span class="order-detail-item-value red-time">
{{ calculateDelayTime(row) }}
</span>
</div>
</div> </div>
</template> </template>
<template #price="{ row }"> <template #price="{ row }">
...@@ -758,6 +778,9 @@ ...@@ -758,6 +778,9 @@
</div> </div>
</div> --> </div> -->
</template> </template>
<template #exceptionReason="{ row }">
<div v-html="row.exceptionReason"></div>
</template>
<template #innerLabel="{ row }"> <template #innerLabel="{ row }">
<div v-if="row.internalMemoList" class="inner-label-box"> <div v-if="row.internalMemoList" class="inner-label-box">
<div <div
...@@ -775,8 +798,10 @@ ...@@ -775,8 +798,10 @@
</template> </template>
<template #operate="{ row }"> <template #operate="{ row }">
<div class="operate-box"> <div class="operate-box">
<span class="operate-item" style="display: flex;flex-direction: column"> <span
class="operate-item"
style="display: flex; flex-direction: column"
>
<ElButton <ElButton
link link
type="primary" type="primary"
...@@ -793,7 +818,10 @@ ...@@ -793,7 +818,10 @@
确认 确认
</ElButton> </ElButton>
<ElButton <ElButton
v-if="row.shipmentType===1 && ['CREATE_LOGISTICS','WAIT_SHIPMENT'].includes(status)" v-if="
row.shipmentType === 1 &&
['CREATE_LOGISTICS', 'WAIT_SHIPMENT'].includes(status)
"
link link
type="primary" type="primary"
@click="handleUpdateAddress(row)" @click="handleUpdateAddress(row)"
...@@ -801,7 +829,10 @@ ...@@ -801,7 +829,10 @@
修改地址 修改地址
</ElButton> </ElButton>
<ElButton <ElButton
v-if="row.shipmentType===0 && ['CREATE_LOGISTICS','WAIT_SHIPMENT'].includes(status)" v-if="
row.shipmentType === 0 &&
['CREATE_LOGISTICS', 'WAIT_SHIPMENT'].includes(status)
"
link link
type="primary" type="primary"
@click="handleRefreshAddress(row)" @click="handleRefreshAddress(row)"
...@@ -1172,7 +1203,13 @@ ...@@ -1172,7 +1203,13 @@
</el-button> </el-button>
</template> </template>
</el-dialog> </el-dialog>
<UpdateAddress v-if="updateAddVisible" v-model:form="currentRow" v-model:visible="updateAddVisible" :country-list="countryList" @success="search"></UpdateAddress> <UpdateAddress
v-if="updateAddVisible"
v-model:form="currentRow"
v-model:visible="updateAddVisible"
:country-list="countryList"
@success="search"
></UpdateAddress>
<ElDialog <ElDialog
v-model="exceptionDialogVisible" v-model="exceptionDialogVisible"
title="转为异常单" title="转为异常单"
...@@ -1233,8 +1270,8 @@ ...@@ -1233,8 +1270,8 @@
</ElDialog> </ElDialog>
</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, WarningFilled } from '@element-plus/icons-vue'
import { import {
getCardOrderList, getCardOrderList,
...@@ -1265,11 +1302,15 @@ import { ...@@ -1265,11 +1302,15 @@ import {
changeLogisticsApi, changeLogisticsApi,
createLogisticsOrderApi, createLogisticsOrderApi,
updateLogisticsToPickingApi, updateLogisticsToPickingApi,
createLogisticsOrdersApi, syncReceiverAddress, refreshAddressApi, AddressInfo, createLogisticsOrdersApi,
syncReceiverAddress,
refreshAddressApi,
AddressInfo,
// handleExceptionOrderApi, // handleExceptionOrderApi,
} from '@/api/podUsOrder' } from '@/api/podUsOrder'
import { BaseRespData } from '@/types/api'
import UpdateAddress from './components/updateAddress.vue' import UpdateAddress from './components/updateAddress.vue'
import { BaseRespData } from '@/types/api'
import { getAllCountryApi } from '@/api/logistics.ts'
import TableView from '@/components/TableView.vue' import TableView from '@/components/TableView.vue'
import { import {
LogListData, LogListData,
...@@ -1286,7 +1327,7 @@ import { useValue } from '@/utils/hooks/useValue' ...@@ -1286,7 +1327,7 @@ import { useValue } from '@/utils/hooks/useValue'
import { showConfirm } from '@/utils/ui' import { showConfirm } from '@/utils/ui'
import { DocumentCopy, EditPen } from '@element-plus/icons-vue' import { DocumentCopy, EditPen } from '@element-plus/icons-vue'
import { Column, ElFormItem } from 'element-plus' import { Column, ElFormItem } from 'element-plus'
import { computed, onMounted, ref, nextTick } from 'vue' import { computed, onMounted, ref, nextTick, onBeforeUnmount } from 'vue'
import FastProduction from './FastProduction.vue' import FastProduction from './FastProduction.vue'
import { filePath } from '@/api/axios' import { filePath } from '@/api/axios'
import PodMakeOrder from './PodMakeOrder.vue' import PodMakeOrder from './PodMakeOrder.vue'
...@@ -1297,7 +1338,6 @@ import RightClickMenu from '@/components/RightClickMenu.vue' ...@@ -1297,7 +1338,6 @@ 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'
import { getAllCountryApi } from '@/api/logistics.ts'
declare global { declare global {
interface Window { interface Window {
ActiveXObject: { ActiveXObject: {
...@@ -1312,26 +1352,14 @@ declare global { ...@@ -1312,26 +1352,14 @@ declare global {
responseBody?: unknown responseBody?: unknown
} }
} }
const updateAddVisible = ref(false)
const tabsNav = ref<Tab[]>() const tabsNav = ref<Tab[]>()
const countryList = ref([]) const updateAddVisible = ref(false)
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)
const isChangeWay = ref(false) const isChangeWay = ref(false)
const confirmData = ref([]) const confirmData = ref([])
const logisticsWayData = ref([]) const logisticsWayData = ref([])
const currentRow = ref<AddressInfo>({
receiverName: '',
receiverPhone: '',
receiverCountry: '',
receiverProvince: '',
receiverCity: '',
receiverDistrict: '',
receiverAddress1: '',
receiverAddress2: '',
receiverPostCode: '',
})
const confirmSelectionData = ref<LogisticsData[]>([]) const confirmSelectionData = ref<LogisticsData[]>([])
const confirmRowData = ref<ProductList | null>(null) const confirmRowData = ref<ProductList | null>(null)
const status = ref('TO_BE_CONFIRMED') const status = ref('TO_BE_CONFIRMED')
...@@ -1354,6 +1382,18 @@ const [searchForm] = useValue<SearchForm>({ ...@@ -1354,6 +1382,18 @@ const [searchForm] = useValue<SearchForm>({
platform: '', platform: '',
productionClient: '', productionClient: '',
}) })
const countryList = ref([])
const currentRow = ref<AddressInfo>({
receiverName: '',
receiverPhone: '',
receiverCountry: '',
receiverProvince: '',
receiverCity: '',
receiverDistrict: '',
receiverAddress1: '',
receiverAddress2: '',
receiverPostCode: '',
})
const exceptionStatus = ref(1) const exceptionStatus = ref(1)
const userMarkList = ref<string[]>([]) const userMarkList = ref<string[]>([])
const selection = ref<PodUsOrderListData[]>([]) const selection = ref<PodUsOrderListData[]>([])
...@@ -1412,21 +1452,7 @@ const getDateRange = (days = 0, type: 'past' | 'future' = 'past') => { ...@@ -1412,21 +1452,7 @@ const getDateRange = (days = 0, type: 'past' | 'future' = 'past') => {
type === 'past' ? end.subtract(days, 'day') : end.add(days, 'day') type === 'past' ? end.subtract(days, 'day') : end.add(days, 'day')
return [start.startOf('day').toDate(), end.endOf('day').toDate()] return [start.startOf('day').toDate(), end.endOf('day').toDate()]
} }
const handleRefreshAddress = async (row: PodUsOrderListData) => {
const getMonthRange = (months = 0, type: 'past' | 'future' = 'past') => {
const now = dayjs()
const start =
type === 'past' ? now.subtract(months, 'month') : now.add(months, 'month')
return [start.startOf('month').toDate(), start.endOf('month').toDate()]
}
const getWeekRange = (weeks = 0, type: 'past' | 'future' = 'past') => {
const now = dayjs()
const start =
type === 'past' ? now.subtract(weeks, 'week') : now.add(weeks, 'week')
return [start.startOf('week').toDate(), start.endOf('week').toDate()]
}
const handleRefreshAddress = async (row:PodUsOrderListData) => {
try { try {
await showConfirm('确定刷新地址吗?', { await showConfirm('确定刷新地址吗?', {
confirmButtonText: '确认', confirmButtonText: '确认',
...@@ -1437,19 +1463,36 @@ const handleRefreshAddress = async (row:PodUsOrderListData) => { ...@@ -1437,19 +1463,36 @@ const handleRefreshAddress = async (row:PodUsOrderListData) => {
return return
} }
await refreshAddressApi([row.id]) await refreshAddressApi([row.id])
await ElMessageBox.alert('请修改/刷新地址后取消物流重新创建物流订单、获取跟踪号、获取打印面单。', '提示', { await ElMessageBox.alert(
'请修改/刷新地址后取消物流重新创建物流订单、获取跟踪号、获取打印面单。',
'提示',
{
type: 'warning', type: 'warning',
confirmButtonText:'确定', confirmButtonText: '确定',
cancelButtonText:'取消', cancelButtonText: '取消',
showCancelButton: true, showCancelButton: true,
}) },
)
} }
const handleUpdateAddress = async (row:PodUsOrderListData) => { const handleUpdateAddress = async (row: PodUsOrderListData) => {
const { data } = await getAllCountryApi() const { data } = await getAllCountryApi()
countryList.value = data countryList.value = data
currentRow.value = JSON.parse(JSON.stringify(row)) currentRow.value = JSON.parse(JSON.stringify(row))
updateAddVisible.value = true updateAddVisible.value = true
} }
const getMonthRange = (months = 0, type: 'past' | 'future' = 'past') => {
const now = dayjs()
const start =
type === 'past' ? now.subtract(months, 'month') : now.add(months, 'month')
return [start.startOf('month').toDate(), start.endOf('month').toDate()]
}
const getWeekRange = (weeks = 0, type: 'past' | 'future' = 'past') => {
const now = dayjs()
const start =
type === 'past' ? now.subtract(weeks, 'week') : now.add(weeks, 'week')
return [start.startOf('week').toDate(), start.endOf('week').toDate()]
}
const tableColumns = computed(() => [ const tableColumns = computed(() => [
{ {
label: '商品', label: '商品',
...@@ -1482,10 +1525,12 @@ const tableColumns = computed(() => [ ...@@ -1482,10 +1525,12 @@ const tableColumns = computed(() => [
slot: 'innerLabel', slot: 'innerLabel',
width: 300, width: 300,
prop: 'innerLabel', prop: 'innerLabel',
},{ },
{
label: '异常原因', label: '异常原因',
width: 300, width: 300,
prop: 'exceptionReason', prop: 'exceptionReason',
slot: 'exceptionReason',
}, },
{ {
label: '操作', label: '操作',
...@@ -1511,6 +1556,44 @@ const handleSelectionChange = (val: PodUsOrderListData[]) => { ...@@ -1511,6 +1556,44 @@ const handleSelectionChange = (val: PodUsOrderListData[]) => {
stockOutSuccessIds.value = [] stockOutSuccessIds.value = []
} }
} }
const asyncOrderAddress = async () => {
if (selection.value.length === 0) {
return ElMessage.warning('请选择数据')
}
try {
await showConfirm('确定同步收货地址吗?', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
} catch {
return
}
const ids = selection.value.map((item) => item.id)
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const res = await syncReceiverAddress(ids)
if (res.code !== 200) return
await ElMessageBox.alert('同步收货地址成功,请刷新查看。', '提示', {
type: 'warning',
confirmButtonText: '确定',
cancelButtonText: '取消',
showCancelButton: true,
})
search()
await loadTabData()
} catch (e) {
console.error(e)
} finally {
loading.close()
}
}
const changeTab = (item: Tab) => { const changeTab = (item: Tab) => {
status.value = item.status || '' status.value = item.status || ''
selection.value = [] selection.value = []
...@@ -1688,19 +1771,17 @@ const confirmOrder = async () => { ...@@ -1688,19 +1771,17 @@ const confirmOrder = async () => {
} }
const downloadTif = async () => { const downloadTif = async () => {
if(!selection.value.length) { if (!selection.value.length) {
return ElMessage.warning('请选择数据') return ElMessage.warning('请选择数据')
} }
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('http://ps.jomalls.com/tiff/'+res.message, '_blank') window.open(filePath + res.message, '_blank')
downloadLoading.value = false downloadLoading.value = false
}catch (e){ } catch (e) {
console.log(e)
downloadLoading.value = false downloadLoading.value = false
} }
} }
const loadProductionClient = async () => { const loadProductionClient = async () => {
...@@ -1767,37 +1848,6 @@ const updateOrder = async () => { ...@@ -1767,37 +1848,6 @@ const updateOrder = async () => {
loading.close() loading.close()
} }
} }
const asyncOrderAddress = async () => {
if (selection.value.length === 0) {
return ElMessage.warning('请选择数据')
}
try {
await showConfirm('确定同步收货地址吗?', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
} catch {
return
}
const ids = selection.value.map((item) => item.id)
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const res = await syncReceiverAddress(ids)
if (res.code !== 200) return
ElMessage.success('同步成功')
search()
await loadTabData()
} catch (e) {
console.error(e)
} finally {
loading.close()
}
}
const assignOrder = async () => { const assignOrder = async () => {
if (selection.value.length === 0) { if (selection.value.length === 0) {
return ElMessage.warning('请选择数据') return ElMessage.warning('请选择数据')
...@@ -2181,7 +2231,7 @@ const getOrderByIdApi = async (type: string) => { ...@@ -2181,7 +2231,7 @@ const getOrderByIdApi = async (type: string) => {
const res = await operation.Fn(ids) const res = await operation.Fn(ids)
if (res.code === 200) { if (res.code === 200) {
if (isArray(res.data)) { if (isArray(res.data)) {
resultInfo.value = res.data resultInfo.value = res.data || []
resultRefs.value?.showDialog(type) resultRefs.value?.showDialog(type)
} else if (isString(res.data)) { } else if (isString(res.data)) {
window.open(filePath + res.data) window.open(filePath + res.data)
...@@ -2191,6 +2241,7 @@ const getOrderByIdApi = async (type: string) => { ...@@ -2191,6 +2241,7 @@ const getOrderByIdApi = async (type: string) => {
} }
loading.close() loading.close()
} catch (e) { } catch (e) {
resultInfo.value = []
console.error(e) console.error(e)
} }
} else { } else {
...@@ -2393,10 +2444,13 @@ const logisticsToPicking = async () => { ...@@ -2393,10 +2444,13 @@ const logisticsToPicking = async () => {
ids: selection.value.map((item) => item.id).join(','), ids: selection.value.map((item) => item.id).join(','),
}) })
if (res.code !== 200) return if (res.code !== 200) return
resultInfo.value = res.data || []
resultRefs.value?.showDialog()
ElMessage.success('操作成功') ElMessage.success('操作成功')
search() search()
loadTabData() loadTabData()
} catch (e) { } catch (e) {
resultInfo.value = []
console.error(e) console.error(e)
} finally { } finally {
loading.close() loading.close()
...@@ -2637,13 +2691,56 @@ const refreshMaterial = async () => { ...@@ -2637,13 +2691,56 @@ const refreshMaterial = async () => {
loading.close() loading.close()
} }
} }
// 当前时间响应式变量(每60秒更新一次)
const currentTime = ref(new Date())
// 定时器实例
let timer: number | null = null
onMounted(() => { onMounted(() => {
loadTabData() loadTabData()
getUserMark() getUserMark()
loadProductionClient() loadProductionClient()
loadWarehouseList() loadWarehouseList()
// 每60秒更新一次当前时间
timer = window.setInterval(() => {
currentTime.value = new Date()
}, 60000)
}) })
// 计算时间差(小时数)并向上取整
const calculateHoursDifference = (startDateString?: string): string => {
if (!startDateString) return '--'
try {
const startTime = new Date(startDateString)
const diffInMs = currentTime.value.getTime() - startTime.getTime()
// 转换为小时并取整:ceil向上或者round:四舍五入
const hours = Math.round(diffInMs / (1000 * 60 * 60))
return `${hours}小时`
} catch (error) {
console.error('日期解析错误:', error)
return '--'
}
}
// 根据订单状态计算延期时间
const calculateDelayTime = computed(() => (row: ProductList) => {
switch (status.value) {
case 'TO_BE_CONFIRMED':
return row.createTime ? calculateHoursDifference(row.createTime) : '--'
case 'STOCK_OUT':
return row.startStockingTime
? calculateHoursDifference(row.startStockingTime)
: '--'
default:
return '--'
}
})
onBeforeUnmount(() => {
// 组件卸载时清除定时器
if (timer) {
clearInterval(timer)
timer = null
}
})
const handleExceptionCommand = (command: number) => { const handleExceptionCommand = (command: number) => {
exceptionStatus.value = command exceptionStatus.value = command
search() search()
...@@ -2729,6 +2826,10 @@ const handleExceptionCommand = (command: number) => { ...@@ -2729,6 +2826,10 @@ const handleExceptionCommand = (command: number) => {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.red-time {
color: red;
font-weight: bold;
}
} }
.card-list { .card-list {
...@@ -2739,12 +2840,6 @@ const handleExceptionCommand = (command: number) => { ...@@ -2739,12 +2840,6 @@ const handleExceptionCommand = (command: number) => {
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
} }
.operate-item{
.el-button{
margin-left: 0 !important;
margin-top: 20px !important;
}
}
.tabs-node_count { .tabs-node_count {
display: inline-block; display: inline-block;
min-width: 20px; min-width: 20px;
...@@ -2863,8 +2958,15 @@ const handleExceptionCommand = (command: number) => { ...@@ -2863,8 +2958,15 @@ const handleExceptionCommand = (command: number) => {
} }
} }
} }
.operate-item {
.el-button {
margin-left: 0 !important;
margin-top: 20px !important;
}
}
</style> </style>
<style> <style lang="scss">
.customize-select-style { .customize-select-style {
.el-select-dropdown__list { .el-select-dropdown__list {
width: 500px; width: 500px;
......
...@@ -400,10 +400,16 @@ ...@@ -400,10 +400,16 @@
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<div class="import-dialog"> <div class="import-dialog">
<div class="import-header">
<el-button type="primary" link @click="downloadTemplate">
<el-icon><Download /></el-icon>
下载模板
</el-button>
</div>
<div class="import-content"> <div class="import-content">
<UploadExcel <UploadExcel
v-model="importedFileUrl" v-model="importedFileUrl"
:import-type="'local'" :import-type="'localAndXlsx'"
@imported="handleLocalImport" @imported="handleLocalImport"
/> />
</div> </div>
...@@ -791,7 +797,7 @@ ...@@ -791,7 +797,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ElMessage, ElRadioGroup, ElTree } from 'element-plus' import { ElMessage, ElRadioGroup, ElTree } from 'element-plus'
import { CirclePlusFilled } from '@element-plus/icons-vue' import { CirclePlusFilled,Download } from '@element-plus/icons-vue'
import splitDiv from '@/components/splitDiv/splitDiv.vue' import splitDiv from '@/components/splitDiv/splitDiv.vue'
import { ElTable } from 'element-plus' import { ElTable } from 'element-plus'
import usePageList from '@/utils/hooks/usePageList' import usePageList from '@/utils/hooks/usePageList'
...@@ -951,6 +957,14 @@ function getStartTime() { ...@@ -951,6 +957,14 @@ function getStartTime() {
const day = date.getDate() const day = date.getDate()
return `${year}-${month}-${day} 00:00:00` return `${year}-${month}-${day} 00:00:00`
} }
const downloadTemplate = () => {
const link = document.createElement('a')
link.href = '/files/outboundOrder.xlsx'
link.download = 'outboundOrder.xlsx'
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
}
const selectSku = ref('') const selectSku = ref('')
const treeData = ref<InterWarehouseTree[]>() const treeData = ref<InterWarehouseTree[]>()
const [searchForm, resetSearchForm] = useValue<warehouseSearchForm>({}) const [searchForm, resetSearchForm] = useValue<warehouseSearchForm>({})
...@@ -1097,9 +1111,9 @@ const batchAddCommodity = async (sku: string): Promise<InterskuList[]> => { ...@@ -1097,9 +1111,9 @@ const batchAddCommodity = async (sku: string): Promise<InterskuList[]> => {
} }
} }
interface InterImportData { interface InterImportData {
warehouseSku: string; warehouseSku: string
remark?: string | null; remark?: string | null
buyStored?: string | number | null | object; // 扩大 buyStored 类型,以兼容原始数据 buyStored?: string | number | null | object // 扩大 buyStored 类型,以兼容原始数据
[propName: string]: string | number | boolean | undefined | unknown [propName: string]: string | number | boolean | undefined | unknown
} }
// 前端导入Excel // 前端导入Excel
...@@ -1122,70 +1136,87 @@ const handleLocalImport = async ({ ...@@ -1122,70 +1136,87 @@ const handleLocalImport = async ({
data: Record<string, any>[] data: Record<string, any>[]
}) => { }) => {
// 1. 将原始导入数据映射到 InterImportData[] // 1. 将原始导入数据映射到 InterImportData[]
const importedData: InterImportData[] = data.map(item => { const importedData: InterImportData[] = data
const obj: InterImportData = { warehouseSku: '' }; .map((item) => {
Object.keys(excelFieldMap).forEach(excelKey => { const obj: InterImportData = { warehouseSku: '' }
const field = excelFieldMap[excelKey]; Object.keys(excelFieldMap).forEach((excelKey) => {
const value = item[excelKey]; const field = excelFieldMap[excelKey]
const value = item[excelKey]
if (field === 'warehouseSku') { if (field === 'warehouseSku') {
obj[field] = typeof value === 'string' ? value : String(value ?? ''); obj[field] = typeof value === 'string' ? value : String(value ?? '')
} else if (field === 'remark') { } else if (field === 'remark') {
obj[field] = typeof value === 'string' ? value : (value === null || value === undefined ? null : String(value)); obj[field] =
typeof value === 'string'
? value
: value === null || value === undefined
? null
: String(value)
} else if (field === 'buyStored') { } else if (field === 'buyStored') {
// 处理 buyStored: 确保它是一个数字、数字字符串,否则设置为 null // 处理 buyStored: 确保它是一个数字、数字字符串,否则设置为 null
if (typeof value === 'number') { if (typeof value === 'number') {
obj[field] = String(value); // 将数字转换为字符串 obj[field] = String(value) // 将数字转换为字符串
} else if (typeof value === 'string' && !isNaN(Number(value))) { } else if (typeof value === 'string' && !isNaN(Number(value))) {
obj[field] = value; // 保持有效的数字字符串 obj[field] = value // 保持有效的数字字符串
} else { } else {
// 如果不是数字或有效的数字字符串,则设置为 null // 如果不是数字或有效的数字字符串,则设置为 null
obj[field] = null; obj[field] = null
} }
} else { } else {
obj[field] = value; obj[field] = value
} }
}); })
return obj; return obj
}).filter(item => item.warehouseSku); })
.filter((item) => item.warehouseSku)
if (importedData.length === 0) { if (importedData.length === 0) {
ElMessage.warning('导入数据中没有有效的商品SKU'); ElMessage.warning('导入数据中没有有效的商品SKU')
importDialogVisible.value = false; importDialogVisible.value = false
return; return
} }
// 2. 提取导入的 SKU 列表 // 2. 提取导入的 SKU 列表
const importedSkus = importedData.map(item => item.warehouseSku).join(','); const importedSkus = importedData.map((item) => item.warehouseSku).join(',')
// 3. 调用 batchAddCommodity 获取商品的完整信息并过滤掉已有的 SKU // 3. 调用 batchAddCommodity 获取商品的完整信息并过滤掉已有的 SKU
const filteredSkusList = await batchAddCommodity(importedSkus); const filteredSkusList = await batchAddCommodity(importedSkus)
if (filteredSkusList.length === 0) { if (filteredSkusList.length === 0) {
ElMessage.warning('导入的商品SKU已存在或无效'); ElMessage.warning('导入的商品SKU已存在或无效')
importedFileUrl.value = path; importedFileUrl.value = path
importDialogVisible.value = false; importDialogVisible.value = false
return; return
} }
// 4. 将备注信息合并到获取到的商品列表中 // 4. 将备注信息合并到获取到的商品列表中
const mergedProductList = filteredSkusList.map(skuItem => { const mergedProductList = filteredSkusList.map((skuItem) => {
const importedItem = importedData.find(item => item.warehouseSku === skuItem.warehouseSku); const importedItem = importedData.find(
(item) => item.warehouseSku === skuItem.warehouseSku,
)
let outCountValueForBigNumber: string | number = '0'; // 初始化为安全默认值 let outCountValueForBigNumber: string | number = '0' // 初始化为安全默认值
if (importedItem?.buyStored !== null && importedItem?.buyStored !== undefined) { if (
if (typeof importedItem.buyStored === 'string' && !isNaN(Number(importedItem.buyStored))) { importedItem?.buyStored !== null &&
outCountValueForBigNumber = importedItem.buyStored; importedItem?.buyStored !== undefined
) {
if (
typeof importedItem.buyStored === 'string' &&
!isNaN(Number(importedItem.buyStored))
) {
outCountValueForBigNumber = importedItem.buyStored
} else if (typeof importedItem.buyStored === 'number') { } else if (typeof importedItem.buyStored === 'number') {
outCountValueForBigNumber = importedItem.buyStored; outCountValueForBigNumber = importedItem.buyStored
} else { } else {
// 如果是对象或其他意外类型,则默认为 '0' // 如果是对象或其他意外类型,则默认为 '0'
outCountValueForBigNumber = '0'; outCountValueForBigNumber = '0'
} }
} }
const calculatedOutCount = new BigNumber(outCountValueForBigNumber).toNumber(); const calculatedOutCount = new BigNumber(
outCountValueForBigNumber,
).toNumber()
return { return {
skuImage: skuItem.image, skuImage: skuItem.image,
...@@ -1196,17 +1227,17 @@ const handleLocalImport = async ({ ...@@ -1196,17 +1227,17 @@ const handleLocalImport = async ({
locationId: skuItem.locationId ?? null, locationId: skuItem.locationId ?? null,
costPrice: skuItem.price, costPrice: skuItem.price,
outCount: calculatedOutCount, outCount: calculatedOutCount,
totalPrice: new BigNumber(calculatedOutCount).multipliedBy(skuItem.price ?? 0).toNumber(), totalPrice: new BigNumber(calculatedOutCount)
.multipliedBy(skuItem.price ?? 0)
.toNumber(),
usableInventory: skuItem.usableInventory, usableInventory: skuItem.usableInventory,
inventoryId: skuItem.id, inventoryId: skuItem.id,
remark: importedItem?.remark ?? skuItem.remark ?? null, remark: importedItem?.remark ?? skuItem.remark ?? null,
} as InterProductList; } as InterProductList
}); })
// 5. 更新 otherPurchaseData // 5. 更新 otherPurchaseData
otherPurchaseData.value = [...otherPurchaseData.value, ...mergedProductList]; otherPurchaseData.value = [...otherPurchaseData.value, ...mergedProductList]
importedFileUrl.value = path importedFileUrl.value = path
importDialogVisible.value = false importDialogVisible.value = false
...@@ -1974,7 +2005,7 @@ $border: solid 1px #ddd; ...@@ -1974,7 +2005,7 @@ $border: solid 1px #ddd;
} }
.import-content { .import-content {
padding: 20px 0; padding-bottom: 20px;
} }
} }
......
...@@ -13,11 +13,57 @@ import { ...@@ -13,11 +13,57 @@ import {
factoryWarehouseInfoPrint, factoryWarehouseInfoPrint,
importWarehouseLocation, importWarehouseLocation,
} from '@/api/warehouse.ts' } from '@/api/warehouse.ts'
const uploadExcelRef = ref()
import { Download } from '@element-plus/icons-vue'
import { nextTick, ref } from 'vue' import { nextTick, ref } from 'vue'
import SplitDiv from '@/components/splitDiv/splitDiv.vue' import SplitDiv from '@/components/splitDiv/splitDiv.vue'
import { filePath } from '@/api/axios.ts' import { filePath } from '@/api/axios.ts'
import UploadExcel from '@/components/UploadExcel.vue'
const importLoading = ref(false) const importDialogVisible = ref(false)
const importedFileUrl = ref('')
const importLocation = async () => {
importDialogVisible.value = true
importedFileUrl.value = ''
nextTick(() => {
uploadExcelRef.value?.resetUpload()
})
}
const handleLocalImport = async ({
path,
data,
}: {
path: string
data: Blob
}) => {
try {
const formData = new FormData()
formData.append('importExcel', data)
const res = await importWarehouseLocation(formData)
if (res.code == 200) {
importedFileUrl.value = path
ElMessage.success('导入成功')
await getData()
} else {
importedFileUrl.value = ''
ElMessage.error(res.message || '导入失败')
}
} catch (error) {
importedFileUrl.value = ''
ElMessage.error('导入失败')
} finally {
importDialogVisible.value = false
importedFileUrl.value = ''
}
}
const downloadTemplate = () => {
const link = document.createElement('a')
link.href = '/files/warehouseLocationTemplate.xlsx'
link.download = 'warehouseLocationTemplate.xlsx'
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
}
// const importLoading = ref(false)
const searchForm = ref({ const searchForm = ref({
warehouseId: '', warehouseId: '',
locationCode: '', locationCode: '',
...@@ -60,9 +106,7 @@ const rules = { ...@@ -60,9 +106,7 @@ const rules = {
pickingOrder: [ pickingOrder: [
{ required: true, message: '请输入拣货顺序', trigger: 'blur' }, { required: true, message: '请输入拣货顺序', trigger: 'blur' },
], ],
warehouseId: [ warehouseId: [{ required: true, message: '请选择仓库', trigger: 'change' }],
{ required: true, message: '请选择仓库', trigger: 'change' },
],
} }
const leftData = ref<positionInfo[]>([]) const leftData = ref<positionInfo[]>([])
const pagination = ref<factoryWarehouseInfo>({ const pagination = ref<factoryWarehouseInfo>({
...@@ -129,41 +173,43 @@ const handleBatchDelete = async (row: positionInfo | null) => { ...@@ -129,41 +173,43 @@ const handleBatchDelete = async (row: positionInfo | null) => {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
}) })
const str = row && row.id ? row.id?.toString() : selections.value.map((el) => el.id).join(',') const str =
row && row.id
? row.id?.toString()
: selections.value.map((el) => el.id).join(',')
await deleteLocationApi(str) await deleteLocationApi(str)
ElMessage.success('删除成功') ElMessage.success('删除成功')
await getData() await getData()
} }
const importLocation = async () => { // const importLocation = async () => {
const i = document.createElement('input') // const i = document.createElement('input')
i.type = 'file' // i.type = 'file'
i.style.display = 'none' // i.style.display = 'none'
i.accept = '.xlsx,.xls' // i.accept = '.xlsx,.xls'
i.click() // i.click()
i.onchange = async () => {
if (i && i.files) {
importLoading.value = true
try {
console.log(i.files[0])
const formData = new FormData()
formData.append('importExcel', i.files[0])
await importWarehouseLocation(formData)
ElMessage.success('导入成功')
await getData()
} finally {
importLoading.value = false
}
} // i.onchange = async () => {
} // if (i && i.files) {
} // importLoading.value = true
// try {
// console.log(i.files[0])
// // const formData = new FormData()
// // formData.append('importExcel', i.files[0])
// // await importWarehouseLocation(formData)
// // ElMessage.success('导入成功')
// // await getData()
// } finally {
// importLoading.value = false
// }
// }
// }
// }
const createWarehouse = () => { const createWarehouse = () => {
createData.value.show = true createData.value.show = true
createData.value.isEdit = false createData.value.isEdit = false
createData.value.title = '新增库位' createData.value.title = '新增库位'
const warehouse = warehouseList.value.find(w => w.defaulted === 1) const warehouse = warehouseList.value.find((w) => w.defaulted === 1)
form.value = { form.value = {
locationName: '', locationName: '',
locationCode: '', locationCode: '',
...@@ -207,7 +253,7 @@ const getWarehouse = async () => { ...@@ -207,7 +253,7 @@ const getWarehouse = async () => {
warehouseList.value = data warehouseList.value = data
} }
const warehouseChange = (v: number) => { const warehouseChange = (v: number) => {
const warehouse = warehouseList.value.find(w => w.id == v) const warehouse = warehouseList.value.find((w) => w.id == v)
form.value.warehouseName = warehouse ? warehouse.name : '' form.value.warehouseName = warehouse ? warehouse.name : ''
} }
getWarehouse() getWarehouse()
...@@ -219,37 +265,75 @@ getWarehouse() ...@@ -219,37 +265,75 @@ getWarehouse()
<el-card> <el-card>
<el-form inline :model="searchForm"> <el-form inline :model="searchForm">
<el-form-item label="仓库"> <el-form-item label="仓库">
<el-select v-model="searchForm.warehouseId" placeholder="请选择仓库" clearable filterable <el-select
style="width: 150px;"> v-model="searchForm.warehouseId"
<el-option v-for="item in warehouseList" :key="item.id" :label="item.name" :value="item.id"></el-option> placeholder="请选择仓库"
clearable
filterable
style="width: 150px"
>
<el-option
v-for="item in warehouseList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="库位名称"> <el-form-item label="库位名称">
<el-input <el-input
v-model="searchForm.locationName" style="width: 140px;" placeholder="请输入库位名称" v-model="searchForm.locationName"
clearable></el-input> style="width: 140px"
placeholder="请输入库位名称"
clearable
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="库位编码"> <el-form-item label="库位编码">
<el-input <el-input
v-model="searchForm.locationCode" style="width: 140px;" placeholder="请输入库位编码" v-model="searchForm.locationCode"
clearable></el-input> style="width: 140px"
placeholder="请输入库位编码"
clearable
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
<el-input <el-input
v-model="searchForm.remark" style="width: 140px;" placeholder="请输入备注" v-model="searchForm.remark"
clearable></el-input> style="width: 140px"
placeholder="请输入备注"
clearable
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="状态"> <el-form-item label="状态">
<el-select v-model="searchForm.status" placeholder="请选择状态" clearable filterable style="width: 150px;"> <el-select
<el-option v-for="(item,index) in ['禁用','启用']" :key="index" :label="item" :value="index"></el-option> v-model="searchForm.status"
placeholder="请选择状态"
clearable
filterable
style="width: 150px"
>
<el-option
v-for="(item, index) in ['禁用', '启用']"
:key="index"
:label="item"
:value="index"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="getData">查询</el-button> <el-button type="primary" @click="getData">查询</el-button>
<el-button type="success" @click="createWarehouse">新增库位</el-button> <el-button type="success" @click="createWarehouse"
<el-button :loading="importLoading" type="primary" @click="importLocation">导入库位</el-button> >新增库位</el-button
<el-button type="primary" @click="printLocationTag">打印库位标签</el-button> >
<el-button type="danger" @click="handleBatchDelete(null)">删除</el-button> <el-button type="primary" @click="importLocation"
>导入库位</el-button
>
<el-button type="primary" @click="printLocationTag"
>打印库位标签</el-button
>
<el-button type="danger" @click="handleBatchDelete(null)"
>删除</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
...@@ -257,30 +341,66 @@ getWarehouse() ...@@ -257,30 +341,66 @@ getWarehouse()
<template #bottom> <template #bottom>
<el-card style="height: 100%"> <el-card style="height: 100%">
<div class="manage"> <div class="manage">
<div class="table-flex"> <div class="table-flex">
<div class="left-table"> <div class="left-table">
<div class="table-container"> <div class="table-container">
<el-table height="100%" :data="leftData" border @selection-change="handleSelectionChange"> <el-table
height="100%"
:data="leftData"
border
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" /> <el-table-column type="selection" />
<el-table-column type="index" label="序号" width="60" /> <el-table-column type="index" label="序号" width="60" />
<el-table-column width="100" label="启用状态" prop="status" align="center"> <el-table-column
<template #default="{row}"> width="100"
label="启用状态"
prop="status"
align="center"
>
<template #default="{ row }">
<el-switch <el-switch
v-model="row.status" :active-value="1" :inactive-value="0" v-model="row.status"
@click="updateStatus(row)"></el-switch> :active-value="1"
:inactive-value="0"
@click="updateStatus(row)"
></el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="所属仓库" prop="warehouseName"></el-table-column> <el-table-column
<el-table-column align="center" label="库位名称" prop="locationName"></el-table-column> align="center"
<el-table-column align="center" label="库位编码" prop="locationCode"></el-table-column> label="所属仓库"
<el-table-column align="center" label="拣货顺序" prop="pickingOrder"></el-table-column> prop="warehouseName"
<el-table-column align="center" label="备注" prop="remark"></el-table-column> ></el-table-column>
<el-table-column
align="center"
label="库位名称"
prop="locationName"
></el-table-column>
<el-table-column
align="center"
label="库位编码"
prop="locationCode"
></el-table-column>
<el-table-column
align="center"
label="拣货顺序"
prop="pickingOrder"
></el-table-column>
<el-table-column
align="center"
label="备注"
prop="remark"
></el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template #default="{row}"> <template #default="{ row }">
<el-button type="primary" @click="updateWarehouse(row)">编辑</el-button> <el-button type="primary" @click="updateWarehouse(row)"
<el-button type="danger" @click="handleBatchDelete(row)">删除</el-button> >编辑</el-button
>
<el-button type="danger" @click="handleBatchDelete(row)"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -296,40 +416,68 @@ getWarehouse() ...@@ -296,40 +416,68 @@ getWarehouse()
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
/> />
</div> </div>
</div> </div>
</div> </div>
<el-dialog v-model="createData.show" width="500px" :title="createData.title"> <el-dialog
<el-form ref="formRef" label-width="110px" :rules="rules" :model="form"> v-model="createData.show"
width="500px"
:title="createData.title"
>
<el-form
ref="formRef"
label-width="110px"
:rules="rules"
:model="form"
>
<el-form-item label="库位名称" prop="locationName"> <el-form-item label="库位名称" prop="locationName">
<el-input v-model="form.locationName" clearable placeholder="请输入库位名称"></el-input> <el-input
v-model="form.locationName"
clearable
placeholder="请输入库位名称"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="库位编码" prop="locationCode"> <el-form-item label="库位编码" prop="locationCode">
<el-input v-model="form.locationCode" clearable placeholder="请输入库位编码(例如:A1-01-03)"></el-input> <el-input
v-model="form.locationCode"
clearable
placeholder="请输入库位编码(例如:A1-01-03)"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="拣货顺序" prop="pickingOrder"> <el-form-item label="拣货顺序" prop="pickingOrder">
<el-input-number v-model="form.pickingOrder" placeholder="拣货顺序"></el-input-number> <el-input-number
v-model="form.pickingOrder"
placeholder="拣货顺序"
></el-input-number>
</el-form-item> </el-form-item>
<el-form-item label="所属仓库" prop="warehouseId"> <el-form-item label="所属仓库" prop="warehouseId">
<el-select v-model="form.warehouseId" @change="warehouseChange"> <el-select v-model="form.warehouseId" @change="warehouseChange">
<el-option <el-option
v-for="item in warehouseList" :key="item.id" :label="item.name" v-for="item in warehouseList"
:value="item.id"></el-option> :key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input <el-input
v-model="form.remark" type="textarea" :rows="4" clearable v-model="form.remark"
placeholder="请输入备注"></el-input> type="textarea"
:rows="4"
clearable
placeholder="请输入备注"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
<el-switch <el-switch
v-model="form.status" :active-value="1" :inactive-value="0" v-model="form.status"
:active-value="1"
:inactive-value="0"
></el-switch> ></el-switch>
</el-form-item> </el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
<el-button @click="createData.show=false">取消</el-button> <el-button @click="createData.show = false">取消</el-button>
<el-button type="primary" @click="handleConfirm">确定</el-button> <el-button type="primary" @click="handleConfirm">确定</el-button>
</template> </template>
</el-dialog> </el-dialog>
...@@ -337,6 +485,29 @@ getWarehouse() ...@@ -337,6 +485,29 @@ getWarehouse()
</el-card> </el-card>
</template> </template>
</split-div> </split-div>
<ElDialog
v-model="importDialogVisible"
title="导入"
width="500px"
:close-on-click-modal="false"
>
<div class="import-dialog">
<div class="import-header">
<el-button type="primary" link @click="downloadTemplate">
<el-icon><Download /></el-icon>
下载模板
</el-button>
</div>
<div class="import-content">
<UploadExcel
ref="uploadExcelRef"
v-model="importedFileUrl"
:import-type="'localAndUpload'"
@imported="handleLocalImport"
/>
</div>
</div>
</ElDialog>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
...@@ -345,7 +516,16 @@ getWarehouse() ...@@ -345,7 +516,16 @@ getWarehouse()
height: 100%; height: 100%;
} }
} }
.import-dialog {
.import-header {
display: flex;
justify-content: flex-end;
}
.import-content {
padding-bottom: 20px;
}
}
.manage { .manage {
height: 100%; height: 100%;
display: flex; display: flex;
......
...@@ -432,16 +432,16 @@ ...@@ -432,16 +432,16 @@
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<div class="import-dialog"> <div class="import-dialog">
<!-- <div class="import-header"> <div class="import-header">
<el-button type="primary" link @click="downloadTemplate"> <el-button type="primary" link @click="downloadTemplate">
<el-icon><Download /></el-icon> <el-icon><Download /></el-icon>
下载模板 下载模板
</el-button> </el-button>
</div> --> </div>
<div class="import-content"> <div class="import-content">
<UploadExcel <UploadExcel
v-model="importedFileUrl" v-model="importedFileUrl"
:import-type="'local'" :import-type="'localAndXlsx'"
@imported="handleLocalImport" @imported="handleLocalImport"
/> />
</div> </div>
...@@ -829,7 +829,7 @@ ...@@ -829,7 +829,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ElMessage, ElRadioGroup, ElTree } from 'element-plus' import { ElMessage, ElRadioGroup, ElTree } from 'element-plus'
import { CirclePlusFilled } from '@element-plus/icons-vue' import { CirclePlusFilled,Download } from '@element-plus/icons-vue'
import splitDiv from '@/components/splitDiv/splitDiv.vue' import splitDiv from '@/components/splitDiv/splitDiv.vue'
import { ElTable } from 'element-plus' import { ElTable } from 'element-plus'
import usePageList from '@/utils/hooks/usePageList' import usePageList from '@/utils/hooks/usePageList'
...@@ -989,7 +989,14 @@ function getStartTime() { ...@@ -989,7 +989,14 @@ function getStartTime() {
const day = date.getDate() const day = date.getDate()
return `${year}-${month}-${day} 00:00:00` return `${year}-${month}-${day} 00:00:00`
} }
const downloadTemplate = () => {
const link = document.createElement('a')
link.href = '/files/warehousingEntry.xlsx'
link.download = 'warehousingEntry.xlsx'
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
}
const selectSku = ref('') const selectSku = ref('')
const treeData = ref<InterWarehouseTree[]>() const treeData = ref<InterWarehouseTree[]>()
const [searchForm, resetSearchForm] = useValue<warehouseSearchForm>({}) const [searchForm, resetSearchForm] = useValue<warehouseSearchForm>({})
...@@ -1960,7 +1967,7 @@ $border: solid 1px #ddd; ...@@ -1960,7 +1967,7 @@ $border: solid 1px #ddd;
} }
.import-content { .import-content {
padding: 20px 0; padding-bottom: 20px;
} }
} }
......
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