Commit 8fe36f42 by 李伟康

commit 增加车品牌选择

1 parent 72efc9e7
import http from "../request/http"; import http from "../request/http";
module.exports = { module.exports = {
search(data) { search (data) {
return http.post({ return http.post({
method: "scrm.api.carlife.weapp.homeSearch.search", method: "scrm.api.carlife.weapp.homeSearch.search",
pageSize: 10, pageSize: 10,
...@@ -9,14 +9,14 @@ module.exports = { ...@@ -9,14 +9,14 @@ module.exports = {
}); });
}, },
// 查询接待素材 // 查询接待素材
findSoureList() { findSoureList () {
return http.post({ return http.post({
method: "dj.api.smartcarlife.recepiton.soure.findSoureList", method: "dj.api.smartcarlife.recepiton.soure.findSoureList",
projectName: "boutique", projectName: "boutique",
}); });
}, },
// 查询门店支付配置 // 查询门店支付配置
findPayInfo(data) { findPayInfo (data) {
return http.post({ return http.post({
method: method:
"dj.api.smartcarlife.recepiton.pay.findPayInfoConfigListByMerchantId", "dj.api.smartcarlife.recepiton.pay.findPayInfoConfigListByMerchantId",
...@@ -25,21 +25,21 @@ module.exports = { ...@@ -25,21 +25,21 @@ module.exports = {
}); });
}, },
// 查询门店支付配置 // 查询门店支付配置
saveRecCustomer(data) { saveRecCustomer (data) {
return http.post({ return http.post({
method: "dj.api.smartcarlife.recepiton.customer.saveRecCustomer", method: "dj.api.smartcarlife.recepiton.customer.saveRecCustomer",
projectName: "boutique", projectName: "boutique",
...data, ...data,
}); });
}, },
getToken(data) { getToken (data) {
return http.post({ return http.post({
method: "dj.api.smartcarlife.recepiton.customer.oss.getToken", method: "dj.api.smartcarlife.recepiton.customer.oss.getToken",
projectName: "boutique", projectName: "boutique",
}); });
}, },
/** 查询接待素材详情 */ /** 查询接待素材详情 */
getFindSoureDetail(data) { getFindSoureDetail (data) {
return http.post({ return http.post({
method: "dj.api.smartcarlife.recepiton.soure.findSoureDetailList", method: "dj.api.smartcarlife.recepiton.soure.findSoureDetailList",
projectName: "boutique", projectName: "boutique",
...@@ -47,18 +47,29 @@ module.exports = { ...@@ -47,18 +47,29 @@ module.exports = {
}); });
}, },
// 历史订单列表 // 历史订单列表
getQuotationList(data) { getQuotationList (data) {
return http.post({ return http.post({
method: "dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page", method: "dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page",
projectName: "boutique", projectName: "boutique",
...data, ...data,
}); });
}, },
/** 获取门店主营车品牌 */
getMerchantCarBrandList (merchantIdList) {
return http.post({
method: 'merchants.api.open.merchant.info',
projectName: 'merchants',
merchantIdList,
merchantInfoSwitch: {
brandFlag: true
}
}, false, 'merchant')
},
/** /**
* 车型 * 车型
* *
*/ */
getCarBrandsList(data) { getCarBrandsList (data) {
return http.post( return http.post(
{ {
method: "scrm.api.carlife.common.getCarSeriesList", method: "scrm.api.carlife.common.getCarSeriesList",
...@@ -71,7 +82,7 @@ module.exports = { ...@@ -71,7 +82,7 @@ module.exports = {
/** /**
* 推荐人 * 推荐人
*/ */
getEmployeeList(data) { getEmployeeList (data) {
return http.post({ return http.post({
method: "dj.api.smartcarlife.employee.getByMerchantId", method: "dj.api.smartcarlife.employee.getByMerchantId",
projectName: "boutique", projectName: "boutique",
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
> >
<view <view
class="tips-wrapper" class="tips-wrapper"
:style="{ width: popupW + 'rpx', minHeight: popupH + 'rpx' }" :style="{ width: popupW + 'rpx', minHeight: popupH + 'rpx',maxHeight: maxHeight + 'rpx' }"
> >
<view class="tips-content"> <view class="tips-content">
<view class="tips-title" <view class="tips-title"
...@@ -70,6 +70,7 @@ export default { ...@@ -70,6 +70,7 @@ export default {
type: String, type: String,
default: "取消", default: "取消",
}, },
maxHeight:Number
}, },
methods: { methods: {
close() { close() {
......
...@@ -55,10 +55,29 @@ ...@@ -55,10 +55,29 @@
</template> </template>
</view> </view>
<MessageBox <MessageBox
ref="carBrandListVisible"
position="bottom"
:isFooter="false"
title="请选择车品牌"
>
<view class="select-box">
<view
class="select-item"
:class="{ checked:carBrand == item.name }"
@click="selectCar(item)"
v-for="(item, index) in carBrandList"
:key="index"
>
{{ item.name }}
</view>
</view>
</MessageBox>
<MessageBox
ref="carBoxVisible" ref="carBoxVisible"
position="bottom" position="bottom"
:isFooter="false" :isFooter="false"
title="请选择车型" title="请选择车型"
:maxHeight="1000"
> >
<view class="select-box"> <view class="select-box">
<view <view
...@@ -103,6 +122,7 @@ export default { ...@@ -103,6 +122,7 @@ export default {
name: 'Media_1', name: 'Media_1',
data () { data () {
return { return {
carBrandList: [],
carlist: [], carlist: [],
employeeList: [], employeeList: [],
formObject: [ formObject: [
...@@ -117,7 +137,7 @@ export default { ...@@ -117,7 +137,7 @@ export default {
label: '车型', label: '车型',
key: 'carModel', key: 'carModel',
type: 'select', type: 'select',
popKey: 'carBoxVisible' popKey: 'carBrandListVisible'
}, },
{ {
label: '电话', label: '电话',
...@@ -133,16 +153,24 @@ export default { ...@@ -133,16 +153,24 @@ export default {
popKey: 'employeeBoxVisible' popKey: 'employeeBoxVisible'
} }
], ],
customerInfo: this.$store.state.user.customerInfo customerInfo: this.$store.state.user.customerInfo,
carBrand: ''
} }
}, },
mounted () { mounted () {
let userInfo = uni.$storage.get('userInfo') let userInfo = uni.$storage.get('userInfo')
uni.$api.commonApi.getCarBrandsList({ uni.$api.commonApi.getMerchantCarBrandList([userInfo.shopMerchantId]).then(({ data }) => {
brandId: env.index == 3 ? 2365 : 2978, console.log(data, '123')
childBrandId: env.index == 3 ? 2695 : 3454 let list = data[0].carBrandList,
}).then(res => { carBrandList = []
this.carlist = res list.map(e => {
e.childs.map(i => {
i.brandId = e.id
carBrandList.push(i)
})
})
this.carBrandList = carBrandList
}) })
uni.$api.commonApi.getEmployeeList({ uni.$api.commonApi.getEmployeeList({
merchantId: userInfo.shopMerchantId, merchantId: userInfo.shopMerchantId,
...@@ -154,12 +182,28 @@ export default { ...@@ -154,12 +182,28 @@ export default {
inputCustomer () { inputCustomer () {
this.$store.dispatch('setCustomerInfo', this.customerInfo) this.$store.dispatch('setCustomerInfo', this.customerInfo)
}, },
selectCar (e) {
uni.showLoading()
this.carBrand = e.name
uni.$api.commonApi.getCarBrandsList({
brandId: e.brandId,
childBrandId: e.id
}).then(res => {
uni.hideLoading()
this.carlist = res
this.$refs.carBoxVisible.open()
}).catch(() => uni.hideLoading())
},
handleSelect (item, popkey) { handleSelect (item, popkey) {
this.$refs[popkey].close() this.$refs[popkey].close()
if (popkey == 'employeeBoxVisible') { if (popkey == 'employeeBoxVisible') {
this.customerInfo.salesUuid = item.uuid this.customerInfo.salesUuid = item.uuid
this.customerInfo.staffName = item.staffName this.customerInfo.staffName = item.staffName
} else this.customerInfo.carModel = item.name } else {
this.$refs.carBrandListVisible.close()
this.customerInfo.carModel = item.name
}
this.$store.dispatch('setCustomerInfo', this.customerInfo) this.$store.dispatch('setCustomerInfo', this.customerInfo)
}, },
showPopup (e) { showPopup (e) {
...@@ -249,7 +293,7 @@ export default { ...@@ -249,7 +293,7 @@ export default {
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
gap: 20rpx; gap: 20rpx;
overflow-y: scroll; overflow-y: scroll;
height: 100%; max-height: 50vh;
padding-bottom: 60rpx; padding-bottom: 60rpx;
.select-item { .select-item {
text-align: center; text-align: center;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!