Commit 2b26f4ab by zhuzhequan

fix:bug修复

parent 77b7bb62
...@@ -27,6 +27,7 @@ declare module 'vue' { ...@@ -27,6 +27,7 @@ declare module 'vue' {
ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
ElSelect: typeof import('element-plus/es')['ElSelect'] ElSelect: typeof import('element-plus/es')['ElSelect']
ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTable: typeof import('element-plus/es')['ElTable'] ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
ElTooltip: typeof import('element-plus/es')['ElTooltip'] ElTooltip: typeof import('element-plus/es')['ElTooltip']
......
...@@ -6559,6 +6559,7 @@ ...@@ -6559,6 +6559,7 @@
"resolved": "https://registry.npmmirror.com/vite-plugin-compression/-/vite-plugin-compression-0.5.1.tgz", "resolved": "https://registry.npmmirror.com/vite-plugin-compression/-/vite-plugin-compression-0.5.1.tgz",
"integrity": "sha512-5QJKBDc+gNYVqL/skgFAP81Yuzo9R+EAf19d+EtsMF/i8kFUpNi3J/H01QD3Oo8zBQn+NzoCIFkpPLynoOzaJg==", "integrity": "sha512-5QJKBDc+gNYVqL/skgFAP81Yuzo9R+EAf19d+EtsMF/i8kFUpNi3J/H01QD3Oo8zBQn+NzoCIFkpPLynoOzaJg==",
"dev": true, "dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"chalk": "^4.1.2", "chalk": "^4.1.2",
"debug": "^4.3.3", "debug": "^4.3.3",
......
...@@ -553,7 +553,11 @@ export function getListCraftApi() { ...@@ -553,7 +553,11 @@ export function getListCraftApi() {
`factory/podJomallOrderProductCn/listCraft`, `factory/podJomallOrderProductCn/listCraft`,
) )
} }
export function getPodOrderCraftApi() {
return axios.post<never, BaseRespData<never>>(
`factory/podOrder/listCraft`,
)
}
// 批量下载 列表 // 批量下载 列表
export function batchDownloadApi( export function batchDownloadApi(
params: SearchForm, params: SearchForm,
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</div> </div>
</template> </template>
</ElTableColumn> </ElTableColumn>
<RenderColumn v-else :col="column"> <RenderColumn v-if="column.type !== 'expand' && !column.hidden" :col="column">
<template v-for="(_, name) of slots" #[name]="scope"> <template v-for="(_, name) of slots" #[name]="scope">
<slot :name="name" v-bind="scope" /> <slot :name="name" v-bind="scope" />
</template> </template>
......
...@@ -5,7 +5,12 @@ export interface StatusTreeNode { ...@@ -5,7 +5,12 @@ export interface StatusTreeNode {
unit?: string // 数量单位 unit?: string // 数量单位
children: StatusTreeNode[] | null children: StatusTreeNode[] | null
} }
export interface CraftData{
name:string
id:number | string
warehouseName:string
}
export interface SearchForm { export interface SearchForm {
status?: string status?: string
operationStatus?: string | string[] operationStatus?: string | string[]
......
...@@ -29,7 +29,7 @@ const processTypeMap: Record<string, string> = { ...@@ -29,7 +29,7 @@ const processTypeMap: Record<string, string> = {
QT: '其他', QT: '其他',
} }
export function useOrderDictionaries() { export function useOrderDictionaries(dontLoadCraft?:boolean) {
const userMarkList = ref<string[]>([]) const userMarkList = ref<string[]>([])
const receiverCountryList = ref<{ countryCode: string; nameCn: string }[]>([]) const receiverCountryList = ref<{ countryCode: string; nameCn: string }[]>([])
const customTagList = ref<{ id: string; name: string }[]>([]) const customTagList = ref<{ id: string; name: string }[]>([])
...@@ -136,16 +136,20 @@ export function useOrderDictionaries() { ...@@ -136,16 +136,20 @@ export function useOrderDictionaries() {
} }
const loadAllDictionaries = async () => { const loadAllDictionaries = async () => {
await Promise.all([ const arr = [
loadCraftList(),
getUserMark(), getUserMark(),
getCustomTagList(), getCustomTagList(),
getLogisticsCompanyAllCodelist(), getLogisticsCompanyAllCodelist(),
]) ]
if(!dontLoadCraft){
arr.unshift(loadCraftList())
}
await Promise.all(arr)
} }
return { return {
userMarkList, userMarkList,
processTypeMap,
receiverCountryList, receiverCountryList,
customTagList, customTagList,
allCodelist, allCodelist,
......
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
<ElFormItem label="工艺" label-width="50px"> <ElFormItem label="工艺" label-width="50px">
<LogisticsWaySelect <LogisticsWaySelect
v-model="searchForm.craftCode" v-model="searchForm.craftCode"
:company-list="craftList" :company-list="podCraftList"
:start-width="'150px'" :start-width="'150px'"
search-placeholder="搜索工艺名称" search-placeholder="搜索工艺名称"
start-placeholder="请选择工艺名称" start-placeholder="请选择工艺名称"
...@@ -1281,10 +1281,11 @@ import type { BaseRespData } from '@/types/api' ...@@ -1281,10 +1281,11 @@ import type { BaseRespData } from '@/types/api'
import type { import type {
FactoryOrderNewListData, FactoryOrderNewListData,
ProductListData, ProductListData,
CraftData,
ExportParams, ExportParams,
operateOrderListData, operateOrderListData,
} from '@/types/api/order/factoryOrderNew' } from '@/types/api/order/factoryOrderNew'
import type { AddressInfo } from '@/types/api/podCnOrder' import type { AddressInfo, CraftListData } from '@/types/api/podCnOrder'
import platformJson from '../../../json/platform.json' import platformJson from '../../../json/platform.json'
import { import {
refreshProductInfoApi, refreshProductInfoApi,
...@@ -1365,10 +1366,11 @@ import { useOrderBatchActions } from './hooks/useOrderBatchActions' ...@@ -1365,10 +1366,11 @@ import { useOrderBatchActions } from './hooks/useOrderBatchActions'
import { ElButton, ElTag } from 'element-plus' import { ElButton, ElTag } from 'element-plus'
import OrderInventoryDetailDialog from './component/OrderInventoryDialog.vue' import OrderInventoryDetailDialog from './component/OrderInventoryDialog.vue'
import { downloadByUrl } from '@/utils/index.ts' import { downloadByUrl } from '@/utils/index.ts'
import { getPodOrderCraftApi } from '@/api/podCnOrder.ts'
const resultInfo = ref<ResultInfoDataItem[]>([]) const resultInfo = ref<ResultInfoDataItem[]>([])
const resultRefs = ref() const resultRefs = ref()
const podCraftList = ref<CraftData[]>([])
const statusSidebarCollapsed = ref(false) const statusSidebarCollapsed = ref(false)
const toggleStatusSidebar = () => { const toggleStatusSidebar = () => {
statusSidebarCollapsed.value = !statusSidebarCollapsed.value statusSidebarCollapsed.value = !statusSidebarCollapsed.value
...@@ -1398,13 +1400,13 @@ const { ...@@ -1398,13 +1400,13 @@ const {
receiverCountryList, receiverCountryList,
customTagList, customTagList,
allCodelist, allCodelist,
craftList,
warehouseList, warehouseList,
processTypeMap,
productTypeGroups, productTypeGroups,
getReceiverCountryList, getReceiverCountryList,
loadWarehouseList, loadWarehouseList,
loadAllDictionaries, loadAllDictionaries,
} = useOrderDictionaries() } = useOrderDictionaries(true)
const refreshCurrentViewProxy = ref<() => void>(() => {}) const refreshCurrentViewProxy = ref<() => void>(() => {})
let getFactoryOrderSearchVisibilityContext: () => FactoryOrderSearchQueryVisibilityContext = let getFactoryOrderSearchVisibilityContext: () => FactoryOrderSearchQueryVisibilityContext =
...@@ -1521,6 +1523,17 @@ const getListQueryPayload = () => { ...@@ -1521,6 +1523,17 @@ const getListQueryPayload = () => {
return payload return payload
} }
const getCraft = async () => {
const res = await getPodOrderCraftApi()
const data: CraftListData[] = res.data
podCraftList.value = data.map((item:CraftListData) => ({
id: item.craftCode,
name: item.craftName,
warehouseName: processTypeMap[item.craftType] ?? '其他',
}))
}
getCraft()
const { const {
subLoading, subLoading,
activeTab, activeTab,
...@@ -1917,11 +1930,19 @@ const mainColumns = computed(() => [ ...@@ -1917,11 +1930,19 @@ const mainColumns = computed(() => [
}, },
{ {
prop: 'statusName', prop: 'statusName',
label: status.value !== 'SUSPEND' ? '订单状态' : '挂起前状态', label:'挂起前状态',
minWidth: 120,
hidden:status.value !== 'SUSPEND',
align: 'center'
},
{
prop: 'statusName',
hidden:status.value === 'SUSPEND',
label: '订单状态',
minWidth: 120, minWidth: 120,
align: 'center', align: 'center',
render: (row: FactoryOrderNewListData) => { render: (row: FactoryOrderNewListData) => {
return <span>{row.pause ? '挂起' : row.statusName}</span> return <span>{ row.pause ? '挂起' : row.statusName}</span>
}, },
}, },
{ {
......
...@@ -198,7 +198,6 @@ ...@@ -198,7 +198,6 @@
> >
<ElButton <ElButton
:disabled=" :disabled="
selection.find((item) => item.manuscriptStatus !== 30) ||
selection.length !== 1 selection.length !== 1
" "
type="warning" type="warning"
......
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