Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李俊赕
self-support
Commits
8d6a2299
Commit
8d6a2299
authored
Jun 26, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配件操作接口
parent
a5f0799c
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
618 additions
and
126 deletions
+618
-126
order.js
src/common/api/order.js
+7
-1
appliedPartsCell.vue
src/components/parts/appliedPartsCell.vue
+27
-4
index.vue
src/pages/mine/warehouse/index.vue
+561
-117
searchParts.vue
src/pages/mine/warehouse/searchParts.vue
+23
-4
No files found.
src/common/api/order.js
View file @
8d6a2299
...
...
@@ -192,6 +192,10 @@ let orderApiFun = function(vm){
let
getLogistics
=
async
(
orderId
)
=>
await
vm
.
$u
.
get
(
prefix
+
'parts/'
+
vm
.
vuex_token
+
'/orders/'
+
orderId
+
'/express'
,{},
formType
);
// 配件申请单-数量统计
let
getOrderPartsSum
=
async
(
orderId
)
=>
await
vm
.
$u
.
get
(
prefix
+
'parts/'
+
vm
.
vuex_token
+
'/'
+
orderId
+
'/sum'
,{},
formType
);
// 配件申请单-签收
let
receiveParts
=
async
(
partOrderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
'parts/'
+
vm
.
vuex_token
+
'/orders/'
+
partOrderId
+
'/receive'
,{},
formType
);
// 配件申请单-取消申请
let
cancelParts
=
async
(
partOrderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
'parts/'
+
vm
.
vuex_token
+
'/orders/'
+
partOrderId
+
'/cancel'
,{},
formType
);
const
orderApi
=
{
listByRecommendOrder
,
...
...
@@ -241,7 +245,9 @@ let orderApiFun = function(vm){
returnedParts
,
reserveList
,
getLogistics
,
getOrderPartsSum
getOrderPartsSum
,
receiveParts
,
cancelParts
}
return
orderApi
}
...
...
src/components/parts/appliedPartsCell.vue
View file @
8d6a2299
...
...
@@ -56,6 +56,17 @@
'20'
:
''
,
}
},
operateTypes
()
{
return
{
'1'
:
'cancelParts'
,
'10'
:
''
,
'15'
:
'receiveParts'
,
'20'
:
''
,
}
},
buttonOperateType
()
{
return
this
.
operateTypes
[
this
.
info
.
status
]
},
buttonText
()
{
return
this
.
texts
[
this
.
info
.
status
]
},
...
...
@@ -70,13 +81,14 @@
return
this
.
titles
[
String
(
this
.
info
.
status
)]
},
titles
()
{
// 待签收 15 待发货 10 待审核 1 已取消 -1 已驳回 -2 已签收 20
return
{
'1'
:
'待审核'
,
'10'
:
'待发货'
,
'15'
:
'代签收'
,
'20'
:
'已签收'
,
'-
1
'
:
'审核未通过'
,
'1'
:
'已取消'
'-
2
'
:
'审核未通过'
,
'
-
1'
:
'已取消'
}
},
titleColor
()
{
...
...
@@ -89,6 +101,17 @@
return
'#2272FF'
}
},
// 待签收 15 变 已签收 20; 10 待审核 1 变 已取消 -1
willStatus
()
{
return
{
'1'
:
'-1'
,
'10'
:
''
,
'15'
:
'20'
,
'20'
:
''
,
'-2'
:
''
,
'-1'
:
''
}
},
total
()
{
// 合计
var
i
=
0
for
(
var
item
of
this
.
info
.
items
)
{
...
...
@@ -119,10 +142,10 @@
},
methods
:
{
handleClick
()
{
this
.
$emit
(
'action'
,
this
.
info
)
this
.
$emit
(
'action'
,
this
.
info
.
id
,
this
.
buttonOperateType
,
this
.
willStatus
)
},
handleOperate
()
{
this
.
$emit
(
'operate'
,
this
.
info
)
this
.
$emit
(
'operate'
,
this
.
info
.
id
,
this
.
buttonOperateType
,
this
.
willStatus
)
},
handleLongpress
()
{
// 长按复制单号
uni
.
setClipboardData
({
...
...
src/pages/mine/warehouse/index.vue
View file @
8d6a2299
This diff is collapsed.
Click to expand it.
src/pages/mine/warehouse/searchParts.vue
View file @
8d6a2299
...
...
@@ -99,10 +99,29 @@
this
.
loaded
=
true
});
},
handleOperate
(
type
)
{
// 调接口
// 修改info的status
// 刷新页面
// 响应操作按钮
handleOperate
(
partsId
,
operateType
,
willStatus
)
{
this
.
$u
.
api
[
operateType
](
partsId
).
then
(
res
=>
{
var
type
=
'error'
var
message
=
res
.
message
if
(
res
.
code
===
200
)
{
if
(
res
.
data
==
true
)
{
for
(
var
item
of
this
.
partsList
)
{
if
(
item
.
id
==
partsId
)
{
item
.
status
=
willStatus
}
}
}
}
else
{
console
.
log
(
res
.
message
)
}
this
.
$refs
.
uToast
.
show
({
title
:
message
,
type
:
type
,
duration
:
1000
,
callback
:
function
()
{}
})
})
},
handleClickCell
(
info
)
{
var
pages
=
getCurrentPages
();
...
...
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