Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
factory_front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinjianhui
factory_front
Commits
4b7fcd2a
Commit
4b7fcd2a
authored
Mar 20, 2025
by
zhuzhequan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工厂端pod添加
parent
dbcad4dc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
132 additions
and
90 deletions
+132
-90
src/api/common.ts
+37
-31
src/api/podOrder.ts
+7
-0
src/types/api/podOrder.ts
+1
-0
src/views/order/pod/index.vue
+87
-59
No files found.
src/api/common.ts
View file @
4b7fcd2a
import
{
BaseRespData
}
from
'@/types/api'
import
axios
from
'./axios'
import
{
LogisticsData
}
from
'@/types/api/order'
import
{
userData
}
from
'@/types/api/user'
import
{
VersionImageList
}
from
'@/types/api/typesetting'
// 获取物流公司
export
function
getLogisticsCompanyList
()
{
return
axios
.
get
<
never
,
BaseRespData
<
LogisticsData
[]
>>
(
'factory/customJomallOrder/getLogisticsList'
,
)
}
// 获取用户
export
function
getUserListApi
()
{
return
axios
.
get
<
never
,
BaseRespData
<
userData
[]
>>
(
'factory/factoryUser/list'
)
}
// 上传图片文件
export
function
uploadImageApi
(
data
:
FormData
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>
&
VersionImageList
>
(
'upload/ossUpload'
,
data
,
)
}
export
function
uploadFileApi
(
data
:
FormData
)
{
return
axios
.
post
<
never
,
BaseRespData
<
VersionImageList
>>
(
'supply/supplyTypesettingInfo/uploadManuscript'
,
data
,
)
}
import
{
BaseRespData
}
from
'@/types/api'
import
axios
from
'./axios'
import
{
LogisticsData
}
from
'@/types/api/order'
import
{
userData
}
from
'@/types/api/user'
import
{
VersionImageList
}
from
'@/types/api/typesetting'
// 获取物流公司
export
function
getLogisticsCompanyList
()
{
return
axios
.
get
<
never
,
BaseRespData
<
LogisticsData
[]
>>
(
'factory/customJomallOrder/getLogisticsList'
,
)
}
// 获取客户
export
function
getUserMarkList
()
{
return
axios
.
get
<
never
,
BaseRespData
<
string
[]
>>
(
'dbDiyUser/getUserMarkList'
,
)
}
// 获取用户
export
function
getUserListApi
()
{
return
axios
.
get
<
never
,
BaseRespData
<
userData
[]
>>
(
'factory/factoryUser/list'
)
}
// 上传图片文件
export
function
uploadImageApi
(
data
:
FormData
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>
&
VersionImageList
>
(
'upload/ossUpload'
,
data
,
)
}
export
function
uploadFileApi
(
data
:
FormData
)
{
return
axios
.
post
<
never
,
BaseRespData
<
VersionImageList
>>
(
'supply/supplyTypesettingInfo/uploadManuscript'
,
data
,
)
}
src/api/podOrder.ts
View file @
4b7fcd2a
...
...
@@ -105,6 +105,13 @@ export function confirmProductionOrder(ids: number[]) {
ids
,
)
}
// 确认生产
export
function
confirmProduct
(
ids
:
number
[])
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrder/confirmProduct'
,
ids
,
)
}
// 取消
export
function
cancelOrderApi
(
id
:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
...
...
src/types/api/podOrder.ts
View file @
4b7fcd2a
...
...
@@ -9,6 +9,7 @@ export interface SearchForm {
factorySubOrderNumber
?:
string
factoryOrderNumber
?:
string
customizedQuantity
?:
string
userMark
?:
string
shipmentNumber
?:
string
order
?:
string
prop
?:
string
...
...
src/views/order/pod/index.vue
View file @
4b7fcd2a
...
...
@@ -31,6 +31,17 @@
>
</el-date-picker>
</ElFormItem>
<ElFormItem
label=
"客户"
>
<el-select
v-model=
"searchForm.userMark"
clearable
filterable
style=
"width: 100px"
placeholder=
"客户"
>
<el-option
v-for=
"item in userMarkList"
:key=
"item"
:value=
"item"
:label=
"item"
></el-option>
</el-select>
</ElFormItem>
<ElFormItem
label=
"SKU"
>
<ElInput
v-model
.
trim=
"searchForm.sku"
...
...
@@ -39,6 +50,7 @@
style=
"width: 130px"
></ElInput>
</ElFormItem>
<!--
<ElFormItem
label=
"发货单号"
>
<ElInput
v-model=
"searchForm.shipmentNumber"
...
...
@@ -83,7 +95,7 @@
<el-select
v-model=
"searchForm.order"
clearable
style=
"width:
10
0px"
style=
"width:
8
0px"
placeholder=
"排序类型"
>
<el-option
value=
"asc"
label=
"正序"
></el-option>
...
...
@@ -132,7 +144,6 @@
<
/span
>
<
span
v
-
if
=
"
status === 'TO_BE_CONFIRMED' ||
status === 'IN_PRODUCTION' ||
status === 'PART_SHIPPING'
"
...
...
@@ -142,11 +153,11 @@
>
打印生产单
<
/ElButto
n
>
<
/span
>
<
span
v
-
if
=
"status === 'TO_BE_CONFIRMED'"
class
=
"item"
>
<
ElButton
type
=
"success"
dark
@
click
=
"exportManuscript"
>
导出生产单
<
/ElButto
n
>
<
/span
>
<!--
<
span
v
-
if
=
"status === 'TO_BE_CONFIRMED'"
class
=
"item"
>--
>
<!--
<
ElButton
type
=
"success"
dark
@
click
=
"exportManuscript"
-->
<!--
>
导出生产单
<
/ElButton--
>
<!--
>--
>
<!--
<
/span>--
>
<
span
class
=
"item"
>
<
ElButton
type
=
"warning"
@
click
=
"addInternalTag"
>
添加内部标签
<
/ElButto
n
...
...
@@ -185,7 +196,7 @@
>
<
ElButton
type
=
"success"
@
click
=
"confirmDelivery"
>
发货
<
/ElButton
>
<
/span
>
<
span
v
-
if
=
"
status === 'IN_PRODUCTION'
"
class
=
"item"
>
<
span
v
-
if
=
"
['TO_BE_CONFIRMED','IN_PRODUCTION'].includes(status)
"
class
=
"item"
>
<
ElButton
type
=
"danger"
@
click
=
"voidedBtn"
>
作废
<
/ElButton
>
<
/span
>
<
span
v
-
if
=
"status === 'IN_PRODUCTION'"
class
=
"item"
>
...
...
@@ -198,6 +209,7 @@
v
-
if
=
"
[
'IN_PRODUCTION',
'TO_BE_CONFIRMED',
'WAIT_SHIPMENT',
'TO_BE_REPLENISHMENT',
'INVALID',
...
...
@@ -346,7 +358,7 @@
:
offset
=
"0"
style
=
"text-align: right"
>
<
span
v
-
if
=
"
status === 'INVALID'
"
>
<
span
v
-
if
=
"
['INVALID','TO_BE_CONFIRMED'].includes(status)
"
>
数量:
{{
cardItem
?.
num
}}
<
/span
>
<
template
v
-
else
>
...
...
@@ -920,12 +932,11 @@ import RightMenu from './rightMenu.vue'
import
{
getOrderTabData
,
getOrderList
,
confirmProduct
ionOrder
,
confirmProduct
,
cancelOrderApi
,
downloadMaterialApi
,
addInternalTagApi
,
printOrder
,
exportOrder
,
getLogList
,
updateRemarkApi
,
getCardOrderList
,
...
...
@@ -964,7 +975,7 @@ import {
CardOrderData
,
}
from
'@/types/api/podOrder'
import
{
ArrowUp
,
ArrowDown
,
EditPen
}
from
'@element-plus/icons-vue'
import
{
getLogisticsCompanyList
}
from
'@/api/common'
import
{
getLogisticsCompanyList
,
getUserMarkList
}
from
'@/api/common'
import
{
ElButton
,
type
FormRules
}
from
'element-plus'
import
{
showConfirm
}
from
'@/utils/ui'
import
{
filePath
}
from
'@/api/axios'
...
...
@@ -978,6 +989,7 @@ const countVisible = ref(false)
const
keyCode
=
ref
(
''
)
const
cardItem
=
ref
<
PodProductList
|
CardOrderData
>
()
const
rightMenuRef
=
ref
()
const
userMarkList
=
ref
<
string
[]
>
([])
const
count
=
ref
<
number
>
(
0
)
const
rightClick
=
(
e
:
MouseEvent
,
item
:
PodProductList
|
CardOrderData
)
=>
{
cardItem
.
value
=
item
...
...
@@ -1302,18 +1314,21 @@ const loadDiffList = async () => {
'IN_PRODUCTION'
,
'WAIT_SHIPMENT'
,
'TO_BE_REPLENISHMENT'
,
'TO_BE_CONFIRMED'
,
'INVALID'
,
].
includes
(
status
.
value
)
)
{
await
loadCardList
()
}
else
{
loadOrderList
()
await
loadOrderList
()
updateColumnWidth
()
}
selection
.
value
=
[]
}
const
[
searchForm
]
=
useValue
<
SearchForm
>
({
timeType
:
null
,
shopNumber
:
''
,
userMark
:
''
,
customizedQuantity
:
''
,
order
:
'desc'
,
}
)
...
...
@@ -1455,6 +1470,8 @@ const getLogisticsList = async () => {
//showError(error)
}
}
const
refreshProduct
=
async
()
=>
{
if
(
selection
.
value
.
length
===
0
)
{
return
ElMessage
({
...
...
@@ -1473,7 +1490,7 @@ const refreshProduct = async () => {
return
}
const
ids
=
[]
if
([
'IN_PRODUCTION'
,
'WAIT_SHIPMENT'
].
includes
(
status
.
value
))
{
if
([
'IN_PRODUCTION'
,
'TO_BE_CONFIRMED'
,
'WAIT_SHIPMENT'
].
includes
(
status
.
value
))
{
ids
.
push
(
...
selection
.
value
.
map
(
(
item
:
CardOrderData
|
PodProductList
)
=>
item
.
podOrderId
as
number
,
...
...
@@ -1530,8 +1547,8 @@ const confirmProduce = async () => {
(
item
:
CardOrderData
|
PodProductList
)
=>
item
.
id
,
)
try
{
const
res
=
await
confirmProduct
ionOrder
(
ids
)
loadDiffList
()
const
res
=
await
confirmProduct
(
ids
)
await
loadDiffList
()
await
loadTabData
()
ElMessage
.
success
(
res
.
message
)
}
catch
(
e
)
{
...
...
@@ -1589,7 +1606,7 @@ const downloadMaterial = async () => {
}
)
}
const
ids
=
[]
if
([
'IN_PRODUCTION'
,
'WAIT_SHIPMENT'
].
includes
(
status
.
value
))
{
if
([
'IN_PRODUCTION'
,
'
TO_BE_CONFIRMED'
,
'
WAIT_SHIPMENT'
].
includes
(
status
.
value
))
{
ids
.
push
(
...
selection
.
value
.
map
((
item
:
CardOrderData
|
PodProductList
)
=>
item
.
id
),
)
...
...
@@ -1661,8 +1678,8 @@ const cancelOrder = async (id: number) => {
type
:
'success'
,
offset
:
window
.
innerHeight
/
2
,
}
)
loadTabData
()
loadDiffList
()
await
loadTabData
()
await
loadDiffList
()
}
catch
(
e
)
{
// showError(e)
}
...
...
@@ -1776,42 +1793,42 @@ const printManuscript = async () => {
loading
.
close
()
}
}
const
exportManuscript
=
async
()
=>
{
if
(
selection
.
value
.
length
===
0
)
{
return
ElMessage
({
message
:
'请选择订单'
,
type
:
'warning'
,
offset
:
window
.
innerHeight
/
2
,
}
)
}
const
ids
=
selection
.
value
.
map
(
(
item
:
CardOrderData
|
PodProductList
)
=>
item
.
id
,
)
try
{
await
showConfirm
(
'是否导出生产单'
,
{
confirmButtonText
:
'确认'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}
)
}
catch
{
return
}
const
loading
=
ElLoading
.
service
({
lock
:
true
,
text
:
'加载中...'
,
background
:
'rgba(0, 0, 0, 0.7)'
,
}
)
try
{
const
res
=
await
exportOrder
(
ids
,
status
.
value
)
window
.
open
(
filePath
+
res
.
message
)
}
catch
(
e
)
{
// showError(e)
console
.
error
(
e
)
}
finally
{
loading
.
close
()
}
}
//
const exportManuscript = async () =>
{
//
if (selection.value.length === 0)
{
//
return ElMessage(
{
//
message: '请选择订单',
//
type: 'warning',
//
offset: window.innerHeight / 2,
//
}
)
//
}
//
//
const ids = selection.value.map(
//
(item: CardOrderData | PodProductList) => item.id,
//
)
//
try
{
//
await showConfirm('是否导出生产单',
{
//
confirmButtonText: '确认',
//
cancelButtonText: '取消',
//
type: 'warning',
//
}
)
//
}
catch
{
//
return
//
}
//
const loading = ElLoading.service(
{
//
lock: true,
//
text: '加载中...',
//
background: 'rgba(0, 0, 0, 0.7)',
//
}
)
//
try
{
//
const res = await exportOrder(ids, status.value)
//
window.open(filePath + res.message)
//
}
catch
(
e
)
{
//
// showError(e)
//
console.error(e)
//
}
finally
{
//
loading.close()
//
}
//
}
const
logVisible
=
ref
(
false
)
const
logList
=
ref
<
LogListData
[]
>
([])
// 操作日志
...
...
@@ -1838,7 +1855,7 @@ const handleUpdateRemark = (id: number, remark: string) => {
try
{
await
updateRemarkApi
(
id
,
value
as
string
)
ElMessage
.
success
(
'操作成功'
)
loadDiffList
()
await
loadDiffList
()
}
catch
(
e
)
{
console
.
error
(
e
)
}
...
...
@@ -1877,7 +1894,7 @@ const applyEmbryoReplenishment = async (row: ProductList) => {
try
{
const
res
=
await
applyForReplenishmentApi
(
data
)
loadDiffList
()
await
loadDiffList
()
await
loadTabData
()
ElMessage
.
success
(
res
.
message
)
}
catch
(
e
)
{
...
...
@@ -1926,11 +1943,22 @@ const handleContextMenu = (e: MouseEvent) => {
const
listenerClick
=
()
=>
{
tableRightMenuVisible
.
value
=
false
}
onMounted
(()
=>
{
const
getUserMark
=
async
()
=>
{
try
{
const
res
=
await
getUserMarkList
()
userMarkList
.
value
=
res
.
data
}
catch
(
error
)
{
//showError(error)
}
}
onMounted
(
async
()
=>
{
document
.
addEventListener
(
'keydown'
,
listenerKeydown
)
document
.
addEventListener
(
'click'
,
listenerClick
)
await
loadTabData
()
getUserMark
()
getLogisticsList
()
load
TabData
()
load
DiffList
()
}
)
onBeforeUnmount
(()
=>
{
document
.
removeEventListener
(
'keydown'
,
listenerKeydown
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment