CRM_26-06-04#story#8753,增加潜在供应商招募的H5链接中的信息填写
This commit is contained in:
@@ -99,9 +99,11 @@
|
||||
confirmButtonText: '去添加',
|
||||
cancelButtonText: '取消',
|
||||
}).then(() => {
|
||||
localStorage.setItem('lastRoute', JSON.stringify({ name: 'vehicleManage', query: { id: supplierId } }));
|
||||
this.goPage('vehicleManage', { id: supplierId });
|
||||
}).catch(() => {
|
||||
this.goPage('supplierInfo', { id: supplierId });
|
||||
localStorage.setItem('lastRoute', JSON.stringify({ name: 'supplierAddResult', query: { id: supplierId } }));
|
||||
this.goPage('supplierAddResult', { id: supplierId });
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
|
||||
</div>
|
||||
<div class="btn_wrap" v-if="supplierId">
|
||||
<div class="btn" @click="goPage('supplierInfo', { id: routeId })">下一步</div>
|
||||
<div class="btn" @click="nextToResult">下一步</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -192,6 +192,10 @@ export default {
|
||||
// this.getDriverList()
|
||||
},
|
||||
methods:{
|
||||
nextToResult() {
|
||||
localStorage.setItem('lastRoute', JSON.stringify({ name: 'supplierAddResult', query: { id: this.routeId } }));
|
||||
this.goPage('supplierAddResult', { id: this.routeId });
|
||||
},
|
||||
isMiniProgram(item) {
|
||||
return item.registerFrom === '小程序' || (item.jobNumber && item.jobNumber.includes('小程序'))
|
||||
},
|
||||
|
||||
@@ -5,12 +5,6 @@
|
||||
<img class="wait_icon" src="@/assets/supplier/successIcon.png" alt="">
|
||||
<div class="info-tip">信息录入完成,请等待审核结果。</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" @click="searchInfo">信息查看</div>
|
||||
</div>
|
||||
@@ -18,10 +12,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import QRCode from 'qrcode'
|
||||
import {getOrCodeInfo, getContactQrCodeResult, updateWechatId, getSupplierInfo} from "@/api/mine"
|
||||
import {myMixins} from "@/utils/myMixins"
|
||||
import {Toast} from "vant";
|
||||
export default {
|
||||
name: "supplierAddResult",
|
||||
mixins:[myMixins],
|
||||
@@ -38,66 +29,17 @@
|
||||
async mounted() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
this.id = this.$route.query.id || urlParams.get('id');
|
||||
await this.getInfoHandler();
|
||||
if (this.name && this.id) {
|
||||
await this.QrCodeHandler();
|
||||
if (this.id) {
|
||||
localStorage.setItem('lastRoute', JSON.stringify({ name: 'supplierAddResult', query: { id: this.id } }));
|
||||
}
|
||||
},
|
||||
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() {
|
||||
if (!this.wechatId ) {
|
||||
await this.QrCodeResult();
|
||||
}
|
||||
if (!this.wechatId) {
|
||||
Toast('请先添加企微再查看信息');
|
||||
return;
|
||||
}
|
||||
if(this.wechatId) {
|
||||
await this.updateWechat()
|
||||
localStorage.setItem('lastRoute', JSON.stringify({ name: 'supplierInfo', query: { id: this.id } }));
|
||||
this.goPage('supplierInfo', { id: this.id })
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
|
||||
<van-dialog v-model="show" title="确定删除吗" show-cancel-button @confirm="handleConfirm"></van-dialog>
|
||||
<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>
|
||||
|
||||
@@ -211,6 +211,10 @@ export default {
|
||||
}
|
||||
},
|
||||
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) {
|
||||
let res = await supplierSelectById({ id });
|
||||
this.supplierId = res?.data?.supplierId || '';
|
||||
|
||||
Reference in New Issue
Block a user