Commit 98ec6274 by zhangxw

技师配置修改 联调

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