CRM_26-06-04#story#8753,增加潜在供应商招募的H5链接中的信息填写

This commit is contained in:
2026-06-04 11:15:18 +08:00
parent 0483c2d0a7
commit d5d777afd3
4 changed files with 17 additions and 65 deletions

View File

@@ -99,9 +99,11 @@
confirmButtonText: '去添加', confirmButtonText: '去添加',
cancelButtonText: '取消', cancelButtonText: '取消',
}).then(() => { }).then(() => {
localStorage.setItem('lastRoute', JSON.stringify({ name: 'vehicleManage', query: { id: supplierId } }));
this.goPage('vehicleManage', { id: supplierId }); this.goPage('vehicleManage', { id: supplierId });
}).catch(() => { }).catch(() => {
this.goPage('supplierInfo', { id: supplierId }); localStorage.setItem('lastRoute', JSON.stringify({ name: 'supplierAddResult', query: { id: supplierId } }));
this.goPage('supplierAddResult', { id: supplierId });
}); });
} }
} catch (e) { } catch (e) {

View File

@@ -114,7 +114,7 @@
</div> </div>
<div class="btn_wrap" v-if="supplierId"> <div class="btn_wrap" v-if="supplierId">
<div class="btn" @click="goPage('supplierInfo', { id: routeId })">下一步</div> <div class="btn" @click="nextToResult">下一步</div>
</div> </div>
</div> </div>
</template> </template>
@@ -192,6 +192,10 @@ export default {
// this.getDriverList() // this.getDriverList()
}, },
methods:{ methods:{
nextToResult() {
localStorage.setItem('lastRoute', JSON.stringify({ name: 'supplierAddResult', query: { id: this.routeId } }));
this.goPage('supplierAddResult', { id: this.routeId });
},
isMiniProgram(item) { isMiniProgram(item) {
return item.registerFrom === '小程序' || (item.jobNumber && item.jobNumber.includes('小程序')) return item.registerFrom === '小程序' || (item.jobNumber && item.jobNumber.includes('小程序'))
}, },

View File

@@ -5,12 +5,6 @@
<img class="wait_icon" src="@/assets/supplier/successIcon.png" alt=""> <img class="wait_icon" src="@/assets/supplier/successIcon.png" alt="">
<div class="info-tip">信息录入完成请等待审核结果</div> <div class="info-tip">信息录入完成请等待审核结果</div>
</div> </div>
<div class="wei_code_wrap" v-if="name && id">
<div class="wei_title">请先添加企业微信保证申请流程正常进行</div>
<div class="wei_code_bg">
<img v-if="qrCodeUrl" :src="qrCodeUrl" alt="企业微信二维码" />
</div>
</div>
<div class="btn_wrap"> <div class="btn_wrap">
<div class="btn" @click="searchInfo">信息查看</div> <div class="btn" @click="searchInfo">信息查看</div>
</div> </div>
@@ -18,10 +12,7 @@
</template> </template>
<script> <script>
import QRCode from 'qrcode'
import {getOrCodeInfo, getContactQrCodeResult, updateWechatId, getSupplierInfo} from "@/api/mine"
import {myMixins} from "@/utils/myMixins" import {myMixins} from "@/utils/myMixins"
import {Toast} from "vant";
export default { export default {
name: "supplierAddResult", name: "supplierAddResult",
mixins:[myMixins], mixins:[myMixins],
@@ -38,66 +29,17 @@
async mounted() { async mounted() {
const urlParams = new URLSearchParams(window.location.search); const urlParams = new URLSearchParams(window.location.search);
this.id = this.$route.query.id || urlParams.get('id'); this.id = this.$route.query.id || urlParams.get('id');
await this.getInfoHandler(); if (this.id) {
if (this.name && this.id) { localStorage.setItem('lastRoute', JSON.stringify({ name: 'supplierAddResult', query: { id: this.id } }));
await this.QrCodeHandler();
} }
}, },
methods: { methods: {
async getInfoHandler() {
let res = await getSupplierInfo({
id: this.id
});
console.log('66666', res)
let _data = res?.data
this.wechatId = _data?.wechatId;
this.name = _data?.name;
},
async QrCodeHandler() {
await this.QrCodeInfo();
await this.getQrCode();
},
async QrCodeInfo() {
let res = await getOrCodeInfo({ name: this.name });
this.configId = res?.configId;
this.qrCode = res?.qrCode;
},
async getQrCode() {
try {
this.qrCodeUrl = await QRCode.toDataURL(this.qrCode, {
width: 150,
margin: 2,
color: { dark: '#000000', light: '#FFFFFF' },
});
} catch (error) {
console.error('生成二维码失败:', error);
}
},
async QrCodeResult() {
let res = await getContactQrCodeResult({ configId: this.configId });
this.wechatId = res?.data?.wechatId;
},
async updateWechat() {
await updateWechatId({
wechatId: this.wechatId,
id: this.id
})
},
async searchInfo() { async searchInfo() {
if (!this.wechatId ) { localStorage.setItem('lastRoute', JSON.stringify({ name: 'supplierInfo', query: { id: this.id } }));
await this.QrCodeResult();
}
if (!this.wechatId) {
Toast('请先添加企微再查看信息');
return;
}
if(this.wechatId) {
await this.updateWechat()
this.goPage('supplierInfo', { id: this.id }) this.goPage('supplierInfo', { id: this.id })
} }
} }
} }
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@@ -116,7 +116,7 @@
<van-dialog v-model="show" title="确定删除吗" show-cancel-button @confirm="handleConfirm"></van-dialog> <van-dialog v-model="show" title="确定删除吗" show-cancel-button @confirm="handleConfirm"></van-dialog>
<div class="btn_wrap" v-if="supplierId"> <div class="btn_wrap" v-if="supplierId">
<div class="btn" @click="goPage('driverManage', { id: supplierId , potentialId: routeId })">下一步</div> <div class="btn" @click="nextToDriver">下一步</div>
</div> </div>
</div> </div>
@@ -211,6 +211,10 @@ export default {
} }
}, },
methods:{ methods:{
nextToDriver() {
localStorage.setItem('lastRoute', JSON.stringify({ name: 'driverManage', query: { id: this.supplierId, potentialId: this.routeId } }));
this.goPage('driverManage', { id: this.supplierId, potentialId: this.routeId });
},
async getSupplierById(id) { async getSupplierById(id) {
let res = await supplierSelectById({ id }); let res = await supplierSelectById({ id });
this.supplierId = res?.data?.supplierId || ''; this.supplierId = res?.data?.supplierId || '';