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
eac2d845
Commit
eac2d845
authored
Aug 11, 2025
by
linjinhong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into lin-task
parents
15fd2ba6
f08a0ccd
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
527 additions
and
252 deletions
+527
-252
src/api/axios.ts
+7
-0
src/api/common.ts
+2
-2
src/api/podUsOrder.ts
+11
-1
src/assets/images/printer.png
+0
-0
src/components/NavMenu.vue
+80
-16
src/views/error/error.vue
+1
-1
src/views/order/podUs/FastProduction.vue
+54
-0
src/views/order/podUs/index.vue
+372
-232
No files found.
src/api/axios.ts
View file @
eac2d845
...
...
@@ -60,6 +60,12 @@ export function getFilePath() {
import
.
meta
.
env
.
VITE_API_BASE_URL
+
import
.
meta
.
env
.
VITE_API_BASE_UPLOAD_URL
)
}
export
function
getFileCnPath
()
{
if
(
!
/
(
http|https
)
:
\/\/([^/]
+
)
/i
.
test
(
import
.
meta
.
env
.
BASE_URL
))
{
return
location
.
origin
}
return
import
.
meta
.
env
.
VITE_API_BASE_URL
}
export
function
getWsUrl
()
{
if
(
location
.
protocol
===
'https:'
)
{
return
'wss://'
+
location
.
host
...
...
@@ -68,5 +74,6 @@ export function getWsUrl() {
}
}
export
const
filePath
=
getFilePath
()
export
const
FileCnPath
=
getFileCnPath
()
export
default
axios
src/api/common.ts
View file @
eac2d845
...
...
@@ -34,14 +34,14 @@ export function uploadFileApi(data: FormData) {
)
}
//
获取
物流面单 US
//
打印
物流面单 US
export
function
getLogisticUSApi
(
content
:
string
)
{
return
axios
.
get
<
never
,
BaseRespData
<
{
documentUrl
:
string
}
>>
(
`factory/podJomallOrderUs/getDocument?content=
${
content
}
`
,
)
}
//
获取
物流面单 CN
//
打印
物流面单 CN
export
function
getLogisticCNApi
(
content
:
string
)
{
return
axios
.
get
<
never
,
BaseRespData
<
{
documentUrl
:
string
}
>>
(
`factory/podJomallOrder/getDocument?content=
${
content
}
`
,
...
...
src/api/podUsOrder.ts
View file @
eac2d845
...
...
@@ -481,7 +481,7 @@ export function batchDownloadDownloadApi(params: { id: number; type: string }) {
}
// 批量下载 删除
export
function
batchDownloadDeleteApi
(
params
:
{
id
:
number
})
{
export
function
batchDownloadDeleteApi
(
params
:
{
id
s
?:
string
})
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
`factory/podUsBatchDownload/delete`
,
{
...
...
@@ -543,3 +543,13 @@ export function statusPushApi(params: (string | number)[]) {
params
,
)
}
// 完成发货
export
function
completeDeliveryApi
(
params
:
{
orderIdList
:
(
string
|
number
)[]
})
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
`factory/podJomallOrderUs/completeDelivery`
,
params
,
)
}
src/assets/images/printer.png
0 → 100644
View file @
eac2d845
20 KB
src/components/NavMenu.vue
View file @
eac2d845
...
...
@@ -117,11 +117,11 @@
<img
src=
"../assets/images/brush-no.png"
width=
"24"
height=
"24"
/>
</div>
<div
title=
"
获取
物流面单"
title=
"
打印
物流面单"
class=
"tool-item"
@
click=
"getLogisticDrawer = true"
>
<img
src=
"../assets/images/p
ackage
.png"
width=
"24"
height=
"24"
/>
<img
src=
"../assets/images/p
rinter
.png"
width=
"24"
height=
"24"
/>
</div>
</div>
</div>
...
...
@@ -206,17 +206,31 @@
</el-drawer>
<el-drawer
v-model=
"getLogisticDrawer"
direction=
"btt"
class=
"get-logistic-drawer"
title=
"
获取
物流面单"
title=
"
打印
物流面单"
@
close=
"content = ''"
>
<el-input
v-model=
"content"
placeholder=
"请输入单号"
clearable
/>
<
template
#
footer
>
<span
style=
"display: flex; justify-content: center"
>
<el-button
@
click=
"getLogisticDrawer = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"getLogistic"
>
查 询
</el-button>
</span>
</
template
>
<ElSelect
v-model=
"sheetPrinter"
placeholder=
"请选择打印机"
@
change=
"handlePrinterChange"
style=
"width: 200px; margin-right: 10px"
>
<ElOption
v-for=
"item in printDeviceList"
:key=
"item"
:label=
"item"
:value=
"item"
/>
</ElSelect>
<el-input
v-model=
"content"
placeholder=
"请输入单号"
style=
"width: 300px; margin-right: 10px"
clearable
/>
<el-button
type=
"primary"
@
click=
"getLogistic"
>
查 询
</el-button>
</el-drawer>
</span>
</template>
...
...
@@ -240,11 +254,14 @@ import {
import
{
useRoute
,
useRouter
}
from
'vue-router'
import
Menu
from
'@/router/menu'
import
userUserStore
from
'@/store/user'
import
type
{
FormRules
}
from
'element-plus'
import
{
useValue
}
from
'@/utils/hooks/useValue'
import
useLodop
from
'@/utils/hooks/useLodop'
import
{
changePasswordApi
}
from
'@/api/auth'
import
{
getLogisticUSApi
,
getLogisticCNApi
}
from
'@/api/common'
import
{
filePath
}
from
'@/api/axios'
import
{
filePath
,
FileCnPath
}
from
'@/api/axios'
import
{
ElMessage
}
from
'element-plus'
interface
MenuItem
{
index
:
string
...
...
@@ -272,6 +289,9 @@ const userInfo = userStore.user
const
dialogVisible
=
ref
(
false
)
const
formatDrawer
=
ref
(
false
)
const
getLogisticDrawer
=
ref
(
false
)
const
printDeviceList
=
ref
<
string
[]
>
([])
const
sheetPrinter
=
ref
(
''
)
const
textareaT
=
ref
(
''
)
const
newTextareaT
=
ref
(
''
)
const
content
=
ref
(
''
)
...
...
@@ -504,7 +524,31 @@ const copy = () => {
})
}
// 获取物流面单
const
{
getCLodop
}
=
useLodop
()
const
initPrintDevice
=
()
=>
{
const
lodop
=
getCLodop
(
null
,
null
)
if
(
!
lodop
)
return
const
arr
=
[]
// 获取打印机数量
const
length
=
lodop
.
GET_PRINTER_COUNT
()
for
(
let
i
=
0
;
i
<
length
;
i
++
)
{
// 根据设备序号获取设备名
const
name
=
lodop
.
GET_PRINTER_NAME
(
i
)
arr
.
push
(
name
)
}
// 获取默认打印机
sheetPrinter
.
value
=
lodop
.
GET_PRINTER_NAME
(
0
)
printDeviceList
.
value
=
arr
}
// 处理打印机选择变化,保存到 localStorage
const
handlePrinterChange
=
(
value
:
string
)
=>
{
sheetPrinter
.
value
=
value
localStorage
.
setItem
(
'sheetPrinter'
,
JSON
.
stringify
(
value
))
}
// 打印物流面单
const
getLogistic
=
()
=>
{
if
(
!
content
.
value
)
{
ElMessage
.
warning
(
'请输入单号'
)
...
...
@@ -530,7 +574,7 @@ const getLogistic = () => {
// 中国物流
getLogisticCNApi
(
content
.
value
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
window
.
open
(
file
Path
+
res
.
data
.
documentUrl
,
'_blank'
)
window
.
open
(
FileCn
Path
+
res
.
data
.
documentUrl
,
'_blank'
)
}
})
}
else
{
...
...
@@ -547,6 +591,24 @@ watch(
{
immediate
:
true
},
)
watch
(
getLogisticDrawer
,
async
(
value
:
boolean
)
=>
{
if
(
value
)
{
initPrintDevice
()
const
locaclPrinter
=
localStorage
.
getItem
(
'sheetPrinter'
)
if
(
locaclPrinter
)
{
const
savedPrinter
=
JSON
.
parse
(
locaclPrinter
)
// 检查保存的打印机是否在当前打印机列表中
if
(
printDeviceList
.
value
.
includes
(
savedPrinter
))
{
sheetPrinter
.
value
=
savedPrinter
}
else
{
// 如果保存的打印机不在当前列表中,清空 localStorage 并设置为空
localStorage
.
removeItem
(
'sheetPrinter'
)
sheetPrinter
.
value
=
''
}
}
}
})
// 点击标签时切换路由
watch
(
activeTab
,
(
newTab
)
=>
{
if
(
newTab
)
{
...
...
@@ -700,9 +762,11 @@ onUnmounted(() => {
top
:
calc
(
50%
-
325px
)
!important
;
}
::v-deep
(
.get-logistic-drawer.el-drawer.rtl
)
{
height
:
200px
!important
;
top
:
calc
(
50%
-
100px
)
!important
;
::v-deep
(
.get-logistic-drawer.el-drawer.btt
)
{
height
:
120px
!important
;
width
:
700px
!important
;
top
:
calc
(
50%
-
60px
)
!important
;
left
:
calc
(
50%
-
350px
)
!important
;
}
.tool-item
{
...
...
src/views/error/error.vue
View file @
eac2d845
...
...
@@ -29,7 +29,7 @@ let timer: number | undefined
const
second
=
ref
(
5
)
const
router
=
useRouter
()
props
.
showBtn
&&
(
timer
=
setInterval
(()
=>
{
(
timer
=
window
.
setInterval
(()
=>
{
if
(
second
.
value
===
0
)
{
clearInterval
(
timer
)
router
.
go
(
-
1
)
...
...
src/views/order/podUs/FastProduction.vue
View file @
eac2d845
...
...
@@ -90,12 +90,26 @@
<p>
{{
detail
?.
factorySubOrderNumber
}}
</p>
<el-icon
v-if=
"detail?.factorySubOrderNumber"
class=
"icon"
@
click=
"copy(detail?.factorySubOrderNumber || '')"
>
<DocumentCopy
/>
</el-icon>
</div>
<div
:title=
"detail?.thirdSubOrderNumber || ''"
class=
"div-item"
>
<span>
第三方生产单号
</span>
<p>
{{
detail
?.
thirdSubOrderNumber
}}
</p>
<el-icon
v-if=
"detail?.thirdSubOrderNumber"
class=
"icon"
@
click=
"copy(detail?.thirdSubOrderNumber || '')"
>
<DocumentCopy
/>
</el-icon>
</div>
<div
:title=
"String(detail?.craftName)"
class=
"div-item"
>
<span>
生产工艺
</span>
...
...
@@ -125,6 +139,13 @@
<div
:title=
"detail?.shopNumber ?? ''"
class=
"div-item"
>
<span>
店铺单号
</span>
<p>
{{
detail
?.
shopNumber
??
''
}}
</p>
<el-icon
v-if=
"detail?.shopNumber"
class=
"icon"
@
click=
"copy(detail?.shopNumber || '')"
>
<DocumentCopy
/>
</el-icon>
</div>
<div
:title=
"detail?.createTime"
class=
"div-item"
>
...
...
@@ -203,6 +224,8 @@ import {
getSubOrderBySubOrderNumber
,
downloadMaterialApi
,
}
from
'@/api/podUsOrder'
import
{
DocumentCopy
}
from
'@element-plus/icons-vue'
import
{
cardImages
,
PodOrderRes
}
from
'@/types/api/podUsOrder'
import
{
showConfirm
}
from
'@/utils/ui'
import
{
filePath
}
from
'@/api/axios'
...
...
@@ -529,6 +552,28 @@ const trackCodeInput = async () => {
removeFromHistory
()
return
ElMessage
.
error
(
'生产单不存在'
)
}
if
(
res
.
data
.
interceptStatus
==
0
||
res
.
data
.
interceptStatus
==
2
)
{
try
{
await
ElMessageBox
.
confirm
(
'该生产单已提交至拦截申请,请确认是否继续生产'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
},
)
}
catch
(
error
)
{
TrackingNumber
.
value
=
''
detail
.
value
=
{
id
:
-
1
,
podJomallOrderUsId
:
-
1
,
imgList
:
[],
}
trackingNumberRef
.
value
&&
trackingNumberRef
.
value
.
focus
()
return
}
}
const
d
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
))
if
(
d
.
note
)
{
...
...
@@ -559,6 +604,15 @@ const trackCodeInput = async () => {
const
onOpened
=
()
=>
{
trackingNumberRef
.
value
&&
trackingNumberRef
.
value
.
focus
()
}
const
copy
=
(
text
:
string
)
=>
{
try
{
navigator
.
clipboard
.
writeText
(
text
)
ElMessage
.
success
(
'复制成功'
)
}
catch
(
err
)
{
console
.
error
(
'复制失败:'
,
err
)
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.sure-btn
{
...
...
src/views/order/podUs/index.vue
View file @
eac2d845
...
...
@@ -2,106 +2,106 @@
<div
class=
"card flex-column h-100 overflow-hidden"
>
<div
class=
"header-filter-form"
>
<ElForm
:model=
"searchForm"
size=
"default"
inline
>
<div>
<ElFormItem
label=
"仓库"
>
<ElSelect
v-model=
"searchForm.warehouseId"
clearable
filterable
placeholder=
"请输入"
style=
"width: 150px"
>
<el-option
v-for=
"item in warehouseList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"平台"
>
<ElSelect
v-model=
"searchForm.platform"
value-key=
""
placeholder=
"请选择"
clearable
filterable
popper-class=
"customize-select-style"
style=
"width: 150px"
>
<ElOption
v-for=
"(item, index) in platformJson"
:key=
"index"
:label=
"item.type"
:value=
"item.type"
style=
"width: 160px"
>
<img
:src=
"`/images/icon/$
{item.icon.split('/').pop()}`"
style="height: 20px; margin: 5px 10px 0 0"
/>
<span
:title=
"item.type"
>
{{
item
.
type
}}
</span>
</ElOption>
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"工艺"
>
<ElSelect
v-model=
"searchForm.craftCode"
clearable
filterable
placeholder=
"请输入工艺"
style=
"width: 150px"
<!--
<div>
-->
<ElFormItem
label=
"仓库"
>
<ElSelect
v-model=
"searchForm.warehouseId"
clearable
filterable
placeholder=
"请输入"
style=
"width: 150px"
>
<el-option
v-for=
"item in warehouseList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"平台"
>
<ElSelect
v-model=
"searchForm.platform"
value-key=
""
placeholder=
"请选择"
clearable
filterable
popper-class=
"customize-select-style"
style=
"width: 150px"
>
<ElOption
v-for=
"(item, index) in platformJson"
:key=
"index"
:label=
"item.type"
:value=
"item.type"
style=
"width: 160px"
>
<el-option
v-for=
"item in craftList"
:key=
"item.craftCode"
:label=
"item.craftName"
:value=
"item.craftCode"
></el-option>
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"库存SKU"
>
<ElInput
v-model
.
trim=
"searchForm.thirdSkuCode"
placeholder=
"库存SKU"
clearable
style=
"width: 150px"
></ElInput>
</ElFormItem>
<ElFormItem
label=
"款号"
>
<ElInput
v-model=
"searchForm.supplierProductNo"
placeholder=
"款号"
clearable
style=
"width: 150px"
/>
</ElFormItem>
<ElFormItem
label=
"批次号"
>
<ElInput
v-model=
"searchForm.batchArrangeNumber"
placeholder=
"批次号"
clearable
style=
"width: 150px"
/>
</ElFormItem>
<ElFormItem
label=
"生产单号"
>
<ElInput
v-model=
"searchForm.factorySubOrderNumber"
placeholder=
"生产单号"
clearable
style=
"width: 150px"
/>
</ElFormItem>
<ElFormItem
label=
"店铺单号"
>
<ElInput
v-model=
"searchForm.shopNumber"
placeholder=
"店铺单号"
clearable
style=
"width: 150px"
/>
</ElFormItem>
</div>
<img
:src=
"`/images/icon/$
{item.icon.split('/').pop()}`"
style="height: 20px; margin: 5px 10px 0 0"
/>
<span
:title=
"item.type"
>
{{
item
.
type
}}
</span>
</ElOption>
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"工艺"
>
<ElSelect
v-model=
"searchForm.craftCode"
clearable
filterable
placeholder=
"请输入工艺"
style=
"width: 150px"
>
<el-option
v-for=
"item in craftList"
:key=
"item.craftCode"
:label=
"item.craftName"
:value=
"item.craftCode"
></el-option>
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"库存SKU"
>
<ElInput
v-model
.
trim=
"searchForm.thirdSkuCode"
placeholder=
"库存SKU"
clearable
style=
"width: 150px"
></ElInput>
</ElFormItem>
<ElFormItem
label=
"款号"
>
<ElInput
v-model=
"searchForm.supplierProductNo"
placeholder=
"款号"
clearable
style=
"width: 150px"
/>
</ElFormItem>
<ElFormItem
label=
"批次号"
>
<ElInput
v-model=
"searchForm.batchArrangeNumber"
placeholder=
"批次号"
clearable
style=
"width: 150px"
/>
</ElFormItem>
<ElFormItem
label=
"生产单号"
>
<ElInput
v-model=
"searchForm.factorySubOrderNumber"
placeholder=
"生产单号"
clearable
style=
"width: 150px"
/>
</ElFormItem>
<ElFormItem
label=
"店铺单号"
>
<ElInput
v-model=
"searchForm.shopNumber"
placeholder=
"店铺单号"
clearable
style=
"width: 150px"
/>
</ElFormItem>
<!--
</div>
-->
<ElFormItem
label=
"类型"
>
<el-radio-group
v-model=
"searchForm.customizedQuantity"
>
<el-radio-button
label=
"single"
>
单面
</el-radio-button>
...
...
@@ -263,15 +263,14 @@
</span>
</ElFormItem>
<ElFormItem>
<span
v-if=
"
status === 'PICKING' ||
status === 'TO_BE_REPLENISHMENT' ||
status === 'IN_PRODUCTION'
"
class=
"item"
>
<ElFormItem
v-if=
"
status === 'PICKING' ||
status === 'TO_BE_REPLENISHMENT' ||
status === 'IN_PRODUCTION'
"
>
<span
class=
"item"
>
<ElButton
:loading=
"tifDownloadLoading"
type=
"warning"
...
...
@@ -280,14 +279,15 @@
TIF排版
</ElButton>
</span>
<span
v-if=
"
status === 'PICKING' ||
status === 'TO_BE_REPLENISHMENT' ||
status === 'IN_PRODUCTION'
"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"
status === 'PICKING' ||
status === 'TO_BE_REPLENISHMENT' ||
status === 'IN_PRODUCTION'
"
>
<span
class=
"item"
>
<ElButton
:loading=
"pngDownloadLoading"
type=
"warning"
...
...
@@ -296,30 +296,44 @@
PNG排版
</ElButton>
</span>
<span
v-if=
"status === 'TO_BE_CONFIRMED'"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"status === 'TO_BE_CONFIRMED'"
>
<span
class=
"item"
>
<ElButton
type=
"success"
@
click=
"confirmProduct"
>
确认生产
</ElButton>
</span>
<span
v-if=
"status === 'EXCEPTION_ORDER'"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"status === 'EXCEPTION_ORDER'"
>
<span
class=
"item"
>
<ElButton
type=
"success"
@
click=
"updateOrder"
>
转至待确认
</ElButton>
</span>
<span
v-if=
"status === 'EXCEPTION_ORDER' && exceptionStatus === 3"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"status === 'EXCEPTION_ORDER' && exceptionStatus === 3"
>
<span
class=
"item"
>
<ElButton
type=
"warning"
@
click=
"asyncOrderAddress"
>
同步收货地址
</ElButton>
</span>
<span
v-if=
"status === 'EXCEPTION_ORDER' && exceptionStatus === 1"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"status === 'EXCEPTION_ORDER' && exceptionStatus === 1"
>
<span
class=
"item"
>
<ElButton
type=
"warning"
@
click=
"assignOrder"
>
分派
</ElButton>
</span>
</ElFormItem>
<ElFormItem
v-if=
"
status === 'PICKING' ||
status === 'TO_BE_REPLENISHMENT' ||
status === 'IN_PRODUCTION'
"
>
<!-- <span
v-if="status === 'EXCEPTION_ORDER' && exceptionStatus === 2"
class="item"
...
...
@@ -328,91 +342,115 @@
处理异常
</ElButton>
</span> -->
<span
v-if=
"
status === 'PICKING' ||
status === 'TO_BE_REPLENISHMENT' ||
status === 'IN_PRODUCTION'
"
class=
"item"
>
<span
class=
"item"
>
<ElButton
type=
"primary"
@
click=
"printProductionOrder"
>
打印生产单
</ElButton>
</span>
<span
v-if=
"status === 'TO_BE_REPLENISHMENT'"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"status === 'TO_BE_REPLENISHMENT'"
>
<span
class=
"item"
>
<ElButton
type=
"success"
@
click=
"replenishmentSuccess"
>
补胚完成
</ElButton>
</span>
<span
v-if=
"status === 'PICKING'"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"status === 'PICKING'"
>
<span
class=
"item"
>
<ElButton
type=
"success"
@
click=
"printPickingOrder"
>
打印拣货单
</ElButton>
</span>
<span
v-if=
"status === 'PICKING'"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"status === 'PICKING'"
>
<span
class=
"item"
>
<ElButton
type=
"warning"
@
click=
"pickingComplete"
>
拣胚完成
</ElButton>
</span>
<span
v-if=
"status === 'PICKING'"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"status === 'PICKING'"
>
<span
class=
"item"
>
<ElButton
type=
"success"
@
click=
"toOutOfStock"
>
转至缺货
</ElButton>
</span>
<span
v-if=
"status === 'TO_BE_CONFIRMED'"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"status === 'TO_BE_CONFIRMED'"
>
<span
class=
"item"
>
<ElButton
type=
"warning"
@
click=
"changeExceptionOrder"
>
转为异常单
</ElButton>
</span>
<span
v-if=
"status === 'TO_BE_CONFIRMED'"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"status === 'TO_BE_CONFIRMED'"
>
<span
class=
"item"
>
<ElButton
type=
"success"
@
click=
"confirmProductToRiin"
>
转至锐印生产
</ElButton>
</span>
<span
v-if=
"status === 'TO_BE_CONFIRMED' || status === 'EXCEPTION_ORDER'"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"status === 'TO_BE_CONFIRMED' || status === 'EXCEPTION_ORDER'"
>
<span
class=
"item"
>
<ElButton
type=
"danger"
@
click=
"cancelOrder"
>
取消
</ElButton>
</span>
</ElFormItem>
<ElFormItem
v-if=
"status === 'IN_PRODUCTION'"
>
<!-- <span v-if="status !== 'IN_PRODUCTION'" class="item">
<ElButton type="success" @click="handleUpdateRemark">
添加内部标签
</ElButton>
</span> -->
<span
v-if=
"status === 'IN_PRODUCTION'"
class=
"item"
>
<span
class=
"item"
>
<ElButton
type=
"warning"
@
click=
"onFastProduction"
>
快捷生产
</ElButton>
</span>
<span
v-if=
"status === 'IN_PRODUCTION'"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"status === 'IN_PRODUCTION'"
>
<span
class=
"item"
>
<ElButton
type=
"success"
@
click=
"applyForReplenishment(undefined)"
>
申请补胚
</ElButton>
</span>
<span
v-if=
"status === 'IN_PRODUCTION'"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"status === 'IN_PRODUCTION'"
>
<span
class=
"item"
>
<ElButton
type=
"success"
@
click=
"productioncompleted"
>
生产完成
</ElButton>
</span>
<span
v-if=
"status === 'WAIT_SHIPMENT'"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"status === 'WAIT_SHIPMENT'"
>
<span
class=
"item"
>
<ElButton
type=
"warning"
@
click=
"printPodOrder"
>
播种墙配货
</ElButton>
</span>
</ElFormItem>
<ElFormItem
v-if=
"status === 'CREATE_LOGISTICS'"
>
<!-- <span v-if="status === 'WAIT_SHIPMENT'" class="item">
<ElButton type="warning" @click="inspPackagOrder">
质检包装
</ElButton>
</span> -->
<span
v-if=
"status === 'CREATE_LOGISTICS'"
class=
"item"
>
<span
class=
"item"
>
<ElButton
type=
"warning"
@
click=
"logisticsToPicking"
>
转至待排单
</ElButton>
</span>
<span
v-if=
"status === 'WAIT_SHIPMENT' || status === 'CREATE_LOGISTICS'"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"status === 'WAIT_SHIPMENT'"
>
<span
class=
"item"
>
<ElButton
type=
"primary"
@
click=
"completeDelivery()"
>
完成发货
</ElButton
>
</span>
</ElFormItem>
<ElFormItem
v-if=
"status === 'WAIT_SHIPMENT' || status === 'CREATE_LOGISTICS'"
>
<span
class=
"item"
>
<ElDropdown>
<el-button
type=
"success"
>
物流接口
<el-icon
class=
"el-icon--right"
><ArrowDown
/></el-icon>
...
...
@@ -463,74 +501,89 @@
</
template
>
</ElDropdown>
</span>
<span
v-if=
"status === 'STOCK_OUT'"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"status === 'STOCK_OUT'"
>
<span
class=
"item"
>
<ElButton
type=
"warning"
@
click=
"stockOutCheck"
>
补货校验
</ElButton>
</span>
<span
v-if=
"status === 'STOCK_OUT'"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"status === 'STOCK_OUT'"
>
<span
class=
"item"
>
<ElButton
type=
"success"
@
click=
"toBePicking"
>
转至生产
</ElButton>
</span>
<span
v-if=
"status === 'TO_BE_ARRANGE'"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"status === 'TO_BE_ARRANGE'"
>
<span
class=
"item"
>
<ElButton
type=
"warning"
@
click=
"arrangeFinish"
>
排单完成
</ElButton>
</span>
<span
v-if=
"status !== 'BATCH_DOWNLOAD' && status !== 'WAIT_SHIPMENT'"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"status !== 'BATCH_DOWNLOAD' && status !== 'WAIT_SHIPMENT'"
>
<span
class=
"item"
>
<ElButton
type=
"primary"
@
click=
"downloadMaterial"
>
下载素材
</ElButton
>
</span>
<span
v-if=
"
status === 'INTERCEPTED' &&
(interceptCurrent === 1 || interceptCurrent === 4)
"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"
status === 'INTERCEPTED' &&
(interceptCurrent === 1 || interceptCurrent === 4)
"
>
<span
class=
"item"
>
<ElButton
type=
"success"
@
click=
"interceptChange(true)"
>
拦截成功
</ElButton>
</span>
<span
v-if=
"
status === 'INTERCEPTED' &&
(interceptCurrent === 1 || interceptCurrent === 4)
"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"
status === 'INTERCEPTED' &&
(interceptCurrent === 1 || interceptCurrent === 4)
"
>
<span
class=
"item"
>
<ElButton
type=
"danger"
@
click=
"interceptChange(false)"
>
拦截失败
</ElButton>
</span>
<span
v-if=
"
status === 'TO_BE_CONFIRMED' ||
status === 'PICKING' ||
status === 'STOCK_OUT' ||
status === 'EXCEPTION_ORDER' ||
status === 'TO_BE_REPLENISHMENT' ||
status === 'IN_PRODUCTION' ||
status === 'TO_BE_ARRANGE'
"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"
[
'TO_BE_CONFIRMED',
'PICKING',
'STOCK_OUT',
'EXCEPTION_ORDER',
'TO_BE_REPLENISHMENT',
'IN_PRODUCTION',
'TO_BE_ARRANGE',
'WAIT_SHIPMENT',
].includes(status)
"
>
<span
class=
"item"
>
<ElButton
type=
"success"
@
click=
"refreshMaterial"
>
刷新商品信息
</ElButton>
</span>
<span
v-if=
"
status === 'STOCK_OUT' ||
status === 'CREATE_LOGISTICS' ||
status === 'TO_BE_ARRANGE' ||
status === 'PICKING' ||
status === 'IN_PRODUCTION'
"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"
[
'STOCK_OUT',
'CREATE_LOGISTICS',
'TO_BE_ARRANGE',
'PICKING',
'IN_PRODUCTION',
].includes(status)
"
>
<span
class=
"item"
>
<ElDropdown>
<el-button
type=
"warning"
>
驳回至
<el-icon
class=
"el-icon--right"
><ArrowDown
/></el-icon>
...
...
@@ -576,13 +629,24 @@
</
template
>
</ElDropdown>
</span>
<span
v-if=
"status === 'COMPLETE'"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"status === 'COMPLETE'"
>
<span
class=
"item"
>
<ElButton
type=
"warning"
@
click=
"statusPush"
>
状态推送
</ElButton>
</span>
<span
v-if=
"status === 'COMPLETE'"
class=
"item"
>
</ElFormItem>
<ElFormItem
v-if=
"status === 'COMPLETE'"
>
<span
class=
"item"
>
<ElButton
type=
"success"
@
click=
"exportData"
>
导出
</ElButton>
</span>
</ElFormItem>
<ElFormItem
v-if=
"status === 'BATCH_DOWNLOAD'"
>
<span
class=
"item"
>
<ElButton
type=
"danger"
@
click=
"handleBatchDelete('batch')"
>
批量删除
</ElButton
>
</span>
</ElFormItem>
</ElForm>
</div>
<div
class=
"header-filter-tab"
>
...
...
@@ -1389,7 +1453,11 @@
<
/ElButton
>
<
/span
>
<
span
class
=
"operate-item"
>
<
ElButton
link
type
=
"danger"
@
click
=
"handleBatchDelete(row)"
>
<
ElButton
link
type
=
"danger"
@
click
=
"handleBatchDelete('single', row.id)"
>
删除
<
/ElButton
>
<
/span
>
...
...
@@ -1623,9 +1691,9 @@
<
div
class
=
"grid-item"
>
<
div
:
title
=
"`variant SKU: ${cardItem?.variantSku || ''
}
`"
class
=
"grid-item-value
orderNumber
"
class
=
"grid-item-value"
>
{{
cardItem
?.
variantSku
}}
<
div
class
=
"orderNumber"
>
{{
cardItem
?.
variantSku
}}
<
/div
>
<
el
-
icon
class
=
"icon"
style
=
"margin-left: 3px"
...
...
@@ -1660,9 +1728,12 @@
<
div
class
=
"grid-item"
>
<
div
:
title
=
"`库存SKU:${cardItem?.thirdSkuCode || ''
}
`"
class
=
"grid-item-value
orderNumber
"
class
=
"grid-item-value"
>
{{
cardItem
?.
thirdSkuCode
}}
<
div
class
=
"orderNumber"
>
{{
cardItem
?.
thirdSkuCode
}}
<
/div
>
<
el
-
icon
class
=
"icon"
style
=
"margin-left: 3px"
...
...
@@ -1696,11 +1767,13 @@
class
=
"grid-item"
:
title
=
"`店铺单号:${cardItem?.shopNumber || ''
}
`"
>
<
div
class
=
"grid-item-value orderNumber"
>
{{
cardItem
?.
shopNumber
}}
<
div
class
=
"grid-item-value"
>
<
div
class
=
"orderNumber"
>
{{
cardItem
?.
shopNumber
}}
<
/div
>
<
el
-
icon
class
=
"icon"
style
=
"margin-left: 3px"
style
=
"margin-left: 3px
; flex-shrink: 0
"
size
=
"14"
@
click
=
"copy(cardItem?.shopNumber || '')"
>
...
...
@@ -1740,17 +1813,19 @@
class
=
"grid-item"
:
title
=
"`批次号:${cardItem?.batchArrangeNumber || ''
}
`"
>
<
div
class
=
"grid-item-value orderNumber"
>
{{
cardItem
?.
batchArrangeNumber
}}
<
el
-
icon
class
=
"icon"
style
=
"margin-left: 3px"
size
=
"14"
@
click
=
"copy(cardItem?.batchArrangeNumber || '')"
>
<
DocumentCopy
/>
<
/el-icon
>
<
div
class
=
"grid-item-value"
>
<
div
class
=
"orderNumber"
>
{{
cardItem
?.
batchArrangeNumber
}}
<
/div
>
<
/div
>
<
el
-
icon
class
=
"icon"
style
=
"margin-left: 3px"
size
=
"14"
@
click
=
"copy(cardItem?.batchArrangeNumber || '')"
>
<
DocumentCopy
/>
<
/el-icon
>
<
/div
>
<
div
v
-
if
=
"cardItem.isReplenishment"
class
=
"grid-item"
>
<
el
-
tag
size
=
"small"
type
=
"danger"
effect
=
"dark"
...
...
@@ -2269,6 +2344,7 @@ import {
interceptUpdateApi
,
rejectToApi
,
statusPushApi
,
completeDeliveryApi
,
}
from
'@/api/podUsOrder'
import
{
BaseRespData
}
from
'@/types/api'
...
...
@@ -2623,7 +2699,11 @@ const handleDownload = async (row: PodUsOrderListData, type: string) => {
}
}
// 批量下载 删除
const
handleBatchDelete
=
async
(
row
:
PodUsOrderListData
)
=>
{
const
handleBatchDelete
=
async
(
type
:
string
,
id
?:
string
)
=>
{
if
(
type
===
'batch'
&&
selection
.
value
.
length
===
0
)
{
ElMessage
.
error
(
'请选择要删除的数据'
)
return
}
try
{
await
showConfirm
(
'确定删除吗?'
,
{
confirmButtonText
:
'确认'
,
...
...
@@ -2639,7 +2719,12 @@ const handleBatchDelete = async (row: PodUsOrderListData) => {
background
:
'rgba(0, 0, 0, 0.3)'
,
}
)
try
{
const
res
=
await
batchDownloadDeleteApi
({
id
:
row
.
id
}
)
const
res
=
await
batchDownloadDeleteApi
({
ids
:
type
===
'batch'
?
selection
.
value
.
map
((
item
)
=>
item
.
id
).
join
(
','
)
:
id
,
}
)
if
(
res
.
code
!==
200
)
return
ElMessage
.
success
(
res
.
message
)
search
()
...
...
@@ -3806,13 +3891,13 @@ const printPodOrder = async () => {
const
InspPackagOrderRef
=
ref
()
const
inspPackagOrder
=
async
()
=>
{
const
lodop
=
getCLodop
(
null
,
null
)
if
(
!
lodop
)
return
//
const inspPackagOrder = async () =>
{
//
const lodop = getCLodop(null, null)
//
if (!lodop) return
sheetPrinter
.
value
=
lodop
.
GET_PRINTER_NAME
(
0
)
InspPackagOrderRef
?.
value
.
open
()
}
//
sheetPrinter.value = lodop.GET_PRINTER_NAME(0)
//
InspPackagOrderRef?.value.open()
//
}
/**
* @description: 创建物流、获取跟踪号、获取打印面单、更改物流、取消物流订单
...
...
@@ -4822,6 +4907,58 @@ const statusPush = async () => {
}
}
// 完成发货
const
completeDelivery
=
async
()
=>
{
if
(
selection
.
value
.
length
===
0
)
{
return
ElMessage
.
warning
(
'请选择订单'
)
}
try
{
await
ElMessageBox
.
confirm
(
'确定完成发货吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}
)
}
catch
(
e
)
{
return
}
const
loading
=
ElLoading
.
service
({
fullscreen
:
true
,
text
:
'操作中...'
,
background
:
'rgba(0, 0, 0, 0.3)'
,
}
)
try
{
const
res
=
await
completeDeliveryApi
({
orderIdList
:
selection
.
value
.
map
((
item
)
=>
item
.
id
),
}
)
if
(
res
.
code
!==
200
)
return
resultInfo
.
value
=
(
res
.
data
as
{
id
:
string
|
number
status
:
boolean
factoryOrderNumber
?:
string
message
:
string
}
[])
||
[]
if
(
Array
.
isArray
(
res
.
data
)
&&
(
res
.
data
as
{
status
:
boolean
}
[]).
some
((
item
)
=>
!
item
.
status
)
)
{
resultRefs
.
value
?.
showDialog
()
}
else
{
search
()
loadTabData
()
}
ElMessage
.
success
(
'操作成功'
)
// search()
// loadTabData()
}
catch
(
e
)
{
resultInfo
.
value
=
[]
console
.
error
(
e
)
}
finally
{
loading
.
close
()
}
}
const
tempChinaLogs
=
ref
<
LogListData
[]
>
([])
function
changeChinaTime
(
zone
:
string
)
{
logList
.
value
=
tempChinaLogs
.
value
.
map
((
el
)
=>
{
...
...
@@ -4845,9 +4982,9 @@ useRouter().beforeEach((to, from, next) => {
}
}
.
item
{
margin
-
right
:
15
px
;
}
//
.item
{
//
margin-right: 15px;
//
}
.
tabs
{
display
:
flex
;
...
...
@@ -4996,8 +5133,9 @@ useRouter().beforeEach((to, from, next) => {
.
grid
-
item
{
display
:
flex
;
overflow
:
hidden
;
width
:
100
%
;
.
grid
-
item
-
value
{
display
:
flex
;
flex
:
1
;
overflow
:
hidden
;
text
-
overflow
:
ellipsis
;
...
...
@@ -5124,9 +5262,11 @@ useRouter().beforeEach((to, from, next) => {
}
}
.
orderNumber
{
display
:
flex
;
align
-
items
:
center
;
justify
-
content
:
flex
-
start
;
white
-
space
:
nowrap
;
overflow
:
hidden
;
text
-
overflow
:
ellipsis
;
flex
:
1
;
min
-
width
:
0
;
/* 关键属性 */
}
.
customizedQuantity
{
height
:
28
px
;
...
...
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