Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit be3b7e7f
authored
Jun 24, 2024
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v1.0.7' of
http://192.168.3.233:8090/glsx/gl_tape
into v1.0.7
2 parents
c57dd383
4aa7f548
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
117 additions
and
66 deletions
components/CarBrands.vue
mixin/click.js
pages/boutique/index.vue
pages/equity/index.vue
pages/equity/informationEntry.vue
components/CarBrands.vue
View file @
be3b7e7
...
...
@@ -113,15 +113,22 @@ export default {
let
{
clickFlga
}
=
this
if
(
clickFlga
)
return
this
.
clickFlga
=
true
if
(
!
auto
)
uni
.
showLoading
({
mask
:
true
})
this
.
selectItem
=
{
carBrand
:
e
.
brandName
,
carBrandId
:
e
.
brandId
,
carChildsBrandName
:
e
.
name
,
carChildsBrandId
:
e
.
id
}
const
carList
=
uni
.
getStorageSync
(
`
${
e
.
id
}
_
${
e
.
brandId
}
_carlist`
)
if
(
carList
)
{
this
.
carlist
=
carList
if
(
auto
&&
carList
.
length
)
this
.
handleSelect
(
carList
[
0
])
else
this
.
$refs
.
carBoxVisible
.
open
()
}
else
{
if
(
!
auto
)
uni
.
showLoading
({
mask
:
true
})
}
uni
.
$api
.
commonApi
.
getCarBrandsList
({
brandId
:
e
.
brandId
,
childBrandId
:
e
.
id
...
...
@@ -129,26 +136,23 @@ export default {
uni
.
hideLoading
()
this
.
carlist
=
res
uni
.
setStorageSync
(
`
${
e
.
id
}
_
${
e
.
brandId
}
_carlist`
,
res
)
if
(
auto
&&
res
.
length
)
this
.
handleSelect
(
res
[
0
])
else
this
.
$refs
.
carBoxVisible
.
open
()
if
(
!
carList
)
{
if
(
auto
&&
res
.
length
)
this
.
handleSelect
(
res
[
0
])
else
this
.
$refs
.
carBoxVisible
.
open
()
}
this
.
clickFlga
=
false
}).
catch
(
err
=>
{
this
.
clickFlga
=
false
uni
.
hideLoading
()
const
carList
=
uni
.
getStorageSync
(
`
${
e
.
id
}
_
${
e
.
brandId
}
_carlist`
)
if
(
carList
)
{
this
.
carlist
=
carList
if
(
auto
&&
carList
.
length
)
this
.
handleSelect
(
carList
[
0
])
else
this
.
$refs
.
carBoxVisible
.
open
()
}
})
},
handleSelect
(
item
)
{
const
customerInfo
=
this
.
$store
.
state
.
user
.
customerInfo
,
{
selectItem
}
=
this
customerInfo
.
carBrand
=
selectItem
.
carChildsBrandName
this
.
$store
.
dispatch
(
'setCustomerInfo'
,
customerInfo
)
this
.
$refs
.
carBoxVisible
.
close
();
this
.
$refs
.
carBoxVisible
?
.
close
();
this
.
$emit
(
'select'
,
{
...
item
,
...
selectItem
...
...
mixin/click.js
View file @
be3b7e7
...
...
@@ -51,15 +51,6 @@ export default {
// });
},
onShow
()
{
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
)
||
{};
if
(
!
userInfo
.
shopMerchantId
||
!
userInfo
.
shopMerchantName
)
{
uni
.
$storage
.
rm
(
"userInfo"
);
uni
.
$storage
.
rm
(
"sessionId"
);
uni
.
reLaunch
({
url
:
"/pages/common/login"
,
});
return
;
}
// console.log(utils.requestAndroidPermission());
},
methods
:
{
...
...
@@ -357,7 +348,7 @@ export default {
initTime
()
{
if
(
this
.
audioInfo
.
audioStatus
!=
"start"
)
return
;
this
.
timer
=
setInterval
(()
=>
{
console
.
log
(
this
.
times
);
//
console.log(this.times);
this
.
times
++
;
if
(
this
.
times
>=
this
.
timeout
)
{
this
.
$refs
.
tipBox
?.
open
();
...
...
pages/boutique/index.vue
View file @
be3b7e7
...
...
@@ -82,7 +82,16 @@ export default {
// 其他情况允许正常返回
return
false
;
},
mounted
()
{
onShow
()
{
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
)
if
(
!
userInfo
.
shopMerchantId
||
!
userInfo
.
shopMerchantName
)
{
uni
.
$storage
.
rm
(
"userInfo"
);
uni
.
$storage
.
rm
(
"sessionId"
);
uni
.
reLaunch
({
url
:
"/pages/common/login"
,
});
return
;
}
this
.
init
()
},
methods
:
{
...
...
pages/equity/index.vue
View file @
be3b7e7
...
...
@@ -82,6 +82,15 @@ export default {
return
false
;
},
onShow
()
{
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
)
if
(
!
userInfo
.
shopMerchantId
||
!
userInfo
.
shopMerchantName
)
{
uni
.
$storage
.
rm
(
"userInfo"
);
uni
.
$storage
.
rm
(
"sessionId"
);
uni
.
reLaunch
({
url
:
"/pages/common/login"
,
});
return
;
}
this
.
init
();
},
async
onReachBottom
()
{
...
...
@@ -114,12 +123,15 @@ export default {
this
.
$store
.
dispatch
(
"setCarBrandsList"
,
carBrandList
);
uni
.
$storage
.
set
(
'carBrandList'
,
carBrandList
)
if
(
carBrandList
.
length
)
{
let
[
defaultItem
]
=
carBrandList
uni
.
$api
.
commonApi
.
getCarBrandsList
({
brandId
:
defaultItem
.
brandId
,
childBrandId
:
defaultItem
.
id
}).
then
(
_res
=>
{
uni
.
setStorageSync
(
`
${
defaultItem
.
id
}
_
${
defaultItem
.
brandId
}
_carlist`
,
_res
)
carBrandList
.
map
(
async
item
=>
{
const
carList
=
uni
.
getStorageSync
(
`
${
item
.
id
}
_
${
item
.
brandId
}
_carlist`
)
if
(
!
carList
)
{
const
_res
=
await
uni
.
$api
.
commonApi
.
getCarBrandsList
({
brandId
:
item
.
brandId
,
childBrandId
:
item
.
id
})
if
(
_res
)
uni
.
setStorageSync
(
`
${
item
.
id
}
_
${
item
.
brandId
}
_carlist`
,
_res
)
}
})
}
...
...
@@ -212,6 +224,7 @@ export default {
clearHistory
()
{
this
.
$store
.
dispatch
(
"clearCustomerInfo"
);
this
.
$store
.
dispatch
(
"clearHistory"
);
this
.
$refs
.
home
.
setBooks
([])
},
openStep
()
{
this
.
$refs
.
home
.
finishRef
.
close
();
...
...
pages/equity/informationEntry.vue
View file @
be3b7e7
...
...
@@ -7,25 +7,30 @@
-->
<
template
>
<view
class=
"information-entry"
>
<view
class=
"information-tips"
>
建议同步采集凭证,若接待工作繁忙可在提单环节再进行补充。
</view
>
<view
class=
"information-tips"
>
建议同步采集凭证,若接待工作繁忙可在提单环节再进行补充。
</view>
<view
class=
"information-box"
>
<view
class=
"information-item"
v-for=
"(item, index) in infoList"
:key=
"item.title"
>
<view
class=
"upload-img"
v-if=
"item.imgUrl"
>
<view
class=
"upload-img"
v-if=
"item.imgUrl"
>
<image
class=
"img"
:src=
"item.imgUrl"
mode=
"aspectFill"
@
click=
"preview(index)"
/>
<view
class=
"upload-close"
@
click=
"close(index)"
><glsx-image
src=
"detail/icon-close.png"
mode=
"scaleToFill"
/></view>
<view
class=
"upload-close"
@
click=
"close(index)"
><glsx-image
src=
"detail/icon-close.png"
mode=
"scaleToFill"
/></view>
<!--
<uni-icons
class=
"upload-close"
type=
"clear"
...
...
@@ -33,13 +38,20 @@
@
click=
"close(index)"
></uni-icons>
-->
</view>
<view
v-else
class=
"icon"
@
tap=
"choose(index)"
>
<view
v-else
class=
"icon"
@
tap=
"choose(index)"
>
<view
class=
"icon-upload sprite-icon icon-icon-upload"
></view>
</view>
<view
class=
"information-title"
>
{{
item
.
title
}}
</view>
</view>
</view>
<view
class=
"information-done"
@
click=
"done()"
>
完成接待
</view>
<view
class=
"information-done"
@
click=
"done()"
>
完成接待
</view>
<!--
<uni-popup
ref=
"preview"
type=
"center"
border-radius=
"10px 10px 0 0"
>
<image
class=
"preview-img"
:src=
"previewImg"
mode=
"aspectFit"
/>
</uni-popup>
-->
...
...
@@ -51,7 +63,10 @@
cancelBtnText=
"否"
confirmBtnText=
"是"
></MessageBox>
<finish-step
ref=
"stepRef"
@
submit=
"submit"
/>
<finish-step
ref=
"stepRef"
@
submit=
"submit"
/>
<update-box
/>
</view>
</
template
>
...
...
@@ -79,31 +94,46 @@ import FinishStep from "@/components/FinishStep.vue";
export
default
{
components
:
{
FinishStep
},
mixins
:
[
myClick
],
data
()
{
data
()
{
return
{
infoList
:
INFO_LIST
,
infoList
:
JSON
.
parse
(
JSON
.
stringify
(
INFO_LIST
))
,
previewImg
:
""
,
isPreview
:
false
,
};
},
onLoad
(
options
)
{
onLoad
(
options
)
{
const
text
=
options
.
text
;
uni
.
setNavigationBarTitle
({
title
:
text
,
});
},
onBackPress
()
{
this
.
infoList
=
this
.
infoList
.
map
((
item
)
=>
{
if
(
item
.
imgUrl
)
{
delete
item
.
imgUrl
;
}
return
item
;
});
watch
:
{
watchBooksList
:
{
immediate
:
true
,
handler
(
newValue
)
{
console
.
log
(
newValue
,
'==='
)
if
(
newValue
.
length
)
this
.
infoList
=
newValue
else
this
.
infoList
=
JSON
.
parse
(
JSON
.
stringify
(
INFO_LIST
))
},
}
},
computed
:
{
watchBooksList
()
{
return
this
.
$store
.
state
.
audio
.
booksList
}
},
onBackPress
()
{
// this.infoList = this.infoList.map((item) => {
// if (item.imgUrl) {
// delete item.imgUrl;
// }
// return item;
// });
},
methods
:
{
...
mapMutations
(
"audio"
,
[
"setBooks"
]),
// 上传图
async
choose
(
index
)
{
async
choose
(
index
)
{
const
result
=
await
this
.
$permision
.
requestAndroidPermission
(
"android.permission.CAMERA"
);
...
...
@@ -118,11 +148,14 @@ export default {
count
:
1
,
success
:
async
(
res
)
=>
{
// await upload(res.tempFilePath)
this
.
$set
(
this
.
infoList
[
index
],
"imgUrl"
,
await
upload
(
res
.
tempFilePaths
[
0
])
);
let
url
=
await
upload
(
res
.
tempFilePaths
[
0
])
// this.$set(
// this.infoList[index],
// "imgUrl",
// url
// );
this
.
infoList
[
index
].
imgUrl
=
url
this
.
setBooks
(
utils
.
deepClone
(
this
.
infoList
))
},
fail
:
(
err
)
=>
{
console
.
log
(
err
);
...
...
@@ -130,18 +163,19 @@ export default {
});
},
// 删除图
close
(
index
)
{
this
.
$set
(
this
.
infoList
[
index
],
"imgUrl"
);
close
(
index
)
{
// this.$set(this.infoList[index], "imgUrl");
this
.
infoList
[
index
].
imgUrl
=
''
this
.
setBooks
(
utils
.
deepClone
(
this
.
infoList
))
},
// 完成接待按钮
done
()
{
done
()
{
this
.
$refs
.
stepRef
.
open
();
},
submit
()
{
submit
()
{
this
.
$refs
.
stepRef
.
close
();
this
.
setBooks
(
utils
.
deepClone
(
this
.
infoList
));
this
.
stopAudio
();
this
.
infoList
=
INFO_LIST
.
map
((
item
)
=>
delete
item
.
imgUrl
);
//
this.infoList = INFO_LIST.map((item) => delete item.imgUrl);
setTimeout
(()
=>
{
uni
.
reLaunch
({
url
:
"/pages/equity/index"
,
...
...
@@ -149,7 +183,7 @@ export default {
},
1500
);
},
// 预览图片
preview
(
index
)
{
preview
(
index
)
{
this
.
isPreview
=
true
;
this
.
previewImg
=
this
.
infoList
[
index
].
imgUrl
;
uni
.
previewImage
({
...
...
@@ -159,10 +193,10 @@ export default {
success
:
function
(
data
)
{
console
.
log
(
"选中了第"
+
(
data
.
tapIndex
+
1
)
+
"个按钮,第"
+
(
data
.
index
+
1
)
+
"张图片"
(
data
.
tapIndex
+
1
)
+
"个按钮,第"
+
(
data
.
index
+
1
)
+
"张图片"
);
},
fail
:
function
(
err
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment