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 254faa5c
authored
Jun 24, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 提交
1 parent
9e24a61b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
102 additions
and
57 deletions
components/CarBrands.vue
mixin/click.js
pages/boutique/index.vue
pages/equity/index.vue
pages/equity/informationEntry.vue
components/CarBrands.vue
View file @
254faa5
...
...
@@ -148,7 +148,7 @@ export default {
{
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 @
254faa5
...
...
@@ -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 @
254faa5
...
...
@@ -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 @
254faa5
...
...
@@ -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,13 +123,14 @@ export default {
this
.
$store
.
dispatch
(
"setCarBrandsList"
,
carBrandList
);
uni
.
$storage
.
set
(
'carBrandList'
,
carBrandList
)
if
(
carBrandList
.
length
)
{
let
[
defaultItem
]
=
carBrandList
uni
.
$api
.
commonApi
.
getCarBrandsList
({
brandId
:
defaultI
tem
.
brandId
,
childBrandId
:
defaultI
tem
.
id
}).
then
(
_res
=>
{
uni
.
setStorageSync
(
`
${
defaultItem
.
id
}
_
${
defaultI
tem
.
brandId
}
_carlist`
,
_res
)
carBrandList
.
map
(
async
item
=>
{
const
_res
=
await
uni
.
$api
.
commonApi
.
getCarBrandsList
({
brandId
:
i
tem
.
brandId
,
childBrandId
:
i
tem
.
id
})
uni
.
setStorageSync
(
`
${
item
.
id
}
_
${
i
tem
.
brandId
}
_carlist`
,
_res
)
})
// let [defaultItem] = carBrandList
}
})
...
...
@@ -138,8 +148,8 @@ export default {
async
getSoure
()
{
let
{
moduleList
,
toolList
}
=
await
uni
.
$api
.
systemApi
.
getMockData
(
true
);
await
moduleList
.
map
(
async
e
=>
{
if
(
e
.
receptionSourceDetailList
)
e
.
receptionSourceDetailList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
e
.
receptionSourceDetailList
,
'detailUrl'
)
if
(
e
.
carTypeList
)
e
.
carTypeList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
e
.
carTypeList
)
//
if (e.receptionSourceDetailList) e.receptionSourceDetailList = await uni.$api.systemApi.imgToBase64(e.receptionSourceDetailList, 'detailUrl')
//
if (e.carTypeList) e.carTypeList = await uni.$api.systemApi.imgToBase64(e.carTypeList)
})
this
.
moduleList
=
moduleList
this
.
toolList
=
toolList
...
...
@@ -212,6 +222,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 @
254faa5
...
...
@@ -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