Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
account-book
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
刘文虎
account-book
Commits
bbcf8e16
Commit
bbcf8e16
authored
Sep 16, 2022
by
刘文虎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自定义报价接口调试
parent
4678241d
Pipeline
#3481
canceled with stages
Changes
25
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
1532 additions
and
471 deletions
+1532
-471
.env.js
.env.js
+1
-1
quoted-price.js
api/bill/quoted-price.js
+101
-0
bottom-buttons.vue
components/common/bottom-buttons.vue
+94
-0
manifest.json
manifest.json
+1
-1
pages.json
pages.json
+72
-59
select-view.vue
pages/bill/quoted-price/components/select-view.vue
+16
-4
classification.vue
pages/bill/quoted-price/create/classification.vue
+191
-0
create-price.vue
pages/bill/quoted-price/create/create-price.vue
+388
-0
create.vue
pages/bill/quoted-price/create/create.vue
+7
-4
edit.vue
pages/bill/quoted-price/create/edit.vue
+126
-85
price.vue
pages/bill/quoted-price/create/price.vue
+35
-52
collapse-body.vue
pages/bill/quoted-price/custom/components/collapse-body.vue
+6
-4
custom.vue
pages/bill/quoted-price/custom/custom.vue
+51
-109
quoted-price.vue
pages/bill/quoted-price/quoted-price.vue
+3
-3
select-price.vue
pages/bill/quoted-price/select-price/select-price.vue
+106
-56
show-voucher.vue
pages/maintain-bill/components/show-voucher.vue
+5
-14
create.vue
pages/maintain-bill/create.vue
+1
-1
show.vue
pages/maintain-bill/show.vue
+1
-13
global-input.vue
pages/mine/global-input/global-input.vue
+271
-0
input.vue
pages/mine/input/input.vue
+4
-19
create-schedule.vue
pages/schedule/create-schedule/create-schedule.vue
+1
-1
config.js
utils/config.js
+1
-1
quoted-price.js
utils/options/bill/quoted-price.js
+13
-2
index.js
utils/options/maintain-bill/index.js
+34
-39
request.js
utils/request.js
+3
-3
No files found.
.env.js
View file @
bbcf8e16
;(
function
()
{
;(
function
()
{
let
NODE_ENV
=
'
prod
'
// dev:开发环境 | test:测试环境 | prod:生产环境
let
NODE_ENV
=
'
test
'
// dev:开发环境 | test:测试环境 | prod:生产环境
let
ENV_VAR
=
null
let
ENV_VAR
=
null
let
VERSION
=
'v1.0.15'
let
VERSION
=
'v1.0.15'
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
...
...
api/bill/quoted-price.js
View file @
bbcf8e16
...
@@ -14,3 +14,104 @@ export function getOffer(data) {
...
@@ -14,3 +14,104 @@ export function getOffer(data) {
data
data
})
})
}
}
export
function
getCustomOffer
(
data
)
{
return
request
({
url
:
`/rest/offer/getOffer/
${
data
}
`
,
method
:
'GET'
})
}
// 选择报价 -列表(返回分类数量/报价数量)
export
function
getOfferTemplate
(
data
)
{
return
request
({
url
:
`/rest/offer/getOfferTemplate`
,
method
:
'GET'
,
data
})
}
// 编辑报价名称 -列表
export
function
updateOfferTemplate
(
data
)
{
return
request
({
url
:
`/rest/offer/editOfferTemplate`
,
method
:
'POST'
,
data
})
}
// 获取报价详情 -列表
export
function
getTemplateInfo
(
data
)
{
return
request
({
url
:
`/rest/offer/getTemplateInfo/
${
data
}
`
,
method
:
'GET'
,
data
})
}
// 删除报价 -列表
export
function
deleteTemplate
(
data
)
{
return
request
({
url
:
`/rest/offer/deleteTemplate/
${
data
}
`
,
method
:
'GET'
,
})
}
//===========
// 报价分类
export
function
getClassificationList
(
data
)
{
return
request
({
url
:
`/rest/offer/getClassification/
${
data
}
`
,
method
:
'GET'
,
})
}
export
function
updateClassification
(
data
)
{
return
request
({
url
:
`/rest/offer/editOfferClassification`
,
method
:
'POST'
,
data
})
}
// 删除分类
export
function
deleteClassification
(
data
)
{
return
request
({
url
:
`/rest/offer/deleteClassification/
${
data
}
`
,
method
:
'GET'
,
})
}
//===========
// 报价
export
function
getOfferPriceList
(
data
)
{
return
request
({
url
:
`/rest/offer/getPrice/
${
data
}
`
,
method
:
'GET'
,
})
}
export
function
updateOfferPrice
(
data
)
{
return
request
({
url
:
`/rest/offer/editOfferPrice`
,
method
:
'POST'
,
data
})
}
export
function
getOfferPriceInfo
(
data
)
{
return
request
({
url
:
`/rest/offer/getPriceInfo/
${
data
}
`
,
method
:
'GET'
,
})
}
// 删除报价
export
function
deleteOfferPrice
(
data
)
{
return
request
({
url
:
`/rest/offer/deletePrice/
${
data
}
`
,
method
:
'GET'
,
})
}
\ No newline at end of file
components/common/bottom-buttons.vue
0 → 100644
View file @
bbcf8e16
<
template
>
<view
class=
"bottom-buttons"
>
<view
class=
"left-view"
v-if=
"showCancel"
>
<u-button
:custom-style=
"customCancel"
@
click=
"handleClickCancel"
><view
class=
"skip-view"
>
{{
cancelText
}}
</view></u-button>
</view>
<view
class=
"right-view"
>
<u-button
:custom-style=
"customConFirm"
@
click=
"handleClickSure"
:disabled=
"disabled"
:loading=
"loading"
><view
class=
"confirm-view"
>
{{
confirmText
}}
</view></u-button>
</view>
</view>
</
template
>
<
script
>
export
default
{
props
:{
disabled
:{
type
:
Boolean
,
default
:
false
},
loading
:{
type
:
Boolean
,
default
:
false
},
showCancel
:{
type
:
Boolean
,
default
:
true
},
cancelText
:{
type
:
String
,
default
:
'取消'
},
confirmText
:{
type
:
String
,
default
:
'保存'
},
},
data
()
{
return
{
customCancel
:
{
color
:
'#02A074'
,
height
:
'104rpx'
,
'border-radius'
:
'16rpx'
,
width
:
'200rpx'
,
},
};
},
computed
:{
customConFirm
()
{
return
{
color
:
'transparent'
,
'background-color'
:
this
.
disabled
?
'#7DCFB8'
:
'#02a074'
,
height
:
'104rpx'
,
'border-radius'
:
'16rpx'
}
},
},
methods
:{
handleClickCancel
(){
this
.
$emit
(
'cancel'
)
},
handleClickSure
(){
this
.
$emit
(
'confirm'
)
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.bottom-buttons
{
margin
:
16rpx
0rpx
36rpx
0rpx
;
display
:
flex
;
align-items
:
center
;
.left-view
{
margin-right
:
32rpx
;
.skip-view
{
color
:
#fc524d
;
height
:
104rpx
;
line-height
:
104rpx
;
font-weight
:
bold
;
font-size
:
32rpx
;
}
}
.right-view
{
flex
:
1
;
.confirm-view
{
color
:
#ffffff
;
height
:
104rpx
;
line-height
:
104rpx
;
font-weight
:
bold
;
font-size
:
32rpx
;
}
}
}
</
style
>
manifest.json
View file @
bbcf8e16
{
{
"name"
:
"
扳手记账
"
,
"name"
:
"
account-book
"
,
"appid"
:
"__UNI__EDB8C7C"
,
"appid"
:
"__UNI__EDB8C7C"
,
"description"
:
""
,
"description"
:
""
,
"versionName"
:
"1.0.6"
,
"versionName"
:
"1.0.6"
,
...
...
pages.json
View file @
bbcf8e16
...
@@ -144,49 +144,58 @@
...
@@ -144,49 +144,58 @@
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
}
,{
},
{
"path"
:
"quoted-price/custom/custom"
,
"path"
:
"quoted-price/custom/custom"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
"查报价"
,
"navigationBarTitleText"
:
"查报价"
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
,
"navigationStyle"
:
"custom"
}
}
}
},
{
,{
"path"
:
"quoted-price/select-price/select-price"
,
"path"
:
"quoted-price/select-price/select-price"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"选择报价"
,
"navigationBarTitleText"
:
"选择报价"
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
}
},
{
,{
"path"
:
"quoted-price/create/create"
,
"path"
:
"quoted-price/create/create"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"创建报价"
,
"navigationBarTitleText"
:
"创建报价"
,
"enablePullDownRefresh"
:
false
,
"enablePullDownRefresh"
:
false
,
"navigationStyle"
:
"custom"
"navigationStyle"
:
"custom"
}
}
}
},
{
,{
"path"
:
"quoted-price/create/edit"
,
"path"
:
"quoted-price/create/edit"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"创建报价"
,
"navigationBarTitleText"
:
"创建报价"
,
"enablePullDownRefresh"
:
false
,
"enablePullDownRefresh"
:
false
,
"navigationStyle"
:
"custom"
"navigationStyle"
:
"custom"
}
}
},
{
"path"
:
"quoted-price/create/price"
,
"style"
:
{
"navigationBarTitleText"
:
"服务报价"
,
"enablePullDownRefresh"
:
false
,
"navigationStyle"
:
"custom"
}
}
,{
"path"
:
"quoted-price/create/list"
,
},
{
"path"
:
"quoted-price/create/create-price"
,
"style"
:
{
"navigationBarTitleText"
:
"新建价格"
,
"enablePullDownRefresh"
:
false
,
"navigationStyle"
:
"custom"
}
}
,{
"path"
:
"quoted-price/create/classification"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
"服务"
,
"navigationBarTitleText"
:
"服务
分类
"
,
"enablePullDownRefresh"
:
false
,
"enablePullDownRefresh"
:
false
,
"navigationStyle"
:
"custom"
"navigationStyle"
:
"custom"
}
}
...
@@ -322,6 +331,14 @@
...
@@ -322,6 +331,14 @@
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
{
"path"
:
"global-input/global-input"
,
"style"
:
{
"navigationBarTitleText"
:
"修改"
,
"enablePullDownRefresh"
:
false
,
"navigationStyle"
:
"custom"
}
}
}
]
]
},
},
...
@@ -375,25 +392,21 @@
...
@@ -375,25 +392,21 @@
"enablePullDownRefresh"
:
false
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
"disableScroll"
:
true
}
}
}
,{
},
{
"path"
:
"bill-style"
,
"path"
:
"bill-style"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
"收据样式"
,
"navigationBarTitleText"
:
"收据样式"
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
}
},
{
,{
"path"
:
"choose-remark/choose-remark"
,
"path"
:
"choose-remark/choose-remark"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"备注模板"
,
"navigationBarTitleText"
:
"备注模板"
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
}
}]
]
},
},
{
{
"root"
:
"pages/card"
,
"root"
:
"pages/card"
,
...
@@ -442,7 +455,7 @@
...
@@ -442,7 +455,7 @@
"navigationBarBackgroundColor"
:
"#F6F7FA"
,
"navigationBarBackgroundColor"
:
"#F6F7FA"
,
"backgroundColor"
:
"#F6F7FA"
,
"backgroundColor"
:
"#F6F7FA"
,
"app-plus"
:
{
"app-plus"
:
{
"scrollIndicator"
:
"none"
"scrollIndicator"
:
"none"
}
}
},
},
"tabBar"
:
{
"tabBar"
:
{
...
...
pages/bill/quoted-price/components/select-view.vue
View file @
bbcf8e16
<
template
>
<
template
>
<view
class=
"select-view"
@
click=
"tabsClick"
>
<view
class=
"select-view"
@
click=
"tabsClick"
>
<text>
家电维安
</text>
<text>
{{
label
}}
</text>
<u-icon
name=
"arrow-down"
class=
"arrow"
></u-icon>
<u-icon
name=
"arrow-down"
class=
"arrow"
></u-icon>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
props
:{
label
:{
type
:
String
,
default
:
'家电维安'
},
value
:{
type
:
Number
|
null
,
}
},
data
()
{
data
()
{
return
{
return
{
...
@@ -14,9 +23,12 @@
...
@@ -14,9 +23,12 @@
},
},
methods
:{
methods
:{
tabsClick
(){
tabsClick
(){
uni
.
navigateTo
({
this
.
$u
.
route
({
url
:
"/pages/bill/quoted-price/select-price/select-price"
url
:
'/pages/bill/quoted-price/select-price/select-price'
,
})
params
:
{
id
:
this
.
value
}
});
}
}
}
}
}
}
...
...
pages/bill/quoted-price/create/classification.vue
0 → 100644
View file @
bbcf8e16
<
template
>
<view
class=
"list"
>
<NavbarRight
backTextBold
:backText=
"backText"
/>
<NoData
v-if=
"noData"
:text=
"noDataText"
customStyle=
"margin-top: 0rpx;"
:imageName=
"noDataImage"
/>
<block
v-else
>
<view
class=
"item"
v-for=
"(item, index) in list"
:key=
"item.id"
@
click=
"clickCell(item)"
>
<view
class=
"item-left"
>
{{
item
.
classificationName
}}
</view>
<view
class=
"item-right"
>
<view
class=
"item-right-price"
v-if=
"type === 'priceNumber'"
>
<text>
¥
</text>
<text>
100
</text>
<text>
-
</text>
<text>
150
</text>
</view>
<view
class=
"item-right-icon"
><u-icon
name=
"edit-pen"
></u-icon></view>
</view>
</view>
</block>
<submit-button
@
handleClick=
"add"
plusIcon
text=
"创建服务分类"
></submit-button>
<PopInput
title=
"删除提醒"
type=
"text"
sureText=
"确定"
content=
"确认删除该分类?"
:visible
.
sync=
"showConfirm"
@
click=
"handleConfirm"
@
cancel=
"handleCancel"
/>
</view>
</
template
>
<
script
>
import
NavbarRight
from
'@/components/navbar-right'
;
import
NoData
from
'@/components/no-data'
;
import
PopInput
from
'@/components/pop-input-view'
;
import
SubmitButton
from
'@/components/submit-button/index.vue'
;
import
{
billBaseUrl
}
from
'@/utils/config.js'
;
import
{
getList
,
deleteById
,
enable
,
close
}
from
'@/api/mine/timed.js'
;
import
{
getClassificationList
,
updateClassification
}
from
'@/api/bill/quoted-price.js'
;
export
default
{
components
:
{
NoData
,
PopInput
,
SubmitButton
,
NavbarRight
},
data
()
{
return
{
billBaseUrl
,
showConfirm
:
false
,
readyDeleteItem
:
null
,
loaded
:
false
,
noDataText
:
'当前暂无内容'
,
noDataImage
:
'bill/wuzhangdanneirong@3x.png'
,
list
:
[],
title
:
''
,
type
:
''
,
templateId
:
''
,
notification
:
'update-offer-classification'
,
refreshNotification
:
'refresh-offer-classification'
};
},
onLoad
(
option
)
{
if
(
option
&&
option
.
id
)
{
this
.
templateId
=
option
.
id
;
this
.
getList
();
}
},
onUnload
()
{
uni
.
$off
(
this
.
notification
);
uni
.
$off
(
this
.
refreshNotification
);
},
onReady
()
{},
computed
:
{
noData
()
{
return
(
this
.
list
||
[]).
length
==
0
&&
this
.
loaded
;
},
backText
()
{
return
'服务分类'
;
}
},
methods
:
{
async
getList
()
{
this
.
loaded
=
false
;
try
{
let
{
data
}
=
await
getClassificationList
(
this
.
templateId
);
this
.
list
=
data
||
[];
}
catch
(
e
)
{
console
.
log
(
e
);
//TODO handle the exception
}
this
.
loaded
=
true
;
},
add
()
{
this
.
toEdit
();
},
clickCell
(
item
)
{
this
.
toEdit
(
item
);
},
toEdit
(
item
)
{
let
params
=
{
type
:
this
.
notification
,
deleteType
:
this
.
refreshNotification
,
value
:
''
};
let
id
=
(
item
&&
item
.
id
)
||
''
;
if
(
id
)
{
params
.
value
=
encodeURIComponent
(
item
.
classificationName
);
params
.
id
=
id
;
}
console
.
log
(
params
);
this
.
$u
.
route
({
url
:
'/pages/mine/global-input/global-input'
,
params
});
uni
.
$once
(
`input-sure-
${
this
.
notification
}
`
,
res
=>
{
let
data
=
{
classificationName
:
res
.
content
,
templateId
:
this
.
templateId
};
if
(
id
)
{
data
.
id
=
id
;
}
this
.
update
(
data
);
});
uni
.
$once
(
this
.
refreshNotification
,
res
=>
{
this
.
getList
();
});
},
async
update
(
params
)
{
try
{
let
{
data
}
=
await
updateClassification
(
params
);
this
.
getList
();
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
}
},
beforeDelete
(
item
)
{
this
.
readyDeleteItem
=
item
;
this
.
showConfirm
=
true
;
},
handleConfirm
()
{
this
.
onDelete
();
},
handleCancel
()
{},
async
onDelete
()
{
try
{
let
params
=
{
id
:
this
.
readyDeleteItem
.
id
};
let
{
data
}
=
await
deleteById
(
params
);
this
.
getList
();
}
catch
(
e
)
{
console
.
log
(
e
);
//TODO handle the exception
}
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.list
{
width
:
100%
;
padding
:
32rpx
24rpx
;
padding-bottom
:
144rpx
;
min-height
:
100%
;
color
:
#333333
;
.item
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
background-color
:
#ffffff
;
border-radius
:
16rpx
;
padding
:
32rpx
24rpx
;
margin-top
:
24rpx
;
&
-left
{
font-size
:
28rpx
;
font-weight
:
bold
;
}
&
-right
{
display
:
flex
;
align-items
:
center
;
&
-price
{
font-size
:
28rpx
;
font-weight
:
bold
;
color
:
#fc524d
;
}
&
-icon
{
margin-left
:
32rpx
;
color
:
#cccccc
;
}
}
}
}
</
style
>
pages/bill/quoted-price/create/create-price.vue
0 → 100644
View file @
bbcf8e16
This diff is collapsed.
Click to expand it.
pages/bill/quoted-price/create/create.vue
View file @
bbcf8e16
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
<
script
>
<
script
>
import
NavbarNormal
from
'@/components/navbar-normal'
;
import
NavbarNormal
from
'@/components/navbar-normal'
;
import
{
updateOfferTemplate
}
from
"@/api/bill/quoted-price.js"
export
default
{
export
default
{
components
:
{
components
:
{
NavbarNormal
NavbarNormal
...
@@ -83,6 +84,7 @@ export default {
...
@@ -83,6 +84,7 @@ export default {
},
},
onLoad
(
options
)
{},
onLoad
(
options
)
{},
onUnload
()
{},
onUnload
()
{},
methods
:
{
methods
:
{
handleInput
(
event
)
{
handleInput
(
event
)
{
// 直接给input设maxlength输入拼音的时候有影响
// 直接给input设maxlength输入拼音的时候有影响
...
@@ -102,14 +104,15 @@ export default {
...
@@ -102,14 +104,15 @@ export default {
},
},
async
create
(
name
){
async
create
(
name
){
try
{
try
{
// let {data}=await add({
let
{
data
}
=
await
updateOfferTemplate
({
// name:name
templateName
:
name
// })
})
console
.
log
(
data
)
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'/pages/bill/quoted-price/create/edit'
,
url
:
'/pages/bill/quoted-price/create/edit'
,
type
:
'redirectTo'
,
type
:
'redirectTo'
,
params
:
{
params
:
{
// id: id
id
:
data
}
}
});
});
}
catch
(
e
){
}
catch
(
e
){
...
...
pages/bill/quoted-price/create/edit.vue
View file @
bbcf8e16
...
@@ -5,28 +5,18 @@
...
@@ -5,28 +5,18 @@
<view
class=
"content-view"
>
<view
class=
"content-view"
>
<view
class=
"name"
>
<view
class=
"name"
>
<view
class=
"name-label"
>
报价名称
</view>
<view
class=
"name-label"
>
报价名称
</view>
<view
class=
"name-value"
>
<view
class=
"name-value"
@
click=
"toEdit"
>
<u-input
<text>
{{
info
.
templateName
}}
</text>
v-model=
"info.name"
<u-icon
name=
"arrow-right"
class=
"name-value-arrow"
></u-icon>
type=
"text"
height=
"36rpx"
input-align=
"right"
placeholder=
"填写报价名称,10字以内"
:border=
"false"
:custom-style=
"inputStyle"
:placeholder-style=
"placeholderStyle"
:clearable=
"false"
@
input=
"handleInput"
/>
</view>
</view>
</view>
</view>
<view
class=
"item"
v-for=
"(item, index) in createCategoryOptions"
:key=
"index"
>
<view
class=
"item"
v-for=
"(item, index) in createCategoryOptions"
:key=
"index"
@
click=
"clickCell(item)"
>
<view
class=
"item-left"
>
<view
class=
"item-left"
>
<view
class=
"item-left-icon"
><image
:src=
"item.icon"
mode=
""
></image></view>
<view
class=
"item-left-icon"
><image
:src=
"item.icon"
mode=
""
></image></view>
<view
class=
"item-left-label"
>
{{
item
.
label
}}
</view>
<view
class=
"item-left-label"
>
{{
item
.
label
}}
</view>
<view
class=
"item-left-num"
v-if=
"info[item.value]"
>
(
{{
(
info
[
item
.
value
]
&&
info
[
item
.
value
].
length
)
||
0
}}
)
</view>
<view
class=
"item-left-num"
>
(
{{
info
[
item
.
value
]
||
0
}}
)
</view>
</view>
</view>
<view
class=
"item-right"
hover-class=
"u-hover-class"
@
click=
"add(item)"
>
<view
class=
"item-right"
hover-class=
"u-hover-class"
@
click
.
stop
=
"add(item)"
>
<view
class=
"item-right-icon"
><u-icon
name=
"plus"
></u-icon></view>
<view
class=
"item-right-icon"
><u-icon
name=
"plus"
></u-icon></view>
<view
class=
"item-right-label"
>
新建
</view>
<view
class=
"item-right-label"
>
新建
</view>
</view>
</view>
...
@@ -36,14 +26,7 @@
...
@@ -36,14 +26,7 @@
<text>
查看报价示意图
</text>
<text>
查看报价示意图
</text>
</view>
</view>
</view>
</view>
<view
class=
"bottom-view"
>
<bottom-buttons
cancelText=
'删除'
confirmText=
"返回"
@
cancel=
"handleClickDelete"
@
confirm=
"handleClickSure"
></bottom-buttons>
<view
class=
"left-view"
>
<u-button
:custom-style=
"customDelete"
@
click=
"handleClickDelete"
><view
class=
"skip-view"
>
删除
</view></u-button>
</view>
<view
class=
"right-view"
>
<u-button
:custom-style=
"customConFirm"
@
click=
"handleClickSure"
:disabled=
"!canConfirm"
:loading=
"buttonLoading"
><view
class=
"confirm-view"
>
保存
</view></u-button>
</view>
</view>
<PopNormal
title=
"操作提醒"
:visible
.
sync=
"visible"
@
confirm=
"handleClickConfirm"
cancelText=
"取消"
confirmText=
"确认"
content=
"确认删除该条报价吗?"
/>
<PopNormal
title=
"操作提醒"
:visible
.
sync=
"visible"
@
confirm=
"handleClickConfirm"
cancelText=
"取消"
confirmText=
"确认"
content=
"确认删除该条报价吗?"
/>
</view>
</view>
</
template
>
</
template
>
...
@@ -52,20 +35,23 @@
...
@@ -52,20 +35,23 @@
import
NavbarNormal
from
'@/components/navbar-normal'
;
import
NavbarNormal
from
'@/components/navbar-normal'
;
import
NavbarRight
from
'@/components/navbar-right'
;
import
NavbarRight
from
'@/components/navbar-right'
;
import
PopNormal
from
'@/components/pop-normal'
;
import
PopNormal
from
'@/components/pop-normal'
;
import
BottomButtons
from
'@/components/common/bottom-buttons.vue'
;
import
{
billBaseUrl
}
from
'@/utils/config.js'
;
import
{
billBaseUrl
}
from
'@/utils/config.js'
;
import
{
createCategoryOptions
}
from
'@/utils/options/bill/quoted-price.js'
;
import
{
createCategoryOptions
}
from
'@/utils/options/bill/quoted-price.js'
;
import
{
updateOfferTemplate
,
getTemplateInfo
}
from
'@/api/bill/quoted-price.js'
;
export
default
{
export
default
{
components
:
{
components
:
{
BottomButtons
,
NavbarNormal
,
NavbarNormal
,
NavbarRight
,
NavbarRight
,
PopNormal
,
PopNormal
},
},
data
()
{
data
()
{
return
{
return
{
createCategoryOptions
,
createCategoryOptions
,
previewIcon
:
billBaseUrl
+
'yulanicon@3x.png'
,
previewIcon
:
billBaseUrl
+
'yulanicon@3x.png'
,
info
:
{
info
:
{
n
ame
:
''
templateN
ame
:
''
},
},
inputStyle
:
{
inputStyle
:
{
'font-size'
:
'28rpx'
,
'font-size'
:
'28rpx'
,
...
@@ -75,57 +61,131 @@ export default {
...
@@ -75,57 +61,131 @@ export default {
},
},
placeholderStyle
:
'font-weight:normal'
,
placeholderStyle
:
'font-weight:normal'
,
maxlength
:
10
,
maxlength
:
10
,
customConFirm
:
{
visible
:
false
,
color
:
'transparent'
,
id
:
null
,
'background-color'
:
this
.
canConfirm
?
'#02a074'
:
'#7DCFB8'
,
notification
:
'update-price-template-name'
,
height
:
'104rpx'
,
refreshNotification
:
'refresh-price'
,
'border-radius'
:
'16rpx'
canRefresh
:
false
},
customDelete
:
{
color
:
'#02A074'
,
height
:
'104rpx'
,
'border-radius'
:
'16rpx'
,
width
:
'200rpx'
,
},
buttonLoading
:
false
,
visible
:
false
};
};
},
},
computed
:
{
computed
:
{
canConfirm
()
{
if
(
!
this
.
info
.
name
)
{
},
return
false
;
onLoad
(
options
)
{
}
if
(
options
&&
options
.
id
){
return
true
;
this
.
id
=
options
.
id
this
.
getDetail
()
}
}
},
},
onUnload
()
{
uni
.
$off
(
this
.
notification
);
uni
.
$off
(
this
.
refreshNotification
);
},
onShow
()
{
// if(this.canRefresh){
// this.getDetail()
// }
},
methods
:
{
methods
:
{
handleInput
(
event
)
{
async
getDetail
()
{
// 直接给input设maxlength输入拼音的时候有影响
try
{
if
(
event
.
length
>
this
.
maxlength
)
{
let
{
data
}
=
await
getTemplateInfo
(
this
.
id
);
this
.
$nextTick
(()
=>
{
if
(
data
)
{
this
.
info
.
name
=
event
.
substring
(
0
,
this
.
maxlength
);
this
.
info
=
data
;
}
}
catch
(
e
)
{
console
.
log
(
e
);
//TODO handle the exception
}
this
.
canRefresh
=
true
},
clickCell
(
item
){
uni
.
$once
(
`input-sure-
${
this
.
refreshNotification
}
`
,
res
=>
{
this
.
getDetail
()
});
});
let
path
=
''
if
(
item
.
value
===
'classificationNumber'
){
path
=
'pages/bill/quoted-price/create/classification'
}
else
{
if
(
this
.
info
.
classificationNumber
<=
0
){
this
.
showToast
(
'请先创建服务分类'
)
return
false
}
path
=
'pages/bill/quoted-price/create/price'
}
}
this
.
$u
.
route
({
url
:
path
,
type
:
'navigateTo'
,
params
:
{
id
:
this
.
id
}
});
},
},
add
(
item
)
{
add
(
item
)
{
uni
.
$once
(
`input-sure-
${
this
.
refreshNotification
}
`
,
res
=>
{
this
.
getDetail
()
});
let
path
=
''
if
(
item
.
value
===
'classificationNumber'
){
path
=
'pages/bill/quoted-price/create/classification'
}
else
{
path
=
'pages/bill/quoted-price/create/price'
}
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/bill/quoted-price/create/list'
,
url
:
path
,
type
:
'navigateTo'
,
type
:
'navigateTo'
,
params
:
{
params
:
{
type
:
item
.
value
type
:
item
.
value
,
id
:
this
.
id
}
});
},
toEdit
(){
let
value
=
this
.
info
.
templateName
;
this
.
$u
.
route
({
url
:
'/pages/mine/input/input'
,
params
:
{
type
:
this
.
notification
,
value
:
encodeURIComponent
(
value
),
}
});
uni
.
$once
(
`input-sure-
${
this
.
notification
}
`
,
res
=>
{
let
params
=
{
id
:
this
.
info
.
id
,
templateName
:
res
.
content
}
}
this
.
updateTemplateName
(
params
)
});
});
},
},
handleClickDelete
(){
async
updateTemplateName
(
params
){
this
.
visible
=
true
try
{
let
{
data
}
=
await
updateOfferTemplate
(
params
)
this
.
getDetail
()
}
catch
(
e
){
//TODO handle the exception
console
.
log
(
e
)
}
},
},
handleClick
Sure
()
{
handleClick
Delete
()
{
this
.
visible
=
true
;
},
},
handleClickConfirm
(){
handleClickSure
()
{
this
.
$u
.
route
({
type
:
'back'
});
},
},
// 确认删除
async
handleClickConfirm
()
{
try
{
let
{
data
}
=
await
updateOfferTemplate
({
id
:
this
.
id
,
deleteFlag
:
true
});
this
.
$u
.
route
({
type
:
'back'
});
}
catch
(
e
)
{
console
.
log
(
e
);
//TODO handle the exception
}
}
}
}
};
};
</
script
>
</
script
>
...
@@ -141,33 +201,8 @@ export default {
...
@@ -141,33 +201,8 @@ export default {
.content-view
{
.content-view
{
height
:
100%
;
height
:
100%
;
overflow
:
auto
;
overflow
:
auto
;
padding
:
0
24rpx
;
}
.bottom-view
{
margin
:
16rpx
32rpx
36rpx
32rpx
;
display
:
flex
;
align-items
:
center
;
.left-view
{
.skip-view
{
color
:
#FC524D
;
height
:
104rpx
;
line-height
:
104rpx
;
font-weight
:
bold
;
font-size
:
32rpx
;
}
}
.right-view
{
margin-left
:
32rpx
;
flex
:
1
;
.confirm-view
{
color
:
#ffffff
;
height
:
104rpx
;
line-height
:
104rpx
;
font-weight
:
bold
;
font-size
:
32rpx
;
}
}
}
}
.name
{
.name
{
height
:
108rpx
;
height
:
108rpx
;
background
:
#ffffff
;
background
:
#ffffff
;
...
@@ -181,8 +216,14 @@ export default {
...
@@ -181,8 +216,14 @@ export default {
color
:
#333333
;
color
:
#333333
;
}
}
&
-value
{
&
-value
{
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-end
;
width
:
460rpx
;
width
:
460rpx
;
height
:
100%
;
height
:
100%
;
&
-arrow
{
color
:
#cccccc
;
}
}
}
}
}
...
...
pages/bill/quoted-price/create/
list
.vue
→
pages/bill/quoted-price/create/
price
.vue
View file @
bbcf8e16
<
template
>
<
template
>
<view
class=
"list"
>
<view
class=
"list"
>
<NavbarRight
backTextBold
backText=
"创建报价
"
/>
<NavbarRight
backTextBold
:backText=
"backText
"
/>
<NoData
v-if=
"noData"
:text=
"noDataText"
customStyle=
"margin-top: 0rpx;"
:imageName=
"noDataImage"
/>
<NoData
v-if=
"noData"
:text=
"noDataText"
customStyle=
"margin-top: 0rpx;"
:imageName=
"noDataImage"
/>
<block
v-else
>
<block
v-else
>
<view
class=
"item"
v-for=
"(item, index) in list"
:key=
"item.id"
@
click=
"clickCell(item)"
>
<view
class=
"item"
v-for=
"(item, index) in list"
:key=
"item.id"
@
click=
"clickCell(item)"
>
<view
class=
"item-left"
>
{{
item
.
n
ame
}}
</view>
<view
class=
"item-left"
>
{{
item
.
offerN
ame
}}
</view>
<view
class=
"item-right"
>
<view
class=
"item-right"
>
<view
class=
"item-right-price"
>
<view
class=
"item-right-price"
>
<text>
¥
</text>
<text>
¥
</text>
<text>
100
</text>
<text>
{{
item
.
offerMinPrice
}}
</text>
<text
v-if=
"item.offerType==='scope'"
>
<text>
-
</text>
<text>
-
</text>
<text>
150
</text>
<text>
{{
item
.
offerMaxPrice
}}
</text>
</text>
</view>
</view>
<view
class=
"item-right-icon"
><u-icon
name=
"edit-pen"
></u-icon></view>
<view
class=
"item-right-icon"
><u-icon
name=
"edit-pen"
></u-icon></view>
</view>
</view>
</view>
</view>
</block>
</block>
<PopInput
title=
"删除提醒"
type=
"text"
sureText=
"确定"
content=
"确认删除该定时计划?"
:visible
.
sync=
"showConfirm"
@
click=
"handleConfirm"
@
cancel=
"handleCancel"
/>
<submit-button
@
handleClick=
"add"
plusIcon
text=
"创建服务价格"
></submit-button>
<submit-button
@
handleClick=
"add"
plusIcon
text=
"创建服务价格"
></submit-button>
</view>
</view>
</
template
>
</
template
>
...
@@ -28,6 +29,7 @@ import PopInput from '@/components/pop-input-view';
...
@@ -28,6 +29,7 @@ import PopInput from '@/components/pop-input-view';
import
SubmitButton
from
'@/components/submit-button/index.vue'
;
import
SubmitButton
from
'@/components/submit-button/index.vue'
;
import
{
billBaseUrl
}
from
'@/utils/config.js'
;
import
{
billBaseUrl
}
from
'@/utils/config.js'
;
import
{
getList
,
deleteById
,
enable
,
close
}
from
'@/api/mine/timed.js'
;
import
{
getList
,
deleteById
,
enable
,
close
}
from
'@/api/mine/timed.js'
;
import
{
getOfferPriceList
,
updateOfferPrice
}
from
'@/api/bill/quoted-price.js'
;
export
default
{
export
default
{
components
:
{
components
:
{
NoData
,
NoData
,
...
@@ -45,41 +47,35 @@ export default {
...
@@ -45,41 +47,35 @@ export default {
noDataImage
:
'bill/wuzhangdanneirong@3x.png'
,
noDataImage
:
'bill/wuzhangdanneirong@3x.png'
,
list
:
[],
list
:
[],
title
:
''
,
title
:
''
,
type
:
''
type
:
''
,
templateId
:
''
,
notification
:
'refresh-offer-price'
};
};
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
if
(
option
&&
option
.
type
)
{
if
(
option
&&
option
.
id
)
{
this
.
type
=
option
.
type
;
this
.
templateId
=
option
.
id
;
this
.
getList
();
}
}
},
},
on
Ready
()
{
on
Unload
()
{
this
.
getList
(
);
uni
.
$off
(
this
.
notification
);
},
},
onReady
()
{},
computed
:
{
computed
:
{
noData
()
{
noData
()
{
return
(
this
.
list
||
[]).
length
==
0
&&
this
.
loaded
;
return
(
this
.
list
||
[]).
length
==
0
&&
this
.
loaded
;
}
},
},
onUnload
()
{
backText
()
{
uni
.
$off
(
'timed-sure-delete'
);
return
'服务价格'
;
}
},
},
methods
:
{
methods
:
{
async
getList
()
{
async
getList
()
{
this
.
loaded
=
false
;
this
.
loaded
=
false
;
try
{
try
{
let
params
=
{
let
{
data
}
=
await
getOfferPriceList
(
this
.
templateId
);
current
:
1
,
this
.
list
=
data
||
[];
size
:
99999
};
let
{
data
}
=
await
getList
(
params
);
data
.
records
.
forEach
(
item
=>
{
item
.
label
=
item
.
classification
.
name
;
item
.
icon
=
item
.
classification
.
recordSelectedIcon
;
item
.
show
=
false
;
item
.
loading
=
false
;
});
this
.
list
=
data
.
records
||
[];
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
//TODO handle the exception
//TODO handle the exception
...
@@ -89,36 +85,20 @@ export default {
...
@@ -89,36 +85,20 @@ export default {
add
()
{
add
()
{
this
.
toEdit
();
this
.
toEdit
();
},
},
toEdit
(
id
=
''
)
{
clickCell
(
item
)
{
this
.
toEdit
(
item
.
id
);
},
toEdit
(
id
=
''
)
{
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'/pages/mine/timed/create-timed/create-timed'
,
url
:
'/pages/bill/quoted-price/create/create-price'
,
params
:
{
params
:{
id
:
id
id
:
id
,
templateId
:
this
.
templateId
,
}
}
});
});
uni
.
$once
(
`refreshList`
,
res
=>
{
uni
.
$once
(
this
.
notification
,
res
=>
{
this
.
getList
()
;
this
.
getList
()
});
});
if
(
id
)
{
uni
.
$once
(
`timed-sure-delete`
,
res
=>
{
this
.
list
.
map
(
el
=>
{
if
(
el
.
id
===
res
.
id
)
{
this
.
beforeDelete
(
el
);
}
});
});
}
},
clickCell
(
item
)
{
let
flag
=
true
;
this
.
list
.
map
(
el
=>
{
if
(
el
.
show
)
{
flag
=
false
;
}
});
if
(
flag
)
{
this
.
toEdit
(
item
.
id
);
}
},
},
beforeDelete
(
item
)
{
beforeDelete
(
item
)
{
this
.
readyDeleteItem
=
item
;
this
.
readyDeleteItem
=
item
;
...
@@ -159,11 +139,14 @@ export default {
...
@@ -159,11 +139,14 @@ export default {
background-color
:
#ffffff
;
background-color
:
#ffffff
;
border-radius
:
16rpx
;
border-radius
:
16rpx
;
padding
:
32rpx
24rpx
;
padding
:
32rpx
24rpx
;
margin-top
:
24rpx
;
&
-left
{
&
-left
{
font-size
:
28rpx
;
font-size
:
28rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
&
-right
{
&
-right
{
display
:
flex
;
align-items
:
center
;
&
-price
{
&
-price
{
font-size
:
28rpx
;
font-size
:
28rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
...
...
pages/bill/quoted-price/custom/components/collapse-body.vue
View file @
bbcf8e16
<
template
>
<
template
>
<view
class=
"collapse-body"
>
<view
class=
"collapse-body"
>
<view
class=
"collapse-body-title"
>
{{
detail
.
classCProject
}}
</view>
<view
class=
"collapse-body-desc"
>
{{
detail
.
offerRemark
}}
</view>
<view
class=
"collapse-body-desc"
>
{{
detail
.
pubRemark
}}
</view>
<view
class=
"collapse-body-bottom"
>
<view
class=
"collapse-body-bottom"
>
<text
class=
"collapse-body-bottom-price"
>
<text
class=
"collapse-body-bottom-price"
>
<text>
¥
</text>
<text>
¥
</text>
<text>
{{
detail
.
chargeStandard
}}{{
detail
.
unit
}}
</text>
<text>
{{
detail
.
offerMinPrice
}}
</text>
<text
v-if=
"detail.offerType==='scope'"
>
<text>
-
</text>
<text>
{{
detail
.
offerMaxPrice
}}
</text>
</text>
</text>
</text>
<view
class=
"collapse-body-bottom-add"
>
<view
class=
"collapse-body-bottom-add"
>
<zb-tooltip
placement=
"top-end"
ref=
"tooltip1"
color=
"#7f7f7f"
:visible
.
sync=
"showTips"
>
<zb-tooltip
placement=
"top-end"
ref=
"tooltip1"
color=
"#7f7f7f"
:visible
.
sync=
"showTips"
>
...
@@ -74,7 +77,6 @@ export default {
...
@@ -74,7 +77,6 @@ export default {
this
.
$emit
(
'add'
,
{
this
.
$emit
(
'add'
,
{
item
:
this
.
detail
,
item
:
this
.
detail
,
num
:
this
.
form
.
num
,
num
:
this
.
form
.
num
,
parentTitle
:
this
.
parentTitle
});
});
}
}
}
}
...
...
pages/bill/quoted-price/custom/custom.vue
View file @
bbcf8e16
<
template
>
<
template
>
<!-- 查报价详情 -->
<!-- 查报价详情 -->
<view
class=
"container"
>
<view
class=
"container"
>
<NavbarRight
title=
"查报价"
imageWidth=
"20"
/>
<!-- 顶部面板 -->
<!-- 顶部面板 -->
<view
class=
"top--panel"
>
<view
class=
"top--panel"
>
<!-- 顶部面板,可添加所需要放在页面顶部的内容代码。比如banner图 -->
<!-- 顶部面板,可添加所需要放在页面顶部的内容代码。比如banner图 -->
<select-view
></select-view>
<select-view></select-view>
<quoted-price-tips></quoted-price-tips>
<quoted-price-tips></quoted-price-tips>
<quoted-price-step></quoted-price-step>
<quoted-price-step></quoted-price-step>
</view>
</view>
...
@@ -14,38 +15,37 @@
...
@@ -14,38 +15,37 @@
<view
class=
"list-box"
v-else
>
<view
class=
"list-box"
v-else
>
<view
class=
"left"
>
<view
class=
"left"
>
<scroll-view
scroll-y
:style=
"
{ width: '100%', height: '100%' }">
<scroll-view
scroll-y
:style=
"
{ width: '100%', height: '100%' }">
<view
class=
"item"
:class=
"
{ active: index == leftIndex }" v-for="(item, index) in
left
Array" :id="item.classA" :key="index" @click="leftTap(item, index)">
<view
class=
"item"
:class=
"
{ active: index == leftIndex }" v-for="(item, index) in
total
Array" :id="item.classA" :key="index" @click="leftTap(item, index)">
<view
class=
"item-icon"
></view>
<view
class=
"item-icon"
></view>
<view
class=
"item-label ellipsis"
>
{{
item
.
class
AProject
}}
</view>
<view
class=
"item-label ellipsis"
>
{{
item
.
class
ificationName
}}
</view>
</view>
</view>
</scroll-view>
</scroll-view>
</view>
</view>
<view
class=
"main"
>
<view
class=
"main"
>
<scroll-view
scroll-y
:style=
"
{ width: '100%', height: '100%' }">
<scroll-view
scroll-y
:style=
"
{ width: '100%', height: '100%' }">
<view
class=
"item main-item"
>
<view
class=
"item main-item"
>
<view
class=
"title"
>
<view>
{{
mainData
.
classAProject
}}
</view>
</view>
<view
class=
"goods-list"
>
<view
class=
"goods-list"
>
<view
class=
"collapse"
>
<view
class=
"collapse"
>
<view
v-for=
"(item2, index2) in mainData.children"
:key=
"index2"
>
<view
v-for=
"(item2, index2) in mainData.children"
:key=
"index2"
>
<view
class=
"collapse-title"
@
click=
"openCollapse(item2)"
>
<view
class=
"collapse-title"
@
click=
"openCollapse(item2)"
>
<view
class=
"collapse-title-left"
>
{{
item2
.
classBProject
}}
</view>
<view
class=
"collapse-title-left"
>
{{
item2
.
offerName
}}
</view>
<view
class=
"collapse-title-right"
>
<view
class=
"collapse-title-right"
>
<text>
¥
</text>
<text>
¥
</text>
<text>
{{
resetPrice
(
item2
)
}}
</text>
<text>
{{
item2
.
offerMinPrice
}}
</text>
<text
v-if=
"item2.offerType==='scope'"
>
<text>
-
</text>
<text>
{{
item2
.
offerMaxPrice
}}
</text>
</text>
<u-icon
name=
"arrow-up"
class=
"collapse-title-right-icon"
v-if=
"item2.open"
></u-icon>
<u-icon
name=
"arrow-up"
class=
"collapse-title-right-icon"
v-if=
"item2.open"
></u-icon>
<u-icon
name=
"arrow-down"
class=
"collapse-title-right-icon"
v-else
></u-icon>
<u-icon
name=
"arrow-down"
class=
"collapse-title-right-icon"
v-else
></u-icon>
</view>
</view>
</view>
</view>
<view
v-if=
"item2.open"
>
<view
v-if=
"item2.open"
>
<collapse-body
<collapse-body
:detail=
"item
3
"
:detail=
"item
2
"
:parentTitle=
"item2.
classBProject
"
:parentTitle=
"item2.
offerName
"
@
add=
"addPrice"
@
add=
"addPrice"
v-for=
"(item3, index3) in item2.children"
:showTips=
"!quotedPriceTooltip"
:key=
"item3.classC"
:showTips=
"!quotedPriceTooltip && index3 === 0"
></collapse-body>
></collapse-body>
</view>
</view>
</view>
</view>
...
@@ -63,6 +63,8 @@
...
@@ -63,6 +63,8 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
NavbarRight
from
'@/components/navbar-right'
;
import
SelectView
from
'../components/select-view.vue'
;
import
NoData
from
'@/components/no-data'
;
import
NoData
from
'@/components/no-data'
;
import
QuotedPriceStep
from
'../components/quoted-price-step.vue'
;
import
QuotedPriceStep
from
'../components/quoted-price-step.vue'
;
import
UniCollapse
from
'@/components/uni-collapse/uni-collapse.vue'
;
import
UniCollapse
from
'@/components/uni-collapse/uni-collapse.vue'
;
...
@@ -71,54 +73,37 @@ import QuotedPriceTips from '../components/quoted-price-tips.vue';
...
@@ -71,54 +73,37 @@ import QuotedPriceTips from '../components/quoted-price-tips.vue';
import
CollapseBody
from
'./components/collapse-body.vue'
;
import
CollapseBody
from
'./components/collapse-body.vue'
;
import
ShoppingCart
from
'./components/shopping-cart.vue'
;
import
ShoppingCart
from
'./components/shopping-cart.vue'
;
import
CartPopup
from
'./components/cart-popup.vue'
;
import
CartPopup
from
'./components/cart-popup.vue'
;
import
SelectView
from
'../components/select-view.vue'
;
import
{
mapGetters
}
from
'vuex'
;
import
{
mapGetters
}
from
'vuex'
;
import
{
getOffer
}
from
'@/api/bill/quoted-price.js'
;
import
{
get
Custom
Offer
}
from
'@/api/bill/quoted-price.js'
;
export
default
{
export
default
{
components
:
{
NoData
,
QuotedPriceStep
,
UniCollapse
,
UniCollapseItem
,
QuotedPriceTips
,
CollapseBody
,
ShoppingCart
,
CartPopup
,
SelectView
},
components
:
{
NoData
,
QuotedPriceStep
,
UniCollapse
,
UniCollapseItem
,
QuotedPriceTips
,
CollapseBody
,
ShoppingCart
,
CartPopup
,
NavbarRight
,
SelectView
},
data
()
{
data
()
{
return
{
return
{
noDataText
:
'当前暂无内容'
,
noDataText
:
'当前暂无内容'
,
noDataImage
:
'bill/wuzhangdanneirong@3x.png'
,
noDataImage
:
'bill/wuzhangdanneirong@3x.png'
,
form
:
{
serviceType
:
''
,
brandCode
:
''
,
prodCode
:
''
},
scrollHeight
:
400
,
scrollHeight
:
400
,
scrollTopSize
:
0
,
scrollTopSize
:
0
,
fillHeight
:
0
,
// 填充高度,用于最后一项低于滚动区域时使用
fillHeight
:
0
,
// 填充高度,用于最后一项低于滚动区域时使用
leftArray
:
[],
mainData
:
[],
// 右侧数据
mainData
:
[],
// 右侧数据
totalArray
:
[],
// 数据集合
totalArray
:
[],
// 数据集合
topArr
:
[],
topArr
:
[],
leftIndex
:
0
,
leftIndex
:
0
,
shoppingCartList
:
[],
// 购物车商品
shoppingCartList
:
[],
// 购物车商品
cartShow
:
false
,
cartShow
:
false
,
loaded
:
false
loaded
:
false
,
id
:
null
};
};
},
},
computed
:
{
computed
:
{
...
mapGetters
([
'quotedPriceTooltip'
]),
...
mapGetters
([
'quotedPriceTooltip'
]),
// mainData(){
// return this.totalArray[this.leftIndex]
// },
noData
()
{
noData
()
{
return
(
this
.
totalArray
||
[]).
length
==
0
&&
this
.
loaded
;
return
(
this
.
totalArray
||
[]).
length
==
0
&&
this
.
loaded
;
}
}
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
if
(
options
)
{
if
(
options
&&
options
.
id
)
{
let
{
serviceType
,
brandCode
,
prodCode
}
=
options
;
this
.
id
=
options
.
id
;
if
(
serviceType
&&
brandCode
&&
prodCode
)
{
this
.
form
.
serviceType
=
serviceType
;
this
.
form
.
brandCode
=
brandCode
;
this
.
form
.
prodCode
=
prodCode
;
}
}
}
// this.form.serviceType = 'WX';
// this.form.brandCode = 'MIDEA';
// this.form.prodCode = '1000';
},
},
onReady
()
{
onReady
()
{
/* 在非H5平台,nextTick回调后有概率获取到错误的元素高度,则添加200ms的延迟来减少BUG的产生 */
/* 在非H5平台,nextTick回调后有概率获取到错误的元素高度,则添加200ms的延迟来减少BUG的产生 */
...
@@ -131,6 +116,26 @@ export default {
...
@@ -131,6 +116,26 @@ export default {
},
100
);
},
100
);
},
},
methods
:
{
methods
:
{
/* 获取列表数据 */
async
getListData
()
{
try
{
let
res
=
await
getCustomOffer
(
this
.
id
);
let
{
code
,
data
,
msg
}
=
res
;
data
.
map
(
item
=>
{
item
.
children
.
map
(
el
=>
{
el
.
open
=
false
})
})
// 总列表赋值
this
.
totalArray
=
data
;
// 右侧列表赋值
this
.
mainData
=
this
.
totalArray
[
this
.
leftIndex
];
}
catch
(
e
)
{
console
.
log
(
e
);
//TODO handle the exception
}
this
.
loaded
=
true
;
},
resetPrice
(
item
)
{
resetPrice
(
item
)
{
let
price
=
0
;
let
price
=
0
;
if
(
item
.
standardMin
&&
item
.
standardMax
)
{
if
(
item
.
standardMin
&&
item
.
standardMax
)
{
...
@@ -154,11 +159,11 @@ export default {
...
@@ -154,11 +159,11 @@ export default {
this
.
setCart
(
params
);
this
.
setCart
(
params
);
},
},
setCart
(
params
)
{
setCart
(
params
)
{
let
{
num
,
parentTitle
}
=
params
;
let
{
num
}
=
params
;
let
item
=
this
.
deepClone
(
params
.
item
);
let
item
=
this
.
deepClone
(
params
.
item
);
let
flag
=
true
;
let
flag
=
true
;
this
.
shoppingCartList
.
forEach
((
target
,
index
)
=>
{
this
.
shoppingCartList
.
forEach
((
target
,
index
)
=>
{
if
(
target
.
classC
===
item
.
classC
)
{
if
(
target
.
id
===
item
.
id
)
{
if
(
num
===
0
)
{
if
(
num
===
0
)
{
this
.
shoppingCartList
.
splice
(
index
,
1
);
this
.
shoppingCartList
.
splice
(
index
,
1
);
}
else
{
}
else
{
...
@@ -169,7 +174,6 @@ export default {
...
@@ -169,7 +174,6 @@ export default {
});
});
if
(
flag
)
{
if
(
flag
)
{
item
.
num
=
num
;
item
.
num
=
num
;
item
.
parentTitle
=
parentTitle
;
this
.
shoppingCartList
.
push
(
item
);
this
.
shoppingCartList
.
push
(
item
);
}
}
if
(
this
.
shoppingCartList
.
length
)
{
if
(
this
.
shoppingCartList
.
length
)
{
...
@@ -195,26 +199,22 @@ export default {
...
@@ -195,26 +199,22 @@ export default {
resetCollapseBody
(
deleted
)
{
resetCollapseBody
(
deleted
)
{
if
(
this
.
shoppingCartList
.
length
)
{
if
(
this
.
shoppingCartList
.
length
)
{
this
.
shoppingCartList
.
forEach
(
item
=>
{
this
.
shoppingCartList
.
forEach
(
item
=>
{
this
.
mainData
.
children
.
forEach
(
data
=>
{
this
.
mainData
.
children
.
forEach
(
el
=>
{
data
.
children
.
map
(
el
=>
{
if
(
item
.
id
===
el
.
id
)
{
if
(
item
.
classC
===
el
.
classC
)
{
this
.
$set
(
el
,
'num'
,
item
.
num
);
this
.
$set
(
el
,
'num'
,
item
.
num
);
data
.
open
=
true
;
el
.
open
=
true
;
}
}
});
});
});
});
});
}
}
// 当购物车中有被删除项时,通知main里面计数器变为0
// 当购物车中有被删除项时,通知main里面计数器变为0
if
(
deleted
)
{
if
(
deleted
)
{
this
.
mainData
.
children
.
forEach
(
data
=>
{
this
.
mainData
.
children
.
forEach
(
data
=>
{
data
.
children
.
map
(
el
=>
{
if
(
deleted
.
id
===
data
.
id
)
{
if
(
deleted
.
classC
===
el
.
classC
)
{
this
.
$set
(
data
,
'num'
,
0
);
this
.
$set
(
el
,
'num'
,
0
);
data
.
open
=
true
;
data
.
open
=
true
;
}
}
});
});
});
}
}
},
},
/* 初始化滚动区域 */
/* 初始化滚动区域 */
...
@@ -234,65 +234,7 @@ export default {
...
@@ -234,65 +234,7 @@ export default {
const
res
=
new
Map
();
const
res
=
new
Map
();
return
arr
.
filter
(
item
=>
!
res
.
has
(
item
[
uniId
])
&&
res
.
set
(
item
[
uniId
],
1
));
return
arr
.
filter
(
item
=>
!
res
.
has
(
item
[
uniId
])
&&
res
.
set
(
item
[
uniId
],
1
));
},
},
/* 获取列表数据 */
async
getListData
()
{
try
{
let
res
=
await
getOffer
(
this
.
form
);
let
{
code
,
data
,
msg
}
=
res
;
//第一层
let
newList
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
// 去重
newList
=
this
.
uniqueFunc
(
newList
,
'classA'
);
// 移除 "备件费"
newList
.
splice
(
newList
.
findIndex
(
item
=>
item
.
classA
===
'T12'
),
1
);
// 左侧列表赋值
this
.
leftArray
=
this
.
deepClone
(
newList
);
// 第二层
newList
.
map
(
el
=>
{
data
.
map
((
item
,
index
)
=>
{
if
(
item
.
classA
===
el
.
classA
)
{
let
item1
=
this
.
deepClone
(
item
);
item1
.
open
=
false
;
if
(
!
el
.
children
)
{
el
.
children
=
[
item1
];
}
else
{
el
.
children
.
push
(
item1
);
}
}
});
});
// 第二层去重
newList
=
newList
.
map
(
item
=>
{
let
arr
=
this
.
deepClone
(
item
.
children
);
item
.
children
=
this
.
uniqueFunc
(
arr
,
'classB'
);
return
item
;
});
// 第三层
newList
.
map
(
el
=>
{
el
.
children
.
map
(
el2
=>
{
data
.
map
((
item
,
index
)
=>
{
if
(
item
.
classB
===
el2
.
classB
)
{
let
item1
=
this
.
deepClone
(
item
);
item1
.
num
=
0
;
if
(
!
el2
.
children
)
{
el2
.
children
=
[
item1
];
}
else
{
el2
.
children
.
push
(
item1
);
}
}
});
});
});
// 总列表赋值
this
.
totalArray
=
newList
;
// 右侧列表赋值
this
.
mainData
=
this
.
totalArray
[
this
.
leftIndex
];
}
catch
(
e
)
{
console
.
log
(
e
);
//TODO handle the exception
}
this
.
loaded
=
true
;
},
/* 左侧导航点击 */
/* 左侧导航点击 */
leftTap
(
item
,
index
)
{
leftTap
(
item
,
index
)
{
this
.
leftIndex
=
index
;
this
.
leftIndex
=
index
;
...
...
pages/bill/quoted-price/quoted-price.vue
View file @
bbcf8e16
<
template
>
<
template
>
<!-- 查报价 -->
<!-- 查报价 -->
<view
class=
"quoted-price"
>
<view
class=
"quoted-price"
>
<NavbarRight
title=
"
电子名片
"
imageWidth=
"20"
/>
<NavbarRight
title=
"
查报价
"
imageWidth=
"20"
/>
<
!--
<select-view></select-view>
--
>
<
select-view
></select-view
>
<quoted-price-tips></quoted-price-tips>
<quoted-price-tips></quoted-price-tips>
<quoted-price-step></quoted-price-step>
<quoted-price-step></quoted-price-step>
<view
class=
"quoted-price-brand"
>
<view
class=
"quoted-price-brand"
>
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
NavbarRight
from
'@/components/navbar-right'
;
import
NavbarRight
from
'@/components/navbar-right'
;
import
QuotedPriceTips
from
'./components/quoted-price-tips.vue'
;
import
QuotedPriceTips
from
'./components/quoted-price-tips.vue'
;
import
QuotedPriceStep
from
'./components/quoted-price-step.vue'
;
import
QuotedPriceStep
from
'./components/quoted-price-step.vue'
;
import
SelectView
from
'./components/select-view.vue'
;
import
SelectView
from
'./components/select-view.vue'
;
...
...
pages/bill/quoted-price/select-price/select-price.vue
View file @
bbcf8e16
...
@@ -4,13 +4,11 @@
...
@@ -4,13 +4,11 @@
<block
v-else
>
<block
v-else
>
<view
class=
"item"
v-for=
"(item, index) in list"
:key=
"item.id"
@
click=
"clickCell(item)"
>
<view
class=
"item"
v-for=
"(item, index) in list"
:key=
"item.id"
@
click=
"clickCell(item)"
>
<view
class=
"item-left"
>
<view
class=
"item-left"
>
<view
class=
"item-left-icon"
>
<view
class=
"item-left-icon"
:class=
"
{ 'item-left-default': item.systemFlag }">
{{
item
.
systemFlag
?
'默认'
:
'自建'
}}
</view
>
默认
<view
class=
"item-left-label"
>
{{
item
.
templateName
}}
</view>
</view>
</view>
<text>
家电维安
</text>
<view
class=
"item-right"
v-if=
"!item.systemFlag"
@
click
.
stop=
"toEdit(item)"
>
</view>
<view
class=
"item-right-icon"
><u-icon
name=
"edit-pen"
></u-icon></view>
<view
class=
"item-right"
>
<u-icon
name=
"edit-pen"
></u-icon>
</view>
</view>
</view>
</view>
</block>
</block>
...
@@ -25,7 +23,7 @@ import NoData from '@/components/no-data';
...
@@ -25,7 +23,7 @@ import NoData from '@/components/no-data';
import
PopInput
from
'@/components/pop-input-view'
;
import
PopInput
from
'@/components/pop-input-view'
;
import
SubmitButton
from
'@/components/submit-button/index.vue'
;
import
SubmitButton
from
'@/components/submit-button/index.vue'
;
import
{
billBaseUrl
}
from
'@/utils/config.js'
;
import
{
billBaseUrl
}
from
'@/utils/config.js'
;
import
{
get
List
,
deleteById
,
enable
,
close
}
from
'@/api/mine/timed
.js'
;
import
{
get
OfferTemplate
}
from
'@/api/bill/quoted-price
.js'
;
export
default
{
export
default
{
components
:
{
components
:
{
NoData
,
NoData
,
...
@@ -41,9 +39,15 @@ export default {
...
@@ -41,9 +39,15 @@ export default {
noDataText
:
'当前暂无内容'
,
noDataText
:
'当前暂无内容'
,
noDataImage
:
'bill/wuzhangdanneirong@3x.png'
,
noDataImage
:
'bill/wuzhangdanneirong@3x.png'
,
list
:
[],
list
:
[],
id
:
null
,
};
};
},
},
onReady
()
{
onLoad
(
options
)
{
if
(
options
){
this
.
id
=
options
.
id
||
null
}
},
onShow
()
{
this
.
getList
();
this
.
getList
();
},
},
computed
:
{
computed
:
{
...
@@ -51,25 +55,13 @@ export default {
...
@@ -51,25 +55,13 @@ export default {
return
(
this
.
list
||
[]).
length
==
0
&&
this
.
loaded
;
return
(
this
.
list
||
[]).
length
==
0
&&
this
.
loaded
;
}
}
},
},
onUnload
()
{
onUnload
()
{},
uni
.
$off
(
"timed-sure-delete"
);
},
methods
:
{
methods
:
{
async
getList
()
{
async
getList
()
{
this
.
loaded
=
false
;
this
.
loaded
=
false
;
try
{
try
{
let
params
=
{
let
{
data
}
=
await
getOfferTemplate
();
current
:
1
,
this
.
list
=
data
||
[];
size
:
99999
};
let
{
data
}
=
await
getList
(
params
);
data
.
records
.
forEach
(
item
=>
{
item
.
label
=
item
.
classification
.
name
;
item
.
icon
=
item
.
classification
.
recordSelectedIcon
;
item
.
show
=
false
;
item
.
loading
=
false
;
});
this
.
list
=
data
.
records
||
[];
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
//TODO handle the exception
//TODO handle the exception
...
@@ -78,38 +70,50 @@ export default {
...
@@ -78,38 +70,50 @@ export default {
},
},
add
()
{
add
()
{
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'/pages/bill/quoted-price/create/create'
,
url
:
'/pages/bill/quoted-price/create/create'
});
});
// uni.$once(`input-sure-create-price`, res => {
// this.$emit('update', {
// value: 'create-price',
// content: res.content
// });
// });
},
},
toEdit
(
i
d
=
''
)
{
toEdit
(
i
tem
)
{
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'/pages/bill/quoted-price/create/
create
'
,
url
:
'/pages/bill/quoted-price/create/
edit
'
,
params
:
{
params
:
{
id
:
id
id
:
i
tem
.
i
d
}
}
});
});
uni
.
$once
(
`refreshList`
,
res
=>
{
this
.
getList
();
});
// if(id){
// uni.$once(`timed-sure-delete`, res => {
// this.list.map(el => {
// if (el.id === res.id) {
// this.beforeDelete(el);
// }
// });
// });
// }
},
},
clickCell
(
item
)
{
clickCell
(
item
)
{
let
pages
=
getCurrentPages
();
let
prePage
=
pages
[
pages
.
length
-
2
]
console
.
log
(
pages
)
let
path
=
""
if
(
item
.
systemFlag
)
{
if
(
prePage
.
route
===
'pages/bill/quoted-price/quoted-price'
){
this
.
$u
.
route
({
type
:
'back'
});
}
else
{
path
=
'pages/bill/quoted-price/quoted-price'
}
}
else
{
if
(
this
.
id
===
item
.
id
){
this
.
$u
.
route
({
type
:
'back'
});
}
else
{
path
=
'pages/bill/quoted-price/custom/custom'
}
}
if
(
path
){
this
.
$u
.
route
({
url
:
path
,
params
:
{
id
:
item
.
id
}
});
}
},
},
beforeDelete
(
item
)
{
beforeDelete
(
item
)
{
this
.
readyDeleteItem
=
item
;
this
.
readyDeleteItem
=
item
;
this
.
showConfirm
=
true
;
this
.
showConfirm
=
true
;
...
@@ -117,8 +121,7 @@ export default {
...
@@ -117,8 +121,7 @@ export default {
handleConfirm
()
{
handleConfirm
()
{
this
.
onDelete
();
this
.
onDelete
();
},
},
handleCancel
()
{
handleCancel
()
{},
},
async
onDelete
()
{
async
onDelete
()
{
try
{
try
{
let
params
=
{
let
params
=
{
...
@@ -130,8 +133,7 @@ export default {
...
@@ -130,8 +133,7 @@ export default {
console
.
log
(
e
);
console
.
log
(
e
);
//TODO handle the exception
//TODO handle the exception
}
}
},
}
}
}
};
};
</
script
>
</
script
>
...
@@ -142,6 +144,54 @@ export default {
...
@@ -142,6 +144,54 @@ export default {
padding
:
32rpx
24rpx
;
padding
:
32rpx
24rpx
;
padding-bottom
:
144rpx
;
padding-bottom
:
144rpx
;
min-height
:
100%
;
min-height
:
100%
;
.item
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
background-color
:
#ffffff
;
border-radius
:
16rpx
;
padding
:
24rpx
24rpx
;
margin-top
:
24rpx
;
&
-left
{
font-size
:
32rpx
;
font-weight
:
bold
;
display
:
flex
;
align-items
:
center
;
&
-icon
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin-right
:
32rpx
;
color
:
$default-color
;
width
:
80rpx
;
height
:
44rpx
;
border-radius
:
12rpx
;
font-size
:
24rpx
;
border
:
2rpx
solid
$default-color
;
}
&
-default
{
background
:
$default-color
;
color
:
#ffffff
;
}
}
&
-right
{
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-end
;
width
:
60rpx
;
height
:
60rpx
;
background-color
:
#fc524d
;
&
-price
{
font-size
:
28rpx
;
font-weight
:
bold
;
color
:
#fc524d
;
}
&
-icon
{
margin-left
:
32rpx
;
color
:
#cccccc
;
}
}
}
}
}
</
style
>
</
style
>
pages/maintain-bill/components/show-voucher.vue
View file @
bbcf8e16
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<view
class=
"voucher"
>
<view
class=
"voucher"
>
<view
class=
"voucher-title"
>
<view
class=
"voucher-title"
>
<view
class=
"voucher-title-text"
>
<view
class=
"voucher-title-text"
>
<text>
{{
stopInfo
.
n
ame
}}
</text>
<text>
{{
detail
.
repairShopN
ame
}}
</text>
<view
class=
"voucher-title-text-underline"
></view>
<view
class=
"voucher-title-text-underline"
></view>
</view>
</view>
</view>
</view>
...
@@ -60,8 +60,7 @@
...
@@ -60,8 +60,7 @@
</view>
</view>
<view
class=
"voucher-head-item-value"
>
<view
class=
"voucher-head-item-value"
>
<text>
{{
item
.
currencySign
||
''
}}
</text>
<text>
{{
item
.
currencySign
||
''
}}
</text>
<text
v-if=
"item.value === 'stopInfo'"
>
{{
stopInfo
[
item
.
childrenValue
]
||
''
}}
</text>
<text
v-if=
"item.value === 'arearAmount'"
>
{{
arearAmount
}}
</text>
<text
v-else-if=
"item.value === 'arearAmount'"
>
{{
arearAmount
}}
</text>
<text
v-else
>
{{
detail
[
item
.
value
]
||
''
}}
</text>
<text
v-else
>
{{
detail
[
item
.
value
]
||
''
}}
</text>
</view>
</view>
</view>
</view>
...
@@ -88,10 +87,6 @@ export default {
...
@@ -88,10 +87,6 @@ export default {
};
};
}
}
},
},
stopInfo
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -460,7 +455,7 @@ export default {
...
@@ -460,7 +455,7 @@ export default {
];
];
// 表格底部
// 表格底部
let
footerView
=
this
.
voucherFooterOptions
.
map
((
item
,
index
)
=>
{
let
footerView
=
this
.
voucherFooterOptions
.
map
((
item
,
index
)
=>
{
let
text
=
item
.
value
===
'
stopInfo'
?
this
.
stopInfo
[
item
.
childrenValue
]
:
item
.
value
===
'
arearAmount'
?
this
.
arearAmount
:
this
.
detail
[
item
.
value
];
let
text
=
item
.
value
===
'arearAmount'
?
this
.
arearAmount
:
this
.
detail
[
item
.
value
];
let
view
=
{
let
view
=
{
type
:
'view'
,
type
:
'view'
,
css
:
{
css
:
{
...
@@ -495,10 +490,6 @@ export default {
...
@@ -495,10 +490,6 @@ export default {
}
}
]
]
};
};
//
<
text
>
{{
item
.
currencySign
||
""
}}
<
/text
>
//
<
text
v
-
if
=
"item.value === 'stopInfo'"
>
{{
stopInfo
[
item
.
childrenValue
]
||
''
}}
<
/text
>
//
<
text
v
-
else
-
if
=
"item.value==='arearAmount'"
>
{{
arearAmount
}}
<
/text
>
//
<
text
v
-
else
>
{{
detail
[
item
.
value
]
||
''
}}
<
/text
>
if
(
index
===
this
.
voucherFooterOptions
.
length
-
1
)
{
if
(
index
===
this
.
voucherFooterOptions
.
length
-
1
)
{
view
.
css
.
width
=
'75%'
;
view
.
css
.
width
=
'75%'
;
}
}
...
@@ -540,7 +531,7 @@ export default {
...
@@ -540,7 +531,7 @@ export default {
color
:
orangeColor
,
color
:
orangeColor
,
'line-height'
:
'26px'
'line-height'
:
'26px'
},
},
text
:
this
.
stopInfo
.
n
ame
text
:
this
.
detail
.
repairShopN
ame
},
},
{
{
type
:
'text'
,
type
:
'text'
,
...
@@ -555,7 +546,7 @@ export default {
...
@@ -555,7 +546,7 @@ export default {
'border-bottom'
:
orangeBorderCss
,
'border-bottom'
:
orangeBorderCss
,
color
:
'rgba(255,255,255,0)'
color
:
'rgba(255,255,255,0)'
},
},
text
:
this
.
stopInfo
.
n
ame
text
:
this
.
detail
.
repairShopN
ame
}
}
]
]
}
}
...
...
pages/maintain-bill/create.vue
View file @
bbcf8e16
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
<view
class=
"item-view"
>
<view
class=
"item-view"
>
<view
class=
"lable-view"
>
服务时间
</view>
<view
class=
"lable-view"
>
服务时间
</view>
<view
class=
"right-view"
>
<view
class=
"right-view"
>
<DateRangePicker
type=
"date"
:clear-icon=
"false"
v-
show=
"showDatePicker"
v-
model=
"form.repairTime"
>
<DateRangePicker
type=
"date"
:clear-icon=
"false"
v-model=
"form.repairTime"
>
<view
class=
"date-view"
hover-class=
"u-hover-class"
>
<view
class=
"date-view"
hover-class=
"u-hover-class"
>
<view
class=
"date-text"
v-if=
"repairTime.dayTime"
>
{{
repairTime
.
dayTime
}}
</view>
<view
class=
"date-text"
v-if=
"repairTime.dayTime"
>
{{
repairTime
.
dayTime
}}
</view>
<view
class=
"placeholder-text"
v-else
>
选择服务日期
</view>
<view
class=
"placeholder-text"
v-else
>
选择服务日期
</view>
...
...
pages/maintain-bill/show.vue
View file @
bbcf8e16
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<view
class=
"top-view"
></view>
<view
class=
"top-view"
></view>
<view
class=
"content-view"
>
<view
class=
"content-view"
>
<scroll-view
scroll-y=
"true"
style=
"height:100%"
>
<scroll-view
scroll-y=
"true"
style=
"height:100%"
>
<view
class=
"scroll-view"
v-if=
"info.type === 'voucher'"
><show-voucher
ref=
"show-voucher"
:detail=
"info"
:stopInfo=
"stopInfo"
@
save=
"savePoster"
@
preview=
"previewPoster"
></show-voucher></view>
<view
class=
"scroll-view"
v-if=
"info.type === 'voucher'"
><show-voucher
ref=
"show-voucher"
:detail=
"info"
@
save=
"savePoster"
@
preview=
"previewPoster"
></show-voucher></view>
<view
class=
"scroll-view>"
v-else
>
<view
class=
"scroll-view>"
v-else
>
<view
class=
"info-view part-view"
>
<view
class=
"info-view part-view"
>
<view
class=
"title-view"
>
账单信息
</view>
<view
class=
"title-view"
>
账单信息
</view>
...
@@ -188,7 +188,6 @@ import { maintain_share_url, wxMiniId, webUrl } from '@/utils/config.js';
...
@@ -188,7 +188,6 @@ import { maintain_share_url, wxMiniId, webUrl } from '@/utils/config.js';
import
{
getSetting
}
from
'@/utils/common.js'
;
import
{
getSetting
}
from
'@/utils/common.js'
;
import
{
checkToken
}
from
'@/utils/common.js'
;
import
{
checkToken
}
from
'@/utils/common.js'
;
import
{
tableOptions
}
from
'@/utils/options/maintain-bill/index.js'
;
import
{
tableOptions
}
from
'@/utils/options/maintain-bill/index.js'
;
import
{
getShopInfo
}
from
"@/api/mine/shop.js"
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -215,7 +214,6 @@ export default {
...
@@ -215,7 +214,6 @@ export default {
previewImageUrl
:
''
,
previewImageUrl
:
''
,
customerId
:
''
,
customerId
:
''
,
canvasType
:
'save'
,
canvasType
:
'save'
,
stopInfo
:{},
};
};
},
},
computed
:
{
computed
:
{
...
@@ -393,7 +391,6 @@ export default {
...
@@ -393,7 +391,6 @@ export default {
// this.billId = '1554382675614105600'
// this.billId = '1554382675614105600'
if
(
checkToken
())
{
if
(
checkToken
())
{
this
.
repairDetail
();
this
.
repairDetail
();
this
.
getShop
()
}
else
{
}
else
{
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/login/login'
,
url
:
'pages/login/login'
,
...
@@ -454,15 +451,6 @@ export default {
...
@@ -454,15 +451,6 @@ export default {
this
.
loading
=
false
;
this
.
loading
=
false
;
});
});
},
},
async
getShop
(){
try
{
let
res
=
await
getShopInfo
()
this
.
stopInfo
=
res
.
data
}
catch
(
e
){
//TODO handle the exception
console
.
log
(
e
)
}
},
updateItem
(
id
,
state
)
{
updateItem
(
id
,
state
)
{
for
(
var
item
of
this
.
lists
)
{
for
(
var
item
of
this
.
lists
)
{
if
(
item
.
id
==
id
)
{
if
(
item
.
id
==
id
)
{
...
...
pages/mine/global-input/global-input.vue
0 → 100644
View file @
bbcf8e16
<
template
>
<view
class=
"input-view"
>
<NavbarNormal
:title=
"info.title"
titleColor=
"#191C27"
:border-bottom=
"false"
title-bold
></NavbarNormal>
<view
class=
"content-view"
>
<u-input
v-model=
"value"
:type=
"info.type"
:height=
"info.height"
:placeholder=
"info.placeholder"
:placeholder-style=
"placeholderStyle"
focus
:border=
"false"
:custom-style=
"inputStyle"
:disabled=
"disabled"
:clearable=
"false"
@
input=
"handleInput"
/>
<view
v-if=
"!disabled"
class=
"tip-view"
>
{{
tipText
}}
</view>
<bottom-buttons
cancelText=
'删除'
:showCancel=
"id?true:false"
@
cancel=
"handleDelete"
@
confirm=
"handleClick"
></bottom-buttons>
</view>
<PopNormal
title=
"操作提醒"
:visible
.
sync=
"visible"
@
confirm=
"handleClickConfirm"
cancelText=
"取消"
confirmText=
"确认"
:content=
"info.deleteText"
/>
</view>
</
template
>
<
script
>
import
PopNormal
from
'@/components/pop-normal'
;
import
NavbarNormal
from
'@/components/navbar-normal'
;
import
BottomButtons
from
'@/components/common/bottom-buttons.vue'
;
import
{
deleteTemplate
,
deleteClassification
}
from
"@/api/bill/quoted-price.js"
export
default
{
components
:
{
PopNormal
,
NavbarNormal
,
BottomButtons
},
data
()
{
return
{
visible
:
false
,
value
:
''
,
type
:
''
,
deleteType
:
''
,
disabled
:
false
,
deleteStyle
:
{
marginTop
:
'24rpx'
,
'background-color'
:
'#FFFFFF'
,
height
:
'104rpx'
,
'border-radius'
:
'16rpx'
},
id
:
null
,
whiteSpace
:
false
,
inputStyle
:
{
'border-radius'
:
'8rpx'
,
'background-color'
:
'#F6F7FA'
,
padding
:
'24rpx'
,
'font-size'
:
'28rpx'
,
color
:
'#333333'
}
};
},
computed
:
{
baseUrl
()
{
return
process
.
uniEnv
.
qn_base_url
;
},
buttonStyle
()
{
return
{
color
:
'transparent'
,
'background-color'
:
'#02A074'
,
height
:
'104rpx'
,
'border-radius'
:
'16rpx'
};
},
placeholderStyle
()
{
return
'color: #cccccc;font-size: 28rpx;font-weight: bold;'
;
},
tipText
()
{
return
`
${
this
.
value
.
length
||
0
}
/
${
this
.
info
.
maxlength
}
`
;
},
info
()
{
switch
(
this
.
type
)
{
case
'name'
:
default
:
return
{
title
:
'店铺名称'
,
type
:
'textarea'
,
placeholder
:
'请输入店铺名称(15个字以内)'
,
maxlength
:
15
,
height
:
240
};
case
'address'
:
return
{
title
:
'店铺地址'
,
type
:
'textarea'
,
placeholder
:
'请输入店铺地址(30个字以内)'
,
maxlength
:
30
,
height
:
240
};
case
'phone'
:
return
{
title
:
'联系电话'
,
type
:
'textarea'
,
placeholder
:
'请输入联系电话'
,
maxlength
:
20
,
height
:
240
};
case
'lister'
:
return
{
title
:
'制表人'
,
type
:
'textarea'
,
placeholder
:
'请输入制表人'
,
maxlength
:
10
,
height
:
240
};
case
'payments-setting'
:
return
{
title
:
'类型名称'
,
type
:
'textarea'
,
placeholder
:
'请输入类型名称(4个字以内)'
,
maxlength
:
4
,
height
:
240
,
deleteText
:
'确认删除该类型吗?'
,
};
case
'user-nickname'
:
return
{
title
:
'用户昵称'
,
type
:
'textarea'
,
placeholder
:
'请输入用户昵称(10个字以内)'
,
maxlength
:
10
,
height
:
240
};
case
'create-remark'
:
return
{
title
:
'备注模板'
,
type
:
'textarea'
,
placeholder
:
'请输入备注模板(200个字以内)'
,
maxlength
:
100
,
height
:
240
,
deleteText
:
'确认删除该类型吗?'
,
};
case
'custom-price'
:
return
{
title
:
'报价名称'
,
type
:
'textarea'
,
placeholder
:
'请输入报价名称(10个字以内)'
,
maxlength
:
10
,
height
:
240
,
};
case
'update-offer-classification'
:
return
{
title
:
'服务分类'
,
type
:
'textarea'
,
placeholder
:
'请输入服务分类(10个字以内)'
,
maxlength
:
10
,
height
:
240
,
deleteText
:
'确认删除该分类吗?'
,
deleteFunction
:
deleteClassification
};
}
}
},
onLoad
(
options
)
{
if
(
options
&&
options
.
type
)
{
this
.
type
=
options
.
type
;
}
if
(
options
&&
options
.
deleteType
)
{
this
.
deleteType
=
options
.
deleteType
;
}
if
(
options
&&
options
.
value
&&
options
.
value
!=
'null'
)
{
this
.
value
=
decodeURIComponent
(
decodeURIComponent
(
options
.
value
));
}
if
(
options
&&
options
.
disabled
)
{
this
.
disabled
=
options
.
disabled
;
}
if
(
options
&&
options
.
id
)
{
this
.
id
=
options
.
id
;
}
if
(
options
&&
options
.
whiteSpace
)
{
this
.
whiteSpace
=
options
.
whiteSpace
;
this
.
inputStyle
.
whiteSpace
=
'pre-wrap'
}
},
onUnload
()
{
let
notification
=
`input-sure-
${
this
.
type
}
`
;
uni
.
$off
(
notification
);
},
methods
:
{
handleInput
(
event
)
{
// 直接给input设maxlength输入拼音的时候有影响
if
(
event
.
length
>
this
.
info
.
maxlength
)
{
this
.
$nextTick
(()
=>
{
this
.
value
=
event
.
substring
(
0
,
this
.
info
.
maxlength
);
});
}
},
handleClick
()
{
if
(
!
this
.
disabled
)
{
if
(
!
this
.
value
.
trim
())
{
this
.
$u
.
toast
(
'内容不能为空'
);
return
false
;
}
let
notification
=
`input-sure-
${
this
.
type
}
`
;
let
str
=
this
.
value
.
replace
(
/
[\r\n]
/g
,
''
);
uni
.
$emit
(
notification
,
{
content
:
str
});
}
this
.
$u
.
route
({
type
:
'back'
});
},
handleDelete
()
{
if
(
this
.
id
)
{
this
.
visible
=
true
}
},
async
handleClickConfirm
(){
if
(
this
.
id
)
{
try
{
let
res
=
await
this
.
info
.
deleteFunction
(
this
.
id
)
uni
.
$emit
(
this
.
deleteType
,
{});
this
.
$u
.
route
({
type
:
'back'
});
}
catch
(
e
){
console
.
log
(
e
)
//TODO handle the exception
}
}
}
}
};
</
script
>
<
style
scoped
lang=
"scss"
>
.input-view
{
display
:
flex
;
flex-direction
:
column
;
height
:
100vh
;
background-color
:
#ffffff
;
.content-view
{
height
:
100%
;
overflow
:
auto
;
padding
:
24rpx
32rpx
;
.tip-view
{
margin-top
:
20rpx
;
color
:
#333333
;
font-size
:
28rpx
;
text-align
:
right
;
}
}
.bottom-view
{
margin
:
24rpx
0
;
height
:
104rpx
;
.button-text
{
color
:
#ffffff
;
height
:
104rpx
;
line-height
:
104rpx
;
font-weight
:
bold
;
font-size
:
32rpx
;
}
.delete-button
{
text-align
:
center
;
color
:
#fc524d
;
}
}
}
</
style
>
pages/mine/input/input.vue
View file @
bbcf8e16
...
@@ -131,14 +131,6 @@ export default {
...
@@ -131,14 +131,6 @@ export default {
maxlength
:
100
,
maxlength
:
100
,
height
:
240
height
:
240
};
};
case
'camp-introduce'
:
return
{
title
:
'营地介绍'
,
type
:
'textarea'
,
placeholder
:
'简单介绍营地给粉丝提供的便利与服务(200个字以内)'
,
maxlength
:
200
,
height
:
240
};
case
'member-remark'
:
case
'member-remark'
:
return
{
return
{
title
:
'备注名'
,
title
:
'备注名'
,
...
@@ -147,22 +139,15 @@ export default {
...
@@ -147,22 +139,15 @@ export default {
maxlength
:
10
,
maxlength
:
10
,
height
:
240
height
:
240
};
};
case
'score'
:
case
'update-price-template-name'
:
return
{
title
:
'统计项名称'
,
type
:
'textarea'
,
placeholder
:
'请输入统计项名称(10个字以内)'
,
maxlength
:
10
,
height
:
240
};
case
'season-add'
:
return
{
return
{
title
:
'
赛季
名称'
,
title
:
'
报价
名称'
,
type
:
'textarea'
,
type
:
'textarea'
,
placeholder
:
'
请输入赛季
名称(10个字以内)'
,
placeholder
:
'
添加报价
名称(10个字以内)'
,
maxlength
:
10
,
maxlength
:
10
,
height
:
240
height
:
240
};
};
}
}
}
}
},
},
...
...
pages/schedule/create-schedule/create-schedule.vue
View file @
bbcf8e16
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
<u-input
type=
"text"
v-model=
"form.name"
placeholder=
"请输入计划标题"
:clearable=
"false"
input-align=
"right"
maxlength=
"100"
class=
"form-input"
/>
<u-input
type=
"text"
v-model=
"form.name"
placeholder=
"请输入计划标题"
:clearable=
"false"
input-align=
"right"
maxlength=
"100"
class=
"form-input"
/>
</u-form-item>
</u-form-item>
<u-form-item
label=
"计划纪要:"
prop=
"content"
:border-bottom=
"false"
>
<u-form-item
label=
"计划纪要:"
prop=
"content"
:border-bottom=
"false"
>
<u-input
v-model=
"form.content"
type=
"textarea"
:border=
"true"
:height=
"240"
:auto-height=
"false"
:clearable=
"false"
/>
<u-input
v-model=
"form.content"
type=
"textarea"
:border=
"true"
maxlength=
'200'
:height=
"240"
:auto-height=
"false"
:clearable=
"false"
/>
</u-form-item>
</u-form-item>
<u-form-item
prop=
"attach"
:border-bottom=
"false"
>
<u-form-item
prop=
"attach"
:border-bottom=
"false"
>
<sound-player
ref=
"sound-player"
:path=
"form.attach"
@
clear=
"clearSound"
v-if=
"form.attach"
></sound-player>
<sound-player
ref=
"sound-player"
:path=
"form.attach"
@
clear=
"clearSound"
v-if=
"form.attach"
></sound-player>
...
...
utils/config.js
View file @
bbcf8e16
export
const
version
=
"1.0.2
4
"
export
const
version
=
"1.0.2
5
"
export
const
baseURL
=
"/baseapi"
export
const
baseURL
=
"/baseapi"
export
const
token
=
"TOKEN"
export
const
token
=
"TOKEN"
export
const
PHONENUMBER
=
"PHONENUMBER"
export
const
PHONENUMBER
=
"PHONENUMBER"
...
...
utils/options/bill/quoted-price.js
View file @
bbcf8e16
...
@@ -58,13 +58,24 @@ export const serviceTypeOptions = [{
...
@@ -58,13 +58,24 @@ export const serviceTypeOptions = [{
export
const
createCategoryOptions
=
[{
export
const
createCategoryOptions
=
[{
value
:
"
1
"
,
value
:
"
classificationNumber
"
,
label
:
"服务分类"
,
label
:
"服务分类"
,
icon
:
billBaseUrl
+
"fuwufenleitubiao@3x.png"
icon
:
billBaseUrl
+
"fuwufenleitubiao@3x.png"
},
},
{
{
value
:
"
2
"
,
value
:
"
priceNumber
"
,
label
:
"服务价格"
,
label
:
"服务价格"
,
icon
:
billBaseUrl
+
"fuwujiagetubiao@3x.png"
icon
:
billBaseUrl
+
"fuwujiagetubiao@3x.png"
},
},
]
]
export
const
priceTypeOptions
=
[{
value
:
"unified"
,
label
:
"一口价"
},
{
value
:
"scope"
,
label
:
"范围价"
},
]
\ No newline at end of file
utils/options/maintain-bill/index.js
View file @
bbcf8e16
...
@@ -89,21 +89,19 @@ export const billCountOptions = [{
...
@@ -89,21 +89,19 @@ export const billCountOptions = [{
]
]
export
const
voucherHeadOptions
=
[{
export
const
voucherHeadOptions
=
[{
value
:
"number"
,
label
:
"单号"
,
},
{
value
:
"repairTime"
,
label
:
"时间"
,
},
{
value
:
"customer"
,
value
:
"customer"
,
childrenValue
:
'name'
,
childrenValue
:
'name'
,
label
:
"客户"
,
label
:
"客户"
,
},
},
{
{
value
:
"repairTime"
,
label
:
"时间"
,
},
{
value
:
"number"
,
label
:
"单号"
,
},
{
value
:
"customer"
,
value
:
"customer"
,
childrenValue
:
'phone'
,
childrenValue
:
'phone'
,
label
:
"电话"
,
label
:
"电话"
,
},
},
{
{
...
@@ -113,33 +111,30 @@ export const voucherHeadOptions = [{
...
@@ -113,33 +111,30 @@ export const voucherHeadOptions = [{
]
]
export
const
voucherFooterOptions
=
[{
export
const
voucherFooterOptions
=
[{
value
:
"stopInfo"
,
value
:
"lister"
,
childrenValue
:
'lister'
,
label
:
"制表人"
,
label
:
"制表人"
,
},
},
{
{
value
:
"receivableAmount"
,
value
:
"receivableAmount"
,
label
:
"应收金额"
,
label
:
"应收金额"
,
currencySign
:
'¥'
,
currencySign
:
'¥'
,
},
},
{
{
value
:
"actualAmount"
,
value
:
"actualAmount"
,
label
:
"实收金额"
,
label
:
"实收金额"
,
currencySign
:
'¥'
,
currencySign
:
'¥'
,
},
},
{
{
value
:
"arearAmount"
,
value
:
"arearAmount"
,
label
:
"欠款"
,
label
:
"欠款"
,
currencySign
:
'¥'
,
currencySign
:
'¥'
,
},
},
{
{
value
:
"stopInfo"
,
value
:
"phone"
,
childrenValue
:
'phone'
,
label
:
"电话"
,
label
:
"电话"
,
},
},
{
{
value
:
"stopInfo"
,
value
:
"shopAddress"
,
childrenValue
:
'address'
,
label
:
"地址"
,
label
:
"地址"
,
},
},
]
]
...
@@ -147,80 +142,80 @@ export const voucherFooterOptions = [{
...
@@ -147,80 +142,80 @@ export const voucherFooterOptions = [{
export
const
tableCellOptions
=
[{
export
const
tableCellOptions
=
[{
value
:
"index"
,
value
:
"index"
,
label
:
"序号"
,
label
:
"序号"
,
width
:
"44rpx"
,
width
:
"44rpx"
,
},
},
{
{
value
:
"name"
,
value
:
"name"
,
label
:
"商品/服务名称"
,
label
:
"商品/服务名称"
,
width
:
"154rpx"
,
width
:
"154rpx"
,
},
},
{
{
value
:
"unit"
,
value
:
"unit"
,
label
:
"单位"
,
label
:
"单位"
,
width
:
"60rpx"
,
width
:
"60rpx"
,
},
},
{
{
value
:
"number"
,
value
:
"number"
,
label
:
"数量"
,
label
:
"数量"
,
width
:
"60rpx"
,
width
:
"60rpx"
,
},
},
{
{
value
:
"unitPrice"
,
value
:
"unitPrice"
,
label
:
"单价"
,
label
:
"单价"
,
width
:
"100rpx"
,
width
:
"100rpx"
,
currencySign
:
'¥'
,
currencySign
:
'¥'
,
},
},
{
{
value
:
"total"
,
value
:
"total"
,
label
:
"金额"
,
label
:
"金额"
,
width
:
"100rpx"
,
width
:
"100rpx"
,
currencySign
:
'¥'
,
currencySign
:
'¥'
,
},
},
]
]
export
const
canvasTableCellOptions
=
[{
export
const
canvasTableCellOptions
=
[{
value
:
"index"
,
value
:
"index"
,
label
:
"序号"
,
label
:
"序号"
,
width
:
"24px"
,
width
:
"24px"
,
},
},
{
{
value
:
"name"
,
value
:
"name"
,
label
:
"商品/服务名称"
,
label
:
"商品/服务名称"
,
width
:
"71px"
,
width
:
"71px"
,
},
},
{
{
value
:
"unit"
,
value
:
"unit"
,
label
:
"单位"
,
label
:
"单位"
,
width
:
"32px"
,
width
:
"32px"
,
},
},
{
{
value
:
"number"
,
value
:
"number"
,
label
:
"数量"
,
label
:
"数量"
,
width
:
"32px"
,
width
:
"32px"
,
},
},
{
{
value
:
"unitPrice"
,
value
:
"unitPrice"
,
label
:
"单价"
,
label
:
"单价"
,
width
:
"51px"
,
width
:
"51px"
,
currencySign
:
'¥'
,
currencySign
:
'¥'
,
},
},
{
{
value
:
"total"
,
value
:
"total"
,
label
:
"金额"
,
label
:
"金额"
,
width
:
"51px"
,
width
:
"51px"
,
currencySign
:
'¥'
,
currencySign
:
'¥'
,
},
},
]
]
export
const
tableFooterOptions
=
[{
export
const
tableFooterOptions
=
[{
value
:
"upperCase"
,
value
:
"upperCase"
,
label
:
"大写金额:"
,
label
:
"大写金额:"
,
width
:
"70%"
,
width
:
"70%"
,
},
},
{
{
value
:
"lowerCase"
,
value
:
"lowerCase"
,
label
:
"(小写)"
,
label
:
"(小写)"
,
width
:
"30%"
,
width
:
"30%"
,
},
},
]
]
utils/request.js
View file @
bbcf8e16
...
@@ -173,9 +173,9 @@ function request({
...
@@ -173,9 +173,9 @@ function request({
// console.log(res)
// console.log(res)
store
.
dispatch
(
"LogOut"
)
store
.
dispatch
(
"LogOut"
)
reject
(
res
.
data
)
reject
(
res
.
data
)
//
uni.navigateTo({
uni
.
navigateTo
({
//
url: "/pages/login/login",
url
:
"/pages/login/login"
,
//
})
})
}
else
if
(
responseWhiteList
.
findIndex
(
item
=>
url
.
indexOf
(
item
)
!==
-
1
)
!==
-
}
else
if
(
responseWhiteList
.
findIndex
(
item
=>
url
.
indexOf
(
item
)
!==
-
1
)
!==
-
1
)
{
1
)
{
...
...
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