9 Commits

4 changed files with 23 additions and 15 deletions

View File

@ -111,7 +111,6 @@ export function getOrCodeInfo(data){
return request({ return request({
url:'/agg-api/wxcp/createContactQrCode', url:'/agg-api/wxcp/createContactQrCode',
method:'POST', method:'POST',
contentType:'application/json',
data data
}) })
} }

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,14 +144,23 @@
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',
}, },
areaProps: { multiple: true, checkStrictly: true, value: 'id',label: 'title', emitPath: false, }, areaProps: { multiple: true, checkStrictly: true, value: 'id',label: 'title', emitPath: false, },
configId: '', configId: '',
wechatId: 'test', wechatId: '',
} }
}, },
async mounted() { async mounted() {
@ -162,7 +171,7 @@
await this.getInfoHandler(); await this.getInfoHandler();
} }
await this.getSupplierServiceTree(); // await this.getSupplierServiceTree();
}, },
methods: { methods: {
async QrCodeHandler() { async QrCodeHandler() {
@ -196,8 +205,8 @@
if(this.companyPhoto) { if(this.companyPhoto) {
this.companyPhotoList = [{ url : this.companyPhoto }]; this.companyPhotoList = [{ url : this.companyPhoto }];
} }
if( _data.serviceType ) { if( _data.service ) {
this.$refs.tree.setCheckedKeys(_data.serviceType.split(',')) this.$refs.tree.setCheckedKeys(_data.service.split(','))
} }
if(_data?.serviceAreaCode) { if(_data?.serviceAreaCode) {
this.$set(this.form, 'serviceAreaCode', _data?.serviceAreaCode.split(',').map(item => Number(item))); this.$set(this.form, 'serviceAreaCode', _data?.serviceAreaCode.split(',').map(item => Number(item)));
@ -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,9 +297,9 @@
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', serviceTypes: '1002,1003,1004',
treeType: 2 treeType: 2
}); });
this.supplierServiceList=res.data this.supplierServiceList=res.data
@ -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))

View File

@ -74,7 +74,7 @@
</div> </div>
<div class="info_item"> <div class="info_item">
<div class="label">服务能力</div> <div class="label">服务能力</div>
<div class="content service_color">{{supplierInfo?.serviceName}}</div> <div class="content service_color">{{supplierInfo?.serviceCategoryName}}</div>
</div> </div>
<div class="info_item"> <div class="info_item">
<div class="label">拖车数量</div> <div class="label">拖车数量</div>

View File

@ -46,7 +46,7 @@
<div class="item"> <div class="item">
<span class="leftTitle fontColor">服务类型:</span><span class="rightContent">{{ orderDetailInfo.taskServiceName }}</span> <span class="leftTitle fontColor">服务类型:</span><span class="rightContent">{{ orderDetailInfo.taskServiceName }}</span>
</div> </div>
<div class="item"> <div class="item" v-if="orderDetailInfo?.userVehicleTypeString">
<span class="leftTitle fontColor">车辆类型:</span><span class="rightContent">{{ orderDetailInfo.userVehicleTypeString }}<van-icon class="icon" name="question" @click="showCarTypeShow = true" /></span> <span class="leftTitle fontColor">车辆类型:</span><span class="rightContent">{{ orderDetailInfo.userVehicleTypeString }}<van-icon class="icon" name="question" @click="showCarTypeShow = true" /></span>
</div> </div>
<div class="item"> <div class="item">