Commit 98ec6274 by zhangxw

技师配置修改 联调

1 parent 043dd2ce
......@@ -62,7 +62,7 @@ Component({
copyArtificerList.map(i => {
i.active = false
if (i.id == selectedTechnicianId) i.active = true
if (i.technicianName.indexOf(value) != -1) {
if (i.staffName.indexOf(value) != -1) {
arr.push(i)
}
})
......@@ -106,8 +106,9 @@ Component({
if (!arr.length) {
return wx.$util.showToast('请选择技师')
}
orderInfo.technicianUuid = arr[0]?.uuid || ''
orderInfo.technicianId = arr[0]?.id || ''
orderInfo.technicianName = arr[0]?.technicianName || ''
orderInfo.technicianName = arr[0]?.staffName || ''
this.triggerEvent('confirm', orderInfo)
}
}
......
......@@ -11,7 +11,7 @@
<view class="checked_img">
<image wx:if="{{item.active}}" src="{{IMG_URL}}checked.png"></image>
</view>
<view class="text_box"><view class="text-hide">{{item.technicianName}}</view></view>
<view class="text_box"><view class="text-hide">{{item.staffName}}</view></view>
</view>
</block>
</scroll-view>
......
......@@ -132,5 +132,10 @@ module.exports = {
getOrderByCustomerCouponId(data) {
// return api.post('dj.api.smartcarlife.order.getOrderByCustomerCouponId ', data)
return api.get('dj.api.smartcarlife.order.getOrderByCustomerCouponId', data)
},
/** 获取园区店配置技师数据 */
getQYTechnicianList(data) {
return api.post('dj.api.smartcarlife.technician.list', data)
}
}
......@@ -56,7 +56,7 @@ Page({
if (!orderInfo?.customer?.orderCode) {
delete orderInfo?.customer?.orderCode
}
let paramsList = ['orderCode', 'customerId', 'customerName', 'customerPhone', 'customerSex', 'carBrandId', 'carBrand', 'carChildsBrandId', 'carChildsBrandName', 'carSeriesId', 'carSeriesName', 'standNo', 'plateNumber', 'experienceFlag', 'remark', 'technicianId', 'technicianName']
let paramsList = ['orderCode', 'customerId', 'customerName', 'customerPhone', 'customerSex', 'carBrandId', 'carBrand', 'carChildsBrandId', 'carChildsBrandName', 'carSeriesId', 'carSeriesName', 'standNo', 'plateNumber', 'experienceFlag', 'remark', 'technicianUuid', 'technicianId', 'technicianName']
let userInfo = {}
orderInfo = Object.assign(orderInfo, orderInfo.customer)
paramsList.map(item => {
......@@ -295,10 +295,16 @@ Page({
customerObj
})
}
// 有配置技师
if (data?.technicianConfigDTOList?.length > 0) {
this.isArtificer(data)
}
// // 有配置技师
// if (data?.technicianConfigDTOList?.length > 0) {
// this.isArtificer(data)
// }
// 获取园区店技师配置信息
api.getQYTechnicianList({yqMerchantId: wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId}).then(respone => {
if (respone?.code == 0) {
if (respone?.data.length > 0) this.isArtificer(respone.data)
}
})
} else {
wx.showModal({
title: '温馨提示',
......@@ -329,7 +335,8 @@ Page({
}
this.setData({
customerObj,
artificerList: orderInfo?.technicianConfigDTOList,
artificerList: data, // 园区店配置的技师数据
// artificerList: orderInfo?.technicianConfigDTOList,
orderInfo
})
},
......
......@@ -238,6 +238,12 @@ Page({
if (data?.technicianConfigDTOList?.length > 0) {
this.isArtificer(data)
}
// 获取园区店技师配置数据 wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId
api.getQYTechnicianList({yqMerchantId: wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId}).then(respone => {
if (respone?.code == 0) {
if (respone?.data.length > 0) this.isArtificer(respone.data)
}
})
} else {
wx.showModal({
title: '温馨提示',
......@@ -258,6 +264,7 @@ Page({
isArtificer(data) {
let { customerObj, orderInfo } = this.data
orderInfo.isOpenArtificer = true
orderInfo.technicianList = data || [] // 技师数据
if (customerObj.findIndex(val => val?.key && val.key == 'technicianName') < 0) {
customerObj[customerObj.length] = {
label: '选择技师:',
......
......@@ -199,10 +199,16 @@ Page({
customerObj
})
}
// 门店是否配置技师
if (data?.technicianConfigDTOList?.length > 0) {
this.isArtificer(data)
}
// // 门店是否配置技师
// if (data?.technicianConfigDTOList?.length > 0) {
// this.isArtificer(data)
// }
// 获取园区店技师配置数据 wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId
api.getQYTechnicianList({yqMerchantId: wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId}).then(respone => {
if (respone?.code == 0) {
if (respone?.data.length > 0) this.isArtificer(respone.data)
}
})
} else {
wx.showModal({
title: '温馨提示',
......@@ -223,6 +229,7 @@ Page({
isArtificer(data) {
let { customerObj, orderInfo } = this.data
orderInfo.isOpenArtificer = true
orderInfo.technicianList = data || [] // 技师数据
if (customerObj.findIndex(val =>val?.key && val.key == 'technicianName') < 0) {
customerObj[customerObj.length] = {
label: '选择技师:',
......
......@@ -167,7 +167,7 @@ Page({
delete orderObj.customer.createdDate
this.showLoading('提交中...')
let paramsList = ['orderCode', 'customerId', 'customerName', 'customerPhone', 'customerSex', 'carBrandId', 'carBrand', 'carChildsBrandId', 'carChildsBrandName', 'carSeriesId', 'carSeriesName', 'standNo', 'plateNumber', 'experienceFlag', 'remark', 'technicianId', 'technicianName']
let paramsList = ['orderCode', 'customerId', 'customerName', 'customerPhone', 'customerSex', 'carBrandId', 'carBrand', 'carChildsBrandId', 'carChildsBrandName', 'carSeriesId', 'carSeriesName', 'standNo', 'plateNumber', 'experienceFlag', 'remark', 'technicianUuid', 'technicianId', 'technicianName']
let userInfo = {}
orderObj = Object.assign(orderObj, orderObj.customer)
paramsList.map(item => {
......@@ -239,7 +239,8 @@ Page({
orderObj,
first: true,
flag: true,
artificerList: orderObj?.technicianConfigDTOList
// artificerList: orderObj?.technicianConfigDTOList
artificerList: orderObj?.technicianList
})
},
getSetting() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!