9 Commits

5 changed files with 43 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

@ -65,7 +65,7 @@
ref="tree" ref="tree"
:highlight-current="true" :highlight-current="true"
:expand-on-click-node="false" :expand-on-click-node="false"
:data="supplierServiceList" :data="bigServiceList"
:props="defaultProps"> :props="defaultProps">
</el-tree> </el-tree>
</template> </template>
@ -81,6 +81,7 @@
ref="areaCascader" ref="areaCascader"
popper-class="responsive-cascader" popper-class="responsive-cascader"
:popper-append-to-body="false" :popper-append-to-body="false"
filterable
clearable></el-cascader> clearable></el-cascader>
</template> </template>
</van-field> </van-field>
@ -110,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 {
@ -143,9 +144,19 @@
areaShow: false, areaShow: false,
areaList: [], areaList: [],
supplierServiceList: [], supplierServiceList: [],
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: '',
@ -160,7 +171,7 @@
await this.getInfoHandler(); await this.getInfoHandler();
} }
await this.getSupplierServiceTree(); // await this.getSupplierServiceTree();
}, },
methods: { methods: {
async QrCodeHandler() { async QrCodeHandler() {
@ -194,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)));
@ -250,13 +261,23 @@
_node.map(item => { _node.map(item => {
checkArr.push(item.data.id) checkArr.push(item.data.id)
}) })
/* let treeArr = this.$refs.tree.getCheckedKeys();
let childrenTreeArr = [];
treeArr.map(item => {
let _arr = this.supplierServiceList.filter(_item => _item.id == item) || [] // 获取对应的大类
_arr[0]?.children?.map(childItem => {
childrenTreeArr?.push(childItem?.id)
})
})
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: this.$refs.tree.getCheckedKeys().join(','), service: this.$refs.tree.getCheckedKeys().join(',') ,
serviceAreaCode: checkArr.join(','), serviceAreaCode: checkArr.join(','),
wechatId: this.wechatId, wechatId: this.wechatId,
}); });
@ -276,13 +297,18 @@
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
}, this.bigServiceList = [];
res.data.map(item => {
let obj = {...item, children: null}
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))
@ -551,4 +577,6 @@
font-size: 13px !important; font-size: 13px !important;
} }
}*/ }*/
</style> </style>

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

@ -256,7 +256,6 @@
:deletable="!disabledShow" :deletable="!disabledShow"
max-count="1" max-count="1"
:preview-size="54" :preview-size="54"
accept="image "
/> />
</div> </div>
<div class="lineBot"></div> <div class="lineBot"></div>
@ -365,6 +364,7 @@ export default {
trailerService: '',//拖车服务 trailerService: '',//拖车服务
isJoin:'',//是否参与 isJoin:'',//是否参与
hasLiabilityInsurance: '', // 有无责任险 hasLiabilityInsurance: '', // 有无责任险
liabilityInsuranceAudit: '',
activeIcon: require('@/assets/check.png'), activeIcon: require('@/assets/check.png'),
inactiveIcon: require('@/assets/uncheck.png'), inactiveIcon: require('@/assets/uncheck.png'),
// result: [], // result: [],
@ -509,7 +509,7 @@ export default {
}, },
disabledShow() { disabledShow() {
if (this.id) { if (this.id) {
return !this.permissonList.includes('hasInsuranceAudit') return !this.permissonList.includes('hasInsuranceAudit') && [2,3].includes(this.liabilityInsuranceAudit)
} else { } else {
return false return false
} }
@ -812,6 +812,7 @@ export default {
this.vehicleFrontLicensePlate = result.vehicleFrontLicensePlate; this.vehicleFrontLicensePlate = result.vehicleFrontLicensePlate;
this.hasLiabilityInsurance = result.hasLiabilityInsurance this.hasLiabilityInsurance = result.hasLiabilityInsurance
this.insuranceCorp = result.insuranceCorp; this.insuranceCorp = result.insuranceCorp;
this.liabilityInsuranceAudit = result.liabilityInsuranceAudit
if(this.insurancePicturePhoto) { if(this.insurancePicturePhoto) {
this.insurancePictureFiles = [{url: this.insurancePicturePhoto}] this.insurancePictureFiles = [{url: this.insurancePicturePhoto}]
} }

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">