Commit f2798f7f by qinjianhui

Merge branch 'dev' into 'master'

Dev

See merge request !291
parents d8ce7fa2 6c4e5824
...@@ -24,19 +24,22 @@ declare module 'vue' { ...@@ -24,19 +24,22 @@ declare module 'vue' {
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem'] ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
ElDialog: typeof import('element-plus/es')['ElDialog'] ElDialog: typeof import('element-plus/es')['ElDialog']
ElDivider: typeof import('element-plus/es')['ElDivider'] ElDivider: typeof import('element-plus/es')['ElDivider']
ElDrawer: typeof import('element-plus/es')['ElDrawer'] ElDrawer: typeof import('element-plus/es')['ElDrawer']
ElDropdown: typeof import('element-plus/es')['ElDropdown'] ElDropdown: typeof import('element-plus/es')['ElDropdown']
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
ElEmpty: typeof import('element-plus/es')['ElEmpty']
ElForm: typeof import('element-plus/es')['ElForm'] ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElIcon: typeof import('element-plus/es')['ElIcon'] ElIcon: typeof import('element-plus/es')['ElIcon']
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']
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
ElOption: typeof import('element-plus/es')['ElOption'] ElOption: typeof import('element-plus/es')['ElOption']
ElPagination: typeof import('element-plus/es')['ElPagination'] ElPagination: typeof import('element-plus/es')['ElPagination']
ElPopover: typeof import('element-plus/es')['ElPopover'] ElPopover: typeof import('element-plus/es')['ElPopover']
......
...@@ -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",
......
...@@ -804,6 +804,7 @@ export function getFactoryOrderFlowConfigApi() { ...@@ -804,6 +804,7 @@ export function getFactoryOrderFlowConfigApi() {
'report/factory-order-flow-config/get-config', 'report/factory-order-flow-config/get-config',
) )
} }
// 配货分拣 商品类目 // 配货分拣 商品类目
export function getCategoryListApi() { export function getCategoryListApi() {
return axios.get<never, BaseRespData<OperatorList[]>>( return axios.get<never, BaseRespData<OperatorList[]>>(
......
...@@ -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[]
......
...@@ -496,12 +496,18 @@ const handleCreateInbound = async () => { ...@@ -496,12 +496,18 @@ const handleCreateInbound = async () => {
background: 'rgba(0, 0, 0, 0.3)', background: 'rgba(0, 0, 0, 0.3)',
}) })
try { try {
const skus = selections.value.map((r) => r.thirdSkuCode as string) warehouseList.value = []
const res = await getBySkuAndUserMarkApi(firstWid, skus.join(','), null) otherPurchaseData.value = []
if (res.code !== 200) return for(const item of selections.value){
otherPurchaseData.value = res.data.map((item: InterskuList) => if(item.thirdSkuCode){
mapInterskuToProduct(item), const userMark = item.thirdSkuCode.includes('JM')?null:item.thirdSkuCode.slice(0,4)
) const res = await getBySkuAndUserMarkApi(firstWid, item.thirdSkuCode, userMark)
if (res.code !== 200) return
otherPurchaseData.value = otherPurchaseData.value.concat(res.data.map((r: InterskuList) =>
mapInterskuToProduct(r),
) )
}
}
await fetchReceiptLocationList('') await fetchReceiptLocationList('')
const listRes = await warehouseInfoGetAll() const listRes = await warehouseInfoGetAll()
warehouseList.value = listRes.data || [] warehouseList.value = listRes.data || []
......
...@@ -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