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 {
...
@@ -148,7 +148,7 @@ export default {
{
selectItem
}
=
this
{
selectItem
}
=
this
customerInfo
.
carBrand
=
selectItem
.
carChildsBrandName
customerInfo
.
carBrand
=
selectItem
.
carChildsBrandName
this
.
$store
.
dispatch
(
'setCustomerInfo'
,
customerInfo
)
this
.
$store
.
dispatch
(
'setCustomerInfo'
,
customerInfo
)
this
.
$refs
.
carBoxVisible
.
close
();
this
.
$refs
.
carBoxVisible
?
.
close
();
this
.
$emit
(
'select'
,
{
this
.
$emit
(
'select'
,
{
...
item
,
...
item
,
...
selectItem
...
selectItem
...
...
mixin/click.js
View file @
254faa5
...
@@ -51,15 +51,6 @@ export default {
...
@@ -51,15 +51,6 @@ export default {
// });
// });
},
},
onShow
()
{
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());
// console.log(utils.requestAndroidPermission());
},
},
methods
:
{
methods
:
{
...
@@ -357,7 +348,7 @@ export default {
...
@@ -357,7 +348,7 @@ export default {
initTime
()
{
initTime
()
{
if
(
this
.
audioInfo
.
audioStatus
!=
"start"
)
return
;
if
(
this
.
audioInfo
.
audioStatus
!=
"start"
)
return
;
this
.
timer
=
setInterval
(()
=>
{
this
.
timer
=
setInterval
(()
=>
{
console
.
log
(
this
.
times
);
//
console.log(this.times);
this
.
times
++
;
this
.
times
++
;
if
(
this
.
times
>=
this
.
timeout
)
{
if
(
this
.
times
>=
this
.
timeout
)
{
this
.
$refs
.
tipBox
?.
open
();
this
.
$refs
.
tipBox
?.
open
();
...
...
pages/boutique/index.vue
View file @
254faa5
...
@@ -82,7 +82,16 @@ export default {
...
@@ -82,7 +82,16 @@ export default {
// 其他情况允许正常返回
// 其他情况允许正常返回
return
false
;
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
()
this
.
init
()
},
},
methods
:
{
methods
:
{
...
...
pages/equity/index.vue
View file @
254faa5
...
@@ -82,6 +82,15 @@ export default {
...
@@ -82,6 +82,15 @@ export default {
return
false
;
return
false
;
},
},
onShow
()
{
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
();
this
.
init
();
},
},
async
onReachBottom
()
{
async
onReachBottom
()
{
...
@@ -114,13 +123,14 @@ export default {
...
@@ -114,13 +123,14 @@ export default {
this
.
$store
.
dispatch
(
"setCarBrandsList"
,
carBrandList
);
this
.
$store
.
dispatch
(
"setCarBrandsList"
,
carBrandList
);
uni
.
$storage
.
set
(
'carBrandList'
,
carBrandList
)
uni
.
$storage
.
set
(
'carBrandList'
,
carBrandList
)
if
(
carBrandList
.
length
)
{
if
(
carBrandList
.
length
)
{
let
[
defaultItem
]
=
carBrandList
carBrandList
.
map
(
async
item
=>
{
uni
.
$api
.
commonApi
.
getCarBrandsList
({
const
_res
=
await
uni
.
$api
.
commonApi
.
getCarBrandsList
({
brandId
:
defaultI
tem
.
brandId
,
brandId
:
i
tem
.
brandId
,
childBrandId
:
defaultI
tem
.
id
childBrandId
:
i
tem
.
id
}).
then
(
_res
=>
{
})
uni
.
setStorageSync
(
`
${
defaultItem
.
id
}
_
${
defaultI
tem
.
brandId
}
_carlist`
,
_res
)
uni
.
setStorageSync
(
`
${
item
.
id
}
_
${
i
tem
.
brandId
}
_carlist`
,
_res
)
})
})
// let [defaultItem] = carBrandList
}
}
})
})
...
@@ -138,8 +148,8 @@ export default {
...
@@ -138,8 +148,8 @@ export default {
async
getSoure
()
{
async
getSoure
()
{
let
{
moduleList
,
toolList
}
=
await
uni
.
$api
.
systemApi
.
getMockData
(
true
);
let
{
moduleList
,
toolList
}
=
await
uni
.
$api
.
systemApi
.
getMockData
(
true
);
await
moduleList
.
map
(
async
e
=>
{
await
moduleList
.
map
(
async
e
=>
{
if
(
e
.
receptionSourceDetailList
)
e
.
receptionSourceDetailList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
e
.
receptionSourceDetailList
,
'detailUrl'
)
//
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.carTypeList) e.carTypeList = await uni.$api.systemApi.imgToBase64(e.carTypeList)
})
})
this
.
moduleList
=
moduleList
this
.
moduleList
=
moduleList
this
.
toolList
=
toolList
this
.
toolList
=
toolList
...
@@ -212,6 +222,7 @@ export default {
...
@@ -212,6 +222,7 @@ export default {
clearHistory
()
{
clearHistory
()
{
this
.
$store
.
dispatch
(
"clearCustomerInfo"
);
this
.
$store
.
dispatch
(
"clearCustomerInfo"
);
this
.
$store
.
dispatch
(
"clearHistory"
);
this
.
$store
.
dispatch
(
"clearHistory"
);
this
.
$refs
.
home
.
setBooks
([])
},
},
openStep
()
{
openStep
()
{
this
.
$refs
.
home
.
finishRef
.
close
();
this
.
$refs
.
home
.
finishRef
.
close
();
...
...
pages/equity/informationEntry.vue
View file @
254faa5
...
@@ -7,25 +7,30 @@
...
@@ -7,25 +7,30 @@
-->
-->
<
template
>
<
template
>
<view
class=
"information-entry"
>
<view
class=
"information-entry"
>
<view
class=
"information-tips"
<view
class=
"information-tips"
>
建议同步采集凭证,若接待工作繁忙可在提单环节再进行补充。
</view>
>
建议同步采集凭证,若接待工作繁忙可在提单环节再进行补充。
</view
>
<view
class=
"information-box"
>
<view
class=
"information-box"
>
<view
<view
class=
"information-item"
class=
"information-item"
v-for=
"(item, index) in infoList"
v-for=
"(item, index) in infoList"
:key=
"item.title"
:key=
"item.title"
>
>
<view
class=
"upload-img"
v-if=
"item.imgUrl"
>
<view
class=
"upload-img"
v-if=
"item.imgUrl"
>
<image
<image
class=
"img"
class=
"img"
:src=
"item.imgUrl"
:src=
"item.imgUrl"
mode=
"aspectFill"
mode=
"aspectFill"
@
click=
"preview(index)"
@
click=
"preview(index)"
/>
/>
<view
class=
"upload-close"
@
click=
"close(index)"
<view
><glsx-image
src=
"detail/icon-close.png"
mode=
"scaleToFill"
class=
"upload-close"
/></view>
@
click=
"close(index)"
><glsx-image
src=
"detail/icon-close.png"
mode=
"scaleToFill"
/></view>
<!--
<uni-icons
<!--
<uni-icons
class=
"upload-close"
class=
"upload-close"
type=
"clear"
type=
"clear"
...
@@ -33,13 +38,20 @@
...
@@ -33,13 +38,20 @@
@
click=
"close(index)"
@
click=
"close(index)"
></uni-icons>
-->
></uni-icons>
-->
</view>
</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
class=
"icon-upload sprite-icon icon-icon-upload"
></view>
</view>
</view>
<view
class=
"information-title"
>
{{
item
.
title
}}
</view>
<view
class=
"information-title"
>
{{
item
.
title
}}
</view>
</view>
</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"
>
<!--
<uni-popup
ref=
"preview"
type=
"center"
border-radius=
"10px 10px 0 0"
>
<image
class=
"preview-img"
:src=
"previewImg"
mode=
"aspectFit"
/>
<image
class=
"preview-img"
:src=
"previewImg"
mode=
"aspectFit"
/>
</uni-popup>
-->
</uni-popup>
-->
...
@@ -51,7 +63,10 @@
...
@@ -51,7 +63,10 @@
cancelBtnText=
"否"
cancelBtnText=
"否"
confirmBtnText=
"是"
confirmBtnText=
"是"
></MessageBox>
></MessageBox>
<finish-step
ref=
"stepRef"
@
submit=
"submit"
/>
<finish-step
ref=
"stepRef"
@
submit=
"submit"
/>
<update-box
/>
<update-box
/>
</view>
</view>
</
template
>
</
template
>
...
@@ -79,31 +94,46 @@ import FinishStep from "@/components/FinishStep.vue";
...
@@ -79,31 +94,46 @@ import FinishStep from "@/components/FinishStep.vue";
export
default
{
export
default
{
components
:
{
FinishStep
},
components
:
{
FinishStep
},
mixins
:
[
myClick
],
mixins
:
[
myClick
],
data
()
{
data
()
{
return
{
return
{
infoList
:
INFO_LIST
,
infoList
:
JSON
.
parse
(
JSON
.
stringify
(
INFO_LIST
))
,
previewImg
:
""
,
previewImg
:
""
,
isPreview
:
false
,
isPreview
:
false
,
};
};
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
const
text
=
options
.
text
;
const
text
=
options
.
text
;
uni
.
setNavigationBarTitle
({
uni
.
setNavigationBarTitle
({
title
:
text
,
title
:
text
,
});
});
},
},
onBackPress
()
{
watch
:
{
this
.
infoList
=
this
.
infoList
.
map
((
item
)
=>
{
watchBooksList
:
{
if
(
item
.
imgUrl
)
{
immediate
:
true
,
delete
item
.
imgUrl
;
handler
(
newValue
)
{
}
console
.
log
(
newValue
,
'==='
)
return
item
;
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
:
{
methods
:
{
...
mapMutations
(
"audio"
,
[
"setBooks"
]),
...
mapMutations
(
"audio"
,
[
"setBooks"
]),
// 上传图
// 上传图
async
choose
(
index
)
{
async
choose
(
index
)
{
const
result
=
await
this
.
$permision
.
requestAndroidPermission
(
const
result
=
await
this
.
$permision
.
requestAndroidPermission
(
"android.permission.CAMERA"
"android.permission.CAMERA"
);
);
...
@@ -118,11 +148,14 @@ export default {
...
@@ -118,11 +148,14 @@ export default {
count
:
1
,
count
:
1
,
success
:
async
(
res
)
=>
{
success
:
async
(
res
)
=>
{
// await upload(res.tempFilePath)
// await upload(res.tempFilePath)
this
.
$set
(
let
url
=
await
upload
(
res
.
tempFilePaths
[
0
])
this
.
infoList
[
index
],
// this.$set(
"imgUrl"
,
// this.infoList[index],
await
upload
(
res
.
tempFilePaths
[
0
])
// "imgUrl",
);
// url
// );
this
.
infoList
[
index
].
imgUrl
=
url
this
.
setBooks
(
utils
.
deepClone
(
this
.
infoList
))
},
},
fail
:
(
err
)
=>
{
fail
:
(
err
)
=>
{
console
.
log
(
err
);
console
.
log
(
err
);
...
@@ -130,18 +163,19 @@ export default {
...
@@ -130,18 +163,19 @@ export default {
});
});
},
},
// 删除图
// 删除图
close
(
index
)
{
close
(
index
)
{
this
.
$set
(
this
.
infoList
[
index
],
"imgUrl"
);
// this.$set(this.infoList[index], "imgUrl");
this
.
infoList
[
index
].
imgUrl
=
''
this
.
setBooks
(
utils
.
deepClone
(
this
.
infoList
))
},
},
// 完成接待按钮
// 完成接待按钮
done
()
{
done
()
{
this
.
$refs
.
stepRef
.
open
();
this
.
$refs
.
stepRef
.
open
();
},
},
submit
()
{
submit
()
{
this
.
$refs
.
stepRef
.
close
();
this
.
$refs
.
stepRef
.
close
();
this
.
setBooks
(
utils
.
deepClone
(
this
.
infoList
));
this
.
stopAudio
();
this
.
stopAudio
();
this
.
infoList
=
INFO_LIST
.
map
((
item
)
=>
delete
item
.
imgUrl
);
//
this.infoList = INFO_LIST.map((item) => delete item.imgUrl);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
uni
.
reLaunch
({
uni
.
reLaunch
({
url
:
"/pages/equity/index"
,
url
:
"/pages/equity/index"
,
...
@@ -149,7 +183,7 @@ export default {
...
@@ -149,7 +183,7 @@ export default {
},
1500
);
},
1500
);
},
},
// 预览图片
// 预览图片
preview
(
index
)
{
preview
(
index
)
{
this
.
isPreview
=
true
;
this
.
isPreview
=
true
;
this
.
previewImg
=
this
.
infoList
[
index
].
imgUrl
;
this
.
previewImg
=
this
.
infoList
[
index
].
imgUrl
;
uni
.
previewImage
({
uni
.
previewImage
({
...
@@ -159,10 +193,10 @@ export default {
...
@@ -159,10 +193,10 @@ export default {
success
:
function
(
data
)
{
success
:
function
(
data
)
{
console
.
log
(
console
.
log
(
"选中了第"
+
"选中了第"
+
(
data
.
tapIndex
+
1
)
+
(
data
.
tapIndex
+
1
)
+
"个按钮,第"
+
"个按钮,第"
+
(
data
.
index
+
1
)
+
(
data
.
index
+
1
)
+
"张图片"
"张图片"
);
);
},
},
fail
:
function
(
err
)
{
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