story#7552 潜在服务商,服务类型修改

This commit is contained in:
2025-11-12 13:42:31 +08:00
parent 87e7c30d6c
commit 756b84e9de

View File

@ -111,7 +111,7 @@
<script> <script>
import {leftCopy} from "@/utils/common" import {leftCopy} from "@/utils/common"
import QRCode from 'qrcode' import QRCode from 'qrcode'
import { uploadImage, supplierServicePartTree, ocrHandler, unifiedOCRWithCompress, getArea, saveSupplier, getSupplierInfo, getOrCodeInfo, getContactQrCodeResult } from "@/api/mine" import { uploadImage, ocrHandler, unifiedOCRWithCompress, getArea, saveSupplier, getSupplierInfo, getOrCodeInfo, getContactQrCodeResult } from "@/api/mine"
import {myMixins} from "@/utils/myMixins" import {myMixins} from "@/utils/myMixins"
import {Dialog} from "vant"; import {Dialog} from "vant";
export default { export default {
@ -144,7 +144,16 @@
areaShow: false, areaShow: false,
areaList: [], areaList: [],
supplierServiceList: [], supplierServiceList: [],
bigServiceList: [], bigServiceList: [{
id: 1002,
title: '拖车服务'
}, {
id: 1003,
title: '抢修服务'
}, {
id: 1004,
title: '困境救援'
}],
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'title', label: 'title',
@ -162,7 +171,7 @@
await this.getInfoHandler(); await this.getInfoHandler();
} }
await this.getSupplierServiceTree(); // await this.getSupplierServiceTree();
}, },
methods: { methods: {
async QrCodeHandler() { async QrCodeHandler() {
@ -253,7 +262,7 @@
checkArr.push(item.data.id) checkArr.push(item.data.id)
}) })
let treeArr = this.$refs.tree.getCheckedKeys(); /* let treeArr = this.$refs.tree.getCheckedKeys();
let childrenTreeArr = []; let childrenTreeArr = [];
treeArr.map(item => { treeArr.map(item => {
let _arr = this.supplierServiceList.filter(_item => _item.id == item) || [] // 获取对应的大类 let _arr = this.supplierServiceList.filter(_item => _item.id == item) || [] // 获取对应的大类
@ -261,14 +270,14 @@
childrenTreeArr?.push(childItem?.id) childrenTreeArr?.push(childItem?.id)
}) })
}) })
let allArr = [...treeArr, ...childrenTreeArr] let allArr = [...treeArr, ...childrenTreeArr]*/
let res = await saveSupplier({ let res = await saveSupplier({
id: this.id, id: this.id,
...this.form, ...this.form,
idCardFrontUrl: this.idFrontPhoto, idCardFrontUrl: this.idFrontPhoto,
idCardBackUrl: this.idBackPhoto, idCardBackUrl: this.idBackPhoto,
businessLicense: this.companyPhoto, businessLicense: this.companyPhoto,
serviceType: allArr.join(',') , service: this.$refs.tree.getCheckedKeys().join(',') ,
serviceAreaCode: checkArr.join(','), serviceAreaCode: checkArr.join(','),
wechatId: this.wechatId, wechatId: this.wechatId,
}); });
@ -288,7 +297,7 @@
let res = await getArea(); let res = await getArea();
this.areaList = res?.data; this.areaList = res?.data;
}, },
async getSupplierServiceTree(){ /*async getSupplierServiceTree(){
let res = await supplierServicePartTree({ let res = await supplierServicePartTree({
serviceTypes: '1002,1003,1004', serviceTypes: '1002,1003,1004',
treeType: 2 treeType: 2
@ -299,7 +308,7 @@
let obj = {...item, children: null} let obj = {...item, children: null}
this.bigServiceList.push(obj) this.bigServiceList.push(obj)
}) })
}, },*/
confirmHandle(val){ confirmHandle(val){
this.region=[] this.region=[]
val?.forEach(item => this.region.push(item.name)) val?.forEach(item => this.region.push(item.name))