Browse Source

提交补录入口

v3
chenrui 2 years ago
parent
commit
7331cd9792
  1. 153
      src/views/enforce/scanQrCode.vue

153
src/views/enforce/scanQrCode.vue

@ -32,23 +32,48 @@
<span class="box-qr-code-text">执法监督码</span>--> <span class="box-qr-code-text">执法监督码</span>-->
</div> </div>
</div> </div>
<div class="nocode" @click="toNoScanView">没有企业码?手动输入关键词查询 >></div> <div class="scan-note">扫一扫企业二维码,即可查看企业信息</div>
</div> <!-- <div class="nocode" @click="toNoScanView">扫码不成功?手动输入关键词查询 >></div>-->
</div> <div class="nocode" @click="showPopup()">手动登记,请输入关键字搜索企业 >></div>
<!-- <div class="recommend_box">
<van-cell :border="false" title="推荐" />
<div class="recommend_body">
<goodsCard :goodsList="recommend"></goodsCard> <!-- <div class="nav-div">
</div> <div @click="showPopup()"><van-icon name="search" /><span>企业搜索</span>
</div> --> <div class="act-note">扫码不成功?手动输入关键词查询</div>
</div>
<div><van-icon name="records-o" /><span>补录</span>
<div class="act-note">仅限因特殊情形,需先检查,后登记相关检查信息</div>
</div>
</div>-->
</div>
<!-- <div class="addinfo" @click="toRecord">补录</div>-->
<div class="record">如遇网络异常、设备故障无法登录系统的情况,<a @click="toSign">补录 >></a></div>
</div>
<!-- <div class="recommend_box">
<van-cell :border="false" title="推荐" />
<div class="recommend_body">
<goodsCard :goodsList="recommend"></goodsCard>
</div>
</div> -->
<!-- </refresh-list> --> <!-- </refresh-list> -->
</div> </div>
<!-- 底部 --> <!-- 底部 -->
<!-- <div class="footer_body"> <!-- <div class="footer_body">
<footer-nav></footer-nav> <footer-nav></footer-nav>
</div> --> </div> -->
<popup :visible="popupVisible" :content="data.lawContent" @close="closePopup" @reciveData=""/>
</div> </div>
<!-- <van-popup v-model:show="data.showNoScanPicker" position="bottom">
<van-calendar v-model:show="data.showOperatingTermPicker" type="range"
:min-date="data.minDate" :max-date="data.maxDate" @confirm="onOperatingTermConfirm" />
</van-popup> -->
</template> </template>
<script setup name="Home"> <script setup name="Home">
@ -139,24 +164,23 @@
console.log(res) console.log(res)
//TODO 判断是否是市监 //TODO 判断是否是市监
if(isHttpLink(res.resultStr)){ if(isHttpLink(res.resultStr)){
//判断地址是否存在cid统一信用代码
getEnterpriseInfoBySj({"url":res.resultStr},success =>{ getEnterpriseInfoBySj({"url":res.resultStr},success =>{
if (success.success) { if (success.success) {
router.push({ router.push({
path: "/enterpriseScanPreview", path: "/enterpriseScanPreview",
query: { query: {
enterpriseNumber: success.data.salt, enterpriseNumber: success.data.salt,
isNoScan: false isNoScan: false
} }
}) })
} else { } else {
showFailToast(success.message); showFailToast(success.message);
router.push({ router.push({
path: "/enforce/scanQrCode", path: "/enforce/scanQrCode",
}) })
} }
},error =>{}) },error =>{})
}else{ }else{
const scanObj = JSON.parse(res.resultStr); const scanObj = JSON.parse(res.resultStr);
// 判断二维码是否过期, 如果已过期则跳转提示页 // 判断二维码是否过期, 如果已过期则跳转提示页
@ -180,21 +204,22 @@
showFailToast("该二维码不正确"); showFailToast("该二维码不正确");
}) })
} }
},
error: function(res) {
console.log("错误回调",res)
if (res.errMsg.indexOf('function_not_exist') > 0) {
showFailToast('版本过低请升级')
}
}, },
cancel: (res) => { cancel: (res) => {
console.log('err', res); console.log('err', res);
}, },
}); });
}; };
const toScanPageView = async () => { const toScanPageView = async () => {
openScan(); openScan();
// router.push({
// path: "/enforce/scanPage_szy",
// query: {}
// });
}; };
const toNoScanView = async () => { const toNoScanView = async () => {
@ -230,24 +255,62 @@
// recommendGoods(true); // recommendGoods(true);
}; };
onMounted(() => { // onMounted(() => {
// new Vconsole(); // // new Vconsole();
getEnterpriseMerchantAuthorization({merchantTel: useCommon.phonenumber}, success => { // getEnterpriseMerchantAuthorization({merchantTel: useCommon.phonenumber}, success => {
if (success.data != null && success.data.length > 0) { // if (success.data != null && success.data.length > 0) {
useCommon.SET_USER_ENTERPRISE_NUMBER(success.data[0].enterpriseNumber); // useCommon.SET_USER_ENTERPRISE_NUMBER(success.data[0].enterpriseNumber);
} // }
}, error => { // }, error => {
}) // })
}) // })
// 返回 // 返回
const goBack = () => { const goBack = () => {
router.go(-1); router.go(-1);
}; };
const isHttpLink = (url) =>{
return url.indexOf("http://") === 0 || url.indexOf("https://") === 0;
const toSign = () => {
router.push({
path: "/sign",
query: {
// enterpriseNumber: data.enterpriseNumber,
reason: '补录',
checkCss: 3,
checkCss: 9,
isNoScan: true,
}
});
};
const isHttpLink = (url) =>{
return url.indexOf("http://") === 0 || url.indexOf("https://") === 0;
}
</script>
<script>
//不扫码企业筛选弹窗
import Popup from '@/views/enforce/noScanFilter.vue';
export default {
components: {
Popup
},
data() {
return {
popupVisible: false,
popupContent: ''
}
},
methods: {
showPopup() {
this.popupVisible = true;
},
closePopup() {
this.popupVisible = false;
}
} }
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.home { .home {
display: flex; display: flex;

Loading…
Cancel
Save