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
38ba60f2
Commit
38ba60f2
authored
Jun 17, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配件列表
parent
69044d8d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
274 additions
and
27 deletions
+274
-27
order.js
src/common/api/order.js
+4
-2
appliedPartsCell.vue
src/components/parts/appliedPartsCell.vue
+76
-0
applyList.vue
src/components/parts/applyList.vue
+94
-11
applyParts.vue
src/pages/order/applyParts.vue
+3
-3
detail.vue
src/pages/order/detail.vue
+97
-11
No files found.
src/common/api/order.js
View file @
38ba60f2
...
...
@@ -182,7 +182,8 @@ let orderApiFun = function(vm){
let
fileLabel
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
'config/'
+
vm
.
vuex_token
+
'/finish/file/lable/'
,
params
);
// 工单文件列表
let
fileList
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
'config/'
+
vm
.
vuex_token
+
'/finish/file'
,
params
);
// 订单配件列表
let
applyList
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
'parts/'
+
vm
.
vuex_token
+
'/orders'
,
params
);
const
orderApi
=
{
listByRecommendOrder
,
listOrderCount
,
...
...
@@ -226,7 +227,8 @@ let orderApiFun = function(vm){
checkAddCustomer
,
fileLabel
,
fileList
,
completeNextStep
completeNextStep
,
applyList
}
return
orderApi
}
...
...
src/components/parts/appliedPartsCell.vue
0 → 100644
View file @
38ba60f2
<
template
>
<!-- 已申请配件cell -->
<view
class=
"applied-cell"
>
<view
class=
"title-view"
>
<view
v-for=
"(item, key) in labels"
:key=
"key"
>
<text>
{{
item
}}
:
</text>
<text>
{{
info
[
key
]
}}
</text>
</view>
</view>
<view
class=
"list-content"
>
<view
v-for=
"(item, index) in info.items"
:key=
"index"
>
<!--
<PartsCell
@
operate=
"handleOperate"
:info=
"item"
></PartsCell>
-->
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
props
:
{
info
:
{
// 申请材料列表
type
:
Object
,
default
()
{
return
{
status
:
0
,
// -1 已驳回,-1 已取消,0 新申请,1 待审核,10 待发货,11 配货中,12 采购中,15 已发货,20 已签收,21 待返件,22 返件中,90 已转备件,100 已完成
}
}
}
},
data
()
{
return
{
}
},
computed
:
{
texts
()
{
return
{}
},
buttonText
()
{
return
this
.
texts
[
this
.
info
.
status
]
},
buttonStyle
()
{
return
{
'height'
:
'104rpx'
,
'width'
:
'100%'
,
}
},
labels
()
{
return
{
'id'
:
'申请单号'
,
'statusText'
:
'状态'
}
}
},
methods
:
{
handleOperate
()
{
this
.
$emit
(
'operate'
,
this
.
info
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.applied-cell
{
.title-view
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.list-content
{
}
}
</
style
>
src/components/parts/applyList.vue
View file @
38ba60f2
<
template
>
<!-- 申请列表 -->
<view>
</view>
</
template
>
<
script
>
</
script
>
<
style
>
<
template
>
<u-popup
v-model=
"show"
mode=
"bottom"
safe-area-inset-bottom
width=
"690rpx"
:mask-close-able=
"flase"
close-icon-color=
"#FFFFFF"
height=
"80%"
>
<!-- 申请列表 -->
<view
class=
"apply-list-view"
>
<view
class=
"colse-view"
>
<view
class=
"right-view"
@
click
.
throttle=
"handleClose"
>
<u-icon
name=
"close"
></u-icon>
</view>
</view>
<view
class=
"list-content"
>
<view
v-for=
"(item, index) in list"
:key=
"index"
>
<AppliedCell
@
operate=
"handleOperate"
:info=
"item"
></AppliedCell>
</view>
</view>
<view
class=
"bottom-view"
>
<u-button
:custom-style=
"applyStyle"
shape=
"circle"
@
click=
"handleApply"
type=
"primary"
>
申请配件
</u-button>
</view>
</view>
</u-popup>
</
template
>
<
script
>
import
AppliedCell
from
"@/components/parts/appliedPartsCell.vue"
export
default
{
components
:
{
AppliedCell
},
props
:
{
list
:
{
// 申请材料列表
type
:
Array
,
default
()
{
return
[]
}
},
show
:
{
type
:
Boolean
,
default
:
false
}
},
data
()
{
return
{
}
},
computed
:
{
applyStyle
()
{
return
{
'height'
:
'104rpx'
,
'width'
:
'100%'
,
}
}
},
methods
:
{
handleClose
()
{
this
.
$emit
(
'update:show'
,
false
)
},
handleOperate
()
{
this
.
$emit
(
'operate'
)
},
handleApply
()
{
this
.
$emit
(
'apply'
)
},
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.apply-list-view
{
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
.colse-view
{
height
:
80rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-end
;
.right-view
{
width
:
80rpx
;
height
:
80rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
color
:
#FF0000
;
}
}
.list-content
{
height
:
100%
;
overflow
:
auto
;
}
.bottom-view
{
}
}
</
style
>
src/pages/order/applyParts.vue
View file @
38ba60f2
<
template
>
<view
class=
"parts-view"
>
<u-navbar
back-icon-color=
"#333333"
background=
"#FFFFFF"
title=
"配件申请
"
titleColor=
"#333333"
<u-navbar
back-icon-color=
"#333333"
background=
"#FFFFFF"
:title=
"title
"
titleColor=
"#333333"
:border-bottom=
"false"
title-bold
></u-navbar>
</view>
...
...
@@ -22,8 +22,8 @@
},
types
()
{
return
{
'parts'
:
0
,
'spare'
:
1
'parts'
:
0
,
// 配件
'spare'
:
1
// 备件
}
}
},
...
...
src/pages/order/detail.vue
View file @
38ba60f2
...
...
@@ -62,18 +62,22 @@
</view>
<!-- 不是从我的页面进来才显示 -->
<template
v-if=
"!isOther"
>
<!-- 提示窗口 -->
<view>
<u-toast
ref=
"uToast"
/>
</view>
<BottomButtons
v-if=
"showBottomBtn"
:buttons=
"buttons"
@
submit=
"handleSubmit"
></BottomButtons>
<!-- 拍照 -->
<take-photo
type=
"test"
v-if=
"takeStatus"
@
close=
"closeTake"
:upload=
"false"
:num=
"1"
></take-photo>
<!--
<PopView
title=
"查看交互规范"
message=
"为完善交付质量,请查看对应的交付规范"
:visible
.
sync=
"visible"
@
click=
"handleClick"
/>
-->
<!--
添加客服
-->
<u-popup
border-radius=
"12"
v-model=
"visible"
safe-area-inset-bottom
mode=
"center"
width=
"690rpx"
:mask-close-able=
"false"
close-icon-color=
"#FFFFFF"
>
<view
class=
"order-pop-view"
>
<Customer
type=
"pop"
@
click=
"handle
Download
"
></Customer>
<Customer
type=
"pop"
@
click=
"handle
Join
"
></Customer>
</view>
</u-popup>
<!-- 已申请配件列表 -->
<ApplyList
:show
.
sync=
"showApplyList"
:list=
"partsList"
@
operate=
"handleOperate"
@
apply=
"handleApply"
></ApplyList>
</
template
>
</view>
</template>
...
...
@@ -87,6 +91,7 @@
import
Record
from
"@/components/order/performanceRecord.vue"
import
Detail
from
"@/components/order/detail.vue"
import
BottomButtons
from
"@/components/order/bottomButtons.vue"
import
ApplyList
from
"@/components/parts/applyList.vue"
let
now
=
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
();
export
default
{
components
:
{
...
...
@@ -96,7 +101,8 @@
Customer
,
Record
,
Detail
,
BottomButtons
BottomButtons
,
ApplyList
},
mixins
:
[
baseFile
],
data
()
{
...
...
@@ -156,6 +162,8 @@
timeout
:
false
,
timestamp
:
0
,
showCountTime
:
false
,
// 从上个页面传入是否显示倒计时
showApplyList
:
false
,
// 显示已申请配件列表
partsList
:
[],
// 已申请的配件列表
}
},
computed
:
{
...
...
@@ -623,14 +631,81 @@
break
}
},
handleApplyParts
()
{
// 点击了配件申请按钮
// 已经有配件
// 。。。
// 没有配件
// 过程反馈
uni
.
navigateTo
({
url
:
'pages/order/applyParts?orderId='
+
this
.
order
.
orderId
async
handleApplyParts
()
{
// 点击了配件申请按钮
let
res
=
await
this
.
$u
.
api
.
applyList
({
'pageSize'
:
1000
,
'pageNumbr'
:
1
,
'status'
:
-
1
,
// -1 全部,0 新申请,15 待收件,30 待返件,31 返件中
'workOrderId'
:
this
.
order
.
orderId
})
if
(
res
&&
res
.
code
==
200
)
{
this
.
partsList
=
res
.
data
var
info
=
{
"id"
:
-
42709016.6594239
,
"type"
:
88413470.94766659
,
"orderNumber"
:
"pariatur laborum ea ex esse"
,
"uid"
:
-
61461132.62552948
,
"workerId"
:
70257764.93749124
,
"siteId"
:
91073388.46493345
,
"status"
:
-
78811049.71325992
,
"totalPriceApply"
:
-
69669986.12053828
,
"totalPriceOuter"
:
-
38559657.143752135
,
"totalPriceWarranty"
:
-
9593647.922237426
,
"totalPriceActual"
:
35845815.5364739
,
"warehouseId"
:
43961846.7964488
,
"applyRemark"
:
"laborum"
,
"deliverRemark"
:
"ipsum"
,
"createTime"
:
"cillum in"
,
"updateTime"
:
"quis anim Excepteur"
,
"items"
:
[{
"id"
:
85963506.7881138
,
"orderId"
:
76010853.55550486
,
"name"
:
"enim anim"
,
"partId"
:
83077645.73603413
,
"status"
:
66648893.6392526
,
"quantity"
:
56583424.78318676
,
"priceApply"
:
-
64258092.910463735
,
"priceActual"
:
-
99843111.0489868
,
"returnType"
:
18577818.731817245
,
"useCount"
:
88566288.29139715
,
"createTime"
:
"sit"
,
"updateTime"
:
"voluptate magna"
,
"returnId"
:
80564978.93037826
}],
"images"
:
"/rest/file/image/parts/invoice_1591333116039992.jpg,/rest/file/image/parts/invoice_1591333116048870.jpg"
,
"statusText"
:
"待审核"
,
"productBarcode"
:
"aliquip eiusmod"
,
"categoryName"
:
"电冰箱"
,
"productId"
:
-
92130282.75386024
,
"supplierId"
:
-
38136950.98157277
,
"express"
:
{
"orderId"
:
-
52586906.11654462
,
"status"
:
30015312.066286445
,
"name"
:
"deserunt non pariatur"
,
"phoneNumber"
:
"sint cupidatat culpa"
,
"areaCode"
:
80825529.78860953
,
"address"
:
"qui aliqua"
,
"createTime"
:
"minim reprehenderit incididunt nostrud sunt"
,
"deliveryTime"
:
"magna enim officia aliqua ut"
,
"updateTime"
:
"exercitation aliqua mollit consequat ea"
,
"number"
:
"fugiat amet dolore sint"
,
"com"
:
"Ut cupidatat"
,
"remark"
:
"Duis pariatur"
},
"measures"
:
"est laboris aute"
,
"workOrderNumber"
:
"OR20150327000003"
,
"productModel"
:
"id sunt incididunt"
,
"workOrderId"
:
72686362.92537045
,
"brandName"
:
"长虹(CHANGHONG)"
}
console
.
log
(
'-------data--------:'
,
this
.
partsList
,
info
)
this
.
partsList
=
[
info
]
}
if
(
this
.
partsList
.
length
>
0
)
{
// 已经有配件,弹出配件列表
this
.
showApplyList
=
true
}
else
{
// 没有配件,跳到配件申请
this
.
toApplyParts
()
}
},
handleBtn
()
{
console
.
log
(
'click button'
)
...
...
@@ -863,10 +938,21 @@
// url: 'pages/index/learn'
// })
// },
handle
Download
()
{
handle
Join
()
{
this
.
visible
=
false
// 添加客服
},
handleOperate
()
{
// 点了弹窗里的配件操作
},
handleApply
()
{
// 点了弹窗的申请配件
this
.
toApplyParts
()
},
toApplyParts
()
{
uni
.
navigateTo
({
url
:
'pages/order/applyParts?orderId='
+
this
.
order
.
orderId
})
}
}
};
</
script
>
...
...
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